From cd4cccbcc702ccaab3a9c8bd5cfbfbacb4791085 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 29 Oct 2016 21:56:38 +0200 Subject: [PATCH] : Move the efi_next_descriptor() macro to . While here, rename efi_systbl to efi_systbl_phys and make it kernel only. Taken-from: FreeBSD --- sys/platform/pc64/x86_64/machdep.c | 3 --- sys/sys/efi.h | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/platform/pc64/x86_64/machdep.c b/sys/platform/pc64/x86_64/machdep.c index a7232d2f07..faa4790daa 100644 --- a/sys/platform/pc64/x86_64/machdep.c +++ b/sys/platform/pc64/x86_64/machdep.c @@ -1665,9 +1665,6 @@ add_smap_entries(int *physmap_idx) } } -#define efi_next_descriptor(ptr, size) \ - ((struct efi_md *)(((uint8_t *) ptr) + size)) - static void add_efi_map_entries(int *physmap_idx) { diff --git a/sys/sys/efi.h b/sys/sys/efi.h index 10748ca217..b9b6fad5da 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -85,6 +85,9 @@ struct efi_md { #define EFI_MD_ATTR_RT 0x8000000000000000UL }; +#define efi_next_descriptor(ptr, size) \ + ((struct efi_md *)(((uint8_t *)(ptr)) + (size))) + struct efi_tm { uint16_t tm_year; /* 1998 - 20XX */ uint8_t tm_mon; /* 1 - 12 */ @@ -151,5 +154,8 @@ struct efi_systbl { uint64_t st_cfgtbl; }; -extern vm_paddr_t efi_systbl; +#ifdef _KERNEL +extern vm_paddr_t efi_systbl_phys; +#endif /* _KERNEL */ + #endif /* _SYS_EFI_H_ */ -- 2.11.4.GIT