https://github.com/knsoft/knsoft.firmwarespec
C/C++ definitions of multiple firmware specifications with corresponding type information
https://github.com/knsoft/knsoft.firmwarespec
dmidecode firmware smbios
Last synced: 8 months ago
JSON representation
C/C++ definitions of multiple firmware specifications with corresponding type information
- Host: GitHub
- URL: https://github.com/knsoft/knsoft.firmwarespec
- Owner: KNSoft
- License: mit
- Created: 2025-03-02T19:03:51.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-06T02:29:13.000Z (11 months ago)
- Last Synced: 2025-05-06T03:28:33.775Z (11 months ago)
- Topics: dmidecode, firmware, smbios
- Language: C
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
| **English (en-US)** | [简体中文 (zh-CN)](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/README.zh-CN.md) |
| --- | --- |
# KNSoft.FirmwareSpec
[](https://www.nuget.org/packages/KNSoft.FirmwareSpec) [](https://github.com/KNSoft/KNSoft.FirmwareSpec/actions/workflows/Build.yml)  [](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/LICENSE)
[KNSoft.FirmwareSpec](https://github.com/KNSoft/KNSoft.FirmwareSpec) contains C/C++ definitions of multiple firmware specifications and corresponding type information, compatible with MSVC and GCC compilers.
| Specification | Definition | Type information | Sample program |
| :- | :- | :- | :- |
| [SMBIOS reference specification](https://www.dmtf.org/standards/smbios) | [SMBIOS.h](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/SMBIOS.h) | [SMBIOS.TypeInfo.h](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/SMBIOS.TypeInfo.h) | [SmbiosDecode](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/SmbiosDecode.c) |
| [ACPI Specification](https://uefi.org/specifications) | (TODO) | - | - |
| CPUID | [CPUID.h](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/CPUID.h) | (WIP) | (WIP) |
[TypeInfoGenerator](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/TypeInfoGenerator) generates type information (e.g. [SMBIOS.TypeInfo.h](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/SMBIOS.TypeInfo.h)) according to the corresponding specification definitions (e.g. [SMBIOS.h](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/SMBIOS.h)), type information is very useful for tools like `dmidecode` to resolve each of structure fields.
[GitHub Action](https://github.com/KNSoft/KNSoft.FirmwareSpec/actions) compiles and runs sample programs, artifact contains them and theirs text outputs.
## Usage
NuGet package [KNSoft.FirmwareSpec](https://www.nuget.org/packages/KNSoft.FirmwareSpec) is out-of-the-box, install to project and include wanted header, for example:
```C
#include // SMBIOS reference specification
#include // Type information of SMBIOS reference specification
#include // CPUID
```
We always keep our definitions up-to-date, support version control by using macro (e.g. `SMBIOS_VERSION`), see corresponding header for more information.
> [!CAUTION]
> In beta stage, may contains some bugs and various issues, should be used with caution.
You could [report issue](https://github.com/KNSoft/KNSoft.FirmwareSpec/issues/new) or [send PR](https://github.com/KNSoft/KNSoft.FirmwareSpec/pulls) to make this project better.
## License
[KNSoft.FirmwareSpec](https://github.com/KNSoft/KNSoft.FirmwareSpec) is licensed under the [MIT](https://github.com/KNSoft/KNSoft.FirmwareSpec/blob/main/LICENSE) license.