mirror of
https://github.com/ipxe/ipxe
synced 2026-01-24 21:24:47 +03:00
[efi] Add support for installing EFI configuration tables
Add the ability to install and uninstall arbitrary EFI configuration tables. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
37
src/include/ipxe/efi/efi_table.h
Normal file
37
src/include/ipxe/efi/efi_table.h
Normal file
@@ -0,0 +1,37 @@
|
||||
#ifndef _IPXE_EFI_TABLE_H
|
||||
#define _IPXE_EFI_TABLE_H
|
||||
|
||||
/** @file
|
||||
*
|
||||
* EFI configuration tables
|
||||
*
|
||||
*/
|
||||
|
||||
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <ipxe/efi/efi.h>
|
||||
|
||||
/** An installable EFI configuration table type */
|
||||
struct efi_table {
|
||||
/** Table GUID */
|
||||
EFI_GUID *guid;
|
||||
/**
|
||||
* Determine length of table
|
||||
*
|
||||
* @v data Configuration table data (presumed valid)
|
||||
* @ret len Length of table
|
||||
*
|
||||
* EFI does not record the length of installed configuration
|
||||
* tables. Consumers must understand the specific type of
|
||||
* table in order to be able to determine its length from the
|
||||
* contents.
|
||||
*/
|
||||
size_t ( * len ) ( const void *data );
|
||||
};
|
||||
|
||||
extern void * efi_find_table ( EFI_GUID *guid );
|
||||
extern int efi_install_table ( struct efi_table *table, const void *data,
|
||||
void **backup );
|
||||
extern int efi_uninstall_table ( struct efi_table *table, void **backup );
|
||||
|
||||
#endif /* _IPXE_EFI_TABLE_H */
|
||||
@@ -85,6 +85,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
#define ERRFILE_efi_service ( ERRFILE_CORE | 0x002d0000 )
|
||||
#define ERRFILE_null_smbios ( ERRFILE_CORE | 0x002e0000 )
|
||||
#define ERRFILE_efi_open ( ERRFILE_CORE | 0x002f0000 )
|
||||
#define ERRFILE_efi_table ( ERRFILE_CORE | 0x00300000 )
|
||||
|
||||
#define ERRFILE_eisa ( ERRFILE_DRIVER | 0x00000000 )
|
||||
#define ERRFILE_isa ( ERRFILE_DRIVER | 0x00010000 )
|
||||
|
||||
Reference in New Issue
Block a user