mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 04:44:46 +00:00
efi: Update some comments related to smbios tables
Clarify the operation of this code with some additional comments. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
85b469215f
commit
0864c565a2
3 changed files with 16 additions and 3 deletions
|
@ -214,6 +214,13 @@ efi_status_t efi_net_register(void);
|
||||||
/* Called by bootefi to make the watchdog available */
|
/* Called by bootefi to make the watchdog available */
|
||||||
efi_status_t efi_watchdog_register(void);
|
efi_status_t efi_watchdog_register(void);
|
||||||
/* Called by bootefi to make SMBIOS tables available */
|
/* Called by bootefi to make SMBIOS tables available */
|
||||||
|
/**
|
||||||
|
* efi_smbios_register() - write out SMBIOS tables
|
||||||
|
*
|
||||||
|
* Called by bootefi to make SMBIOS tables available
|
||||||
|
*
|
||||||
|
* @return 0 if OK, -ENOMEM if no memory is available for the tables
|
||||||
|
*/
|
||||||
efi_status_t efi_smbios_register(void);
|
efi_status_t efi_smbios_register(void);
|
||||||
|
|
||||||
struct efi_simple_file_system_protocol *
|
struct efi_simple_file_system_protocol *
|
||||||
|
|
|
@ -231,8 +231,9 @@ typedef int (*smbios_write_type)(ulong *addr, int handle);
|
||||||
*
|
*
|
||||||
* This writes SMBIOS table at a given address.
|
* This writes SMBIOS table at a given address.
|
||||||
*
|
*
|
||||||
* @addr: start address to write SMBIOS table
|
* @addr: start address to write SMBIOS table. If this is not
|
||||||
* @return: end address of SMBIOS table
|
* 16-byte-aligned then it will be aligned before the table is written
|
||||||
|
* @return: end address of SMBIOS table (and start address for next entry)
|
||||||
*/
|
*/
|
||||||
ulong write_smbios_table(ulong addr);
|
ulong write_smbios_table(ulong addr);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,12 @@ efi_status_t efi_smbios_register(void)
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Generate SMBIOS tables */
|
/*
|
||||||
|
* Generate SMBIOS tables - we know that efi_allocate_pages() returns
|
||||||
|
* a 4k-aligned address, so it is safe to assume that
|
||||||
|
* write_smbios_table() will write the table at that address.
|
||||||
|
*/
|
||||||
|
assert(!(dmi & 0xf));
|
||||||
write_smbios_table(dmi);
|
write_smbios_table(dmi);
|
||||||
|
|
||||||
/* And expose them to our EFI payload */
|
/* And expose them to our EFI payload */
|
||||||
|
|
Loading…
Add table
Reference in a new issue