summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-05-16 09:42:19 -0600
committerAlexander Graf <agraf@suse.de>2018-06-03 15:27:21 +0200
commit0864c565a274ddbc23dda667d71524e7efbbef8f (patch)
tree14e67fed8a5e51e36b5f1017defe1178914bb4b2 /lib
parent85b469215f8e6b5566eb06fe970276344a56c7f4 (diff)
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_smbios.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_smbios.c b/lib/efi_loader/efi_smbios.c
index 482436e2ad..7c3fc8af0b 100644
--- a/lib/efi_loader/efi_smbios.c
+++ b/lib/efi_loader/efi_smbios.c
@@ -29,7 +29,12 @@ efi_status_t efi_smbios_register(void)
if (ret != EFI_SUCCESS)
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);
/* And expose them to our EFI payload */