KNSoft.FirmwareSpec
1.0.1-beta
dotnet add package KNSoft.FirmwareSpec --version 1.0.1-beta
NuGet\Install-Package KNSoft.FirmwareSpec -Version 1.0.1-beta
<PackageReference Include="KNSoft.FirmwareSpec" Version="1.0.1-beta" />
<PackageVersion Include="KNSoft.FirmwareSpec" Version="1.0.1-beta" />
<PackageReference Include="KNSoft.FirmwareSpec" />
paket add KNSoft.FirmwareSpec --version 1.0.1-beta
#r "nuget: KNSoft.FirmwareSpec, 1.0.1-beta"
#:package KNSoft.FirmwareSpec@1.0.1-beta
#addin nuget:?package=KNSoft.FirmwareSpec&version=1.0.1-beta&prerelease
#tool nuget:?package=KNSoft.FirmwareSpec&version=1.0.1-beta&prerelease
| English (en-US) | 简体中文 (zh-CN) |
|---|
KNSoft.FirmwareSpec
KNSoft.FirmwareSpec provides C/C++ definitions, explicit type metadata, and safe C/C++ and .NET decoders for firmware and processor interfaces. The native interface is compatible with MSVC and GCC.
| Specification | Definition | Type information | Sample program |
|---|---|---|---|
| SMBIOS 3.9.0 | SMBIOS.h | SMBIOS.TypeInfo.h | SmbiosDecode.c |
| ACPI 6.6 | ACPI.h | ACPI.TypeInfo.h | AcpiDecode.c |
| Intel CPUID (SDM v092 Leaf 01H/07H) | CPUID.h | CPUID.TypeInfo.h | CpuidDecode.c |
The shared decoder primitives in FirmwareDecode.h perform bounds, overflow, length, and checksum validation without allocation. Complex AML, OEM-defined, and architecture-specific payloads remain available as bounded raw data when a compact generic representation would lose semantics.
GitHub Action compiles and runs sample programs, artifact contains them and theirs text outputs.
Usage
NuGet package KNSoft.FirmwareSpec is out-of-the-box, install to project and include wanted header, for example:
#include <KNSoft/FirmwareSpec/SMBIOS.Decode.h>
#include <KNSoft/FirmwareSpec/ACPI.Decode.h>
#include <KNSoft/FirmwareSpec/CPUID.Decode.h>
SMBIOS definitions support compile-time version selection through SMBIOS_VERSION. See each header for its supported specification level.
The same package contains a pure .NET 10 parser. It performs no local firmware I/O, so a server can safely parse byte buffers collected by a remote endpoint:
FirmwareDecodeStatus status = SmbiosParser.TryParseWindowsRaw(data, out SmbiosTable? table);
status = AcpiParser.TryParse(data, out AcpiTable? acpiTable);
status = CpuidParser.TryParse(data, out CpuidSnapshot? snapshot);
SmbiosParser.TryParseWindowsRaw accepts the RAW_SMBIOS_DATA buffer returned by Windows. AcpiParser.TryParse accepts one complete ACPI table. CPUID is transported as consecutive 24-byte little-endian records containing Leaf, SubLeaf, EAX, EBX, ECX, and EDX; CPUID is executed only by the collector, never by the parser.
In beta stage, may contains some bugs and various issues, should be used with caution.
You could report issue or send PR to make this project better.
License
KNSoft.FirmwareSpec is licensed under the MIT license.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1-beta | 82 | 8/19/2026 |
| 1.0.0-beta | 560 | 3/2/2025 |