Skip to main content
Last updated January 09, 2012 21:32, by mikeb2701
__TOC__ = Introduction = This set of changes were developed for 2 reasons # Add support for Mac OS X (Darwin) # Structure the build in a more IDE & Platform independent manner. One of the trickiest issues is use if #ifdefs. The current code base is originally built for Linux, with the exception case being Windows. This makes it very hard to add support for a third OS in a simple way. = Code Structure = └── src ├── drivers (platform specific kernel drivers to support MSR registers and CPU topology │   └── DirectHW (Driver for MacOS) ├── os (Platform related code) │   ├── darwin │   ├── linux │   └── windows │   ├── Intelpcm.dll │   ├── PCMService │   ├── PCM_Win │   └── WinMSRDriver │   ├── Win7 │   └── WinXP └── share ├── classes (Java sources) │   └── org │   └── jpcm │   ├── error │   ├── model │   └── test └── native (C++ Sources) ├── jni (JNI adapter code) └── pcm (Intel PCM code) = MSR & PCI = The pci and msr code (pci.{h,cpp}, msr.{h,cpp}) has been split across the src/os/linux and src/os/windows directories and the #ifdefs have been removed. An implementation for darwin has been added to the src/os/darwin directory. = types.h = This is now in the src/os directory. This is because the platform specific code and the main pcm code make use of the integer types (unit32, unit16,...). These typedefs could be removed in favour of using the types defined in stdint.h. = cpucounters.h = Line 63-64 removed unnecessary template class definitions that cause linker problems when linking on MacOS. = Build = The build now uses the [ scons build tool] instead of make. = DirectHW = Under src/drivers/DirectHW is a modified version of the DirectHW from the [ coreboot project]. The unneeded direct I/O functionality has been removed and a new method has been added to support inspecting the CPU topology.
Please Confirm