The current implementation just endlessly loops within ReadMSR until we
are running out of file descriptors. The commit _wanted_ to implement to
read the MSR from all cores - the previous commit however implement to
read core 0 until we read file_max.
Signed-off-by: Christian Walter <christian.walter@9elements.com>
The CPUID function calls leaf with subleaf function and returns eax,
ebx, ecx and edx.
Signed-off-by: Christian Walter <christian.walter@9elements.com>
* Move IterateOverSMBIOSTablesType0, IterateOverSMBIOSTableType17 out of API
* Keep as convenience functions in package
* Adapt tests to changes
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
* Move AddressRangeIsDMAProtexted out of API
* Keep functions as convenience function in package
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
* Move GetACPITableDevMem, GetACPITableSysFS out of API
* Keep functions as convenience functions in package
* Add GetACPITable which returns ACPITable from SysFS first,
if that fails: Table from DevMem is returned
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
* Move ReadHostBridgeTseg, ReadHostBridgeDPR out of API
* Keep functions as convenience functions in package
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
* Remove functions from API:
IsReservedInE820, UsableMemoryAbove4G, UsableMemoryBelow4G
* Keep them as convenience functions in package
* Adapt test
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
* PCIReadConfigSpace takes amount of bytes to read
and returns data as byte-slice
* Move HasSMRR, GetSMRRInfo, IA32FeatureControlIsLocked,
AllowVMXInSMX, TXTLeavesAreEnabled, IA32DebugInterfaceEnabledOrLocked
out of API. Now as convenience function (needs further cleanup)
* Change ReadMSR again: Now returns data of all cores in a slice
* Adapt changes to all related code
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
* Adapt ReadMSR for universal usage
* Remove ReadMSRAllCores
* Adapt tests and related code
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
* Remove PCIReadConfig8/16/32
* Remove PCIWriteConfig8/16/32
* Add PCIReadConfigSpace as replacement for the removed
* Add PCIWriteConfigSpace as replacement for the removed
* Adapted the tests
* Adapted relying functions
Signed-off-by: Christopher Meis <christopher.meis@9elements.com>