[smbios] Provide a null SMBIOS API for platforms with no concept of SMBIOS

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2024-10-25 14:05:00 +01:00
parent 21940425c4
commit 33d80b1cd8
4 changed files with 67 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define ERRFILE_efi_path ( ERRFILE_CORE | 0x002b0000 )
#define ERRFILE_efi_mp ( ERRFILE_CORE | 0x002c0000 )
#define ERRFILE_efi_service ( ERRFILE_CORE | 0x002d0000 )
#define ERRFILE_null_smbios ( ERRFILE_CORE | 0x002e0000 )
#define ERRFILE_eisa ( ERRFILE_DRIVER | 0x00000000 )
#define ERRFILE_isa ( ERRFILE_DRIVER | 0x00010000 )

View File

@@ -0,0 +1,18 @@
#ifndef _IPXE_NULL_SMBIOS_H
#define _IPXE_NULL_SMBIOS_H
/** @file
*
* Null SMBIOS API
*
*/
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#ifdef SMBIOS_NULL
#define SMBIOS_PREFIX_null
#else
#define SMBIOS_PREFIX_null __null_
#endif
#endif /* _IPXE_NULL_SMBIOS_H */

View File

@@ -25,6 +25,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
PROVIDE_SINGLE_API ( SMBIOS_PREFIX_ ## _subsys, _api_func, _func )
/* Include all architecture-independent SMBIOS API headers */
#include <ipxe/null_smbios.h>
#include <ipxe/efi/efi_smbios.h>
#include <ipxe/linux/linux_smbios.h>