From 50da29d25b394e3f2850b51d45cafc1d935871f1 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Fri, 23 Mar 2018 02:45:09 +0000 Subject: [PATCH] efidev: Drop a quick note in about efi_cfgtbl/efi_runtime There's no real annotation for it, so it's not immediately obvious to the unfamiliar that these pointers are to locations in the EFI runtime map unlike the system table pointer immediately above them. --- sys/dev/efidev/efirt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index 4015444ef17c..adb4e79c354b 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -57,6 +57,11 @@ __FBSDID("$FreeBSD$"); #include static struct efi_systbl *efi_systbl; +/* + * The following pointers point to tables in the EFI runtime service data pages. + * Care should be taken to make sure that we've properly entered the EFI runtime + * environment (efi_enter()) before dereferencing them. + */ static struct efi_cfgtbl *efi_cfgtbl; static struct efi_rt *efi_runtime;