48 Commits

Author SHA1 Message Date
Christian Walter
fcd4438026 fix: remove debug print
Signed-off-by: Christian Walter <christian.walter@9elements.com>
v1.0.3
2025-06-20 14:35:43 +02:00
Christian Walter
6070168f2b fix: do not endless loop within ReadMSR
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>
v1.0.2
2025-06-20 11:37:22 +02:00
Christian Walter
36b4b53bc7 fix: add CPUID to Interface
Signed-off-by: Christian Walter <christian.walter@9elements.com>
v1.0.1
2025-01-26 21:57:18 +01:00
Christian Walter
dcd21f0bbd feat: add LICENCE
Signed-off-by: Christian Walter <christian.walter@9elements.com>
v1.0.0
2025-01-26 21:48:47 +01:00
Christian Walter
c75a897ccc feat: add CPUID function
The CPUID function calls leaf with subleaf function and returns eax,
ebx, ecx and edx.

Signed-off-by: Christian Walter <christian.walter@9elements.com>
2025-01-26 21:45:11 +01:00
Christian Walter
7e0a5df7e2 feat: add .gitignore
Signed-off-by: Christian Walter <christian.walter@9elements.com>
2024-08-12 21:38:55 +02:00
Christian Walter
c269a40ed8 chore: remove circle CI folder
Signed-off-by: Christian Walter <christian.walter@9elements.com>
2024-08-12 21:38:55 +02:00
Christian Walter
c365036da7 fix: replace deprecated ioutils with os
Signed-off-by: Christian Walter <christian.walter@9elements.com>
2024-08-12 21:38:55 +02:00
Christian Walter
176e6a154a chore: remove vendor folder
Signed-off-by: Christian Walter <christian.walter@9elements.com>
2024-08-12 21:38:55 +02:00
Christian Walter
79b1ce165a chore: update Github workflow
Signed-off-by: Christian Walter <christian.walter@9elements.com>
2024-08-12 21:38:55 +02:00
Christian Walter
f69c4f7dfd chore: update dependencies
Signed-off-by: Christian Walter <christian.walter@9elements.com>
2024-08-12 21:38:55 +02:00
Dmitrii Okunev
a82949f8ff Add support for GOARCH=386
`x86` is an invalid `GOARCH`. Changing to `386`.

Also `gofmt` added `//go:build` comments.
2022-05-18 13:11:44 +02:00
Dmitrii Okunev
8375dd201a Do not require concrete HwAPI in Intel MSR handlers 2021-12-15 15:12:25 +01:00
Dmitrii Okunev
8b8a479604 feat(platformsecurity): Add platformsecurity.ID to identify a hardware set family
Signed-off-by: Dmitrii Okunev <xaionaro@fb.com>
2021-12-15 13:13:00 +01:00
Christopher Meis
fcb3f92eaa Rework of api:
* 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>
2021-10-06 11:15:42 +02:00
Christopher Meis
2672fbf692 Rework of api:
* Move AddressRangeIsDMAProtexted out of API

* Keep functions as convenience function in package

Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
2021-10-06 11:15:42 +02:00
Christopher Meis
a1f0254810 Rework of api:
* 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>
2021-10-06 11:15:42 +02:00
Christopher Meis
3d843df8a8 Rework of api:
* Move ReadHostBridgeTseg, ReadHostBridgeDPR out of API

* Keep functions as convenience functions in package

Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
2021-10-06 11:15:42 +02:00
Christopher Meis
e1381eccc3 Rework of api:
* 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>
2021-10-06 11:15:42 +02:00
Christopher Meis
fcd632a975 Rework of api:
*	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>
2021-10-06 11:15:42 +02:00
Christopher Meis
9e9112a7f3 Reduce API:
* Remove PCIReadVendorID()
* Remove PCIReadDeviceID()
* Replace usage with PCIReadConfigSpace

Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
2021-09-30 11:01:06 +02:00
Christopher Meis
98b58e492c Reduce API:
* Adapt ReadMSR for universal usage
* Remove ReadMSRAllCores
* Adapt tests and related code

Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
2021-09-30 11:01:06 +02:00
Christopher Meis
8b92cd62f8 Reduce API
* 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>
2021-09-30 11:01:06 +02:00
Kai Michaelis
40d2937646 impl CPUSignatureFull for non amd64 architectures 2021-09-22 15:58:46 +02:00
Kai Michaelis
b853fc336a add CPUSignatureFull to inferface def 2021-09-22 15:31:14 +02:00