diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 9007c122e345..26c6e0fcc3e2 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1090,7 +1090,8 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, "ACPIMemoryNVS", "MemoryMappedIO", "MemoryMappedIOPortSpace", - "PalCode" + "PalCode", + "PersistentMemory" }; /* @@ -1111,7 +1112,7 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, for (i = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, efihdr->descriptor_size)) { if (boothowto & RB_VERBOSE) { - if (p->md_type <= EFI_MD_TYPE_PALCODE) + if (p->md_type < nitems(types)) type = types[p->md_type]; else type = ""; @@ -1133,6 +1134,12 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, printf("RP "); if (p->md_attr & EFI_MD_ATTR_XP) printf("XP "); + if (p->md_attr & EFI_MD_ATTR_NV) + printf("NV "); + if (p->md_attr & EFI_MD_ATTR_MORE_RELIABLE) + printf("MORE_RELIABLE "); + if (p->md_attr & EFI_MD_ATTR_RO) + printf("RO "); if (p->md_attr & EFI_MD_ATTR_RT) printf("RUNTIME"); printf("\n"); diff --git a/sys/amd64/include/pc/bios.h b/sys/amd64/include/pc/bios.h index 1dbf110219be..32bbf1639269 100644 --- a/sys/amd64/include/pc/bios.h +++ b/sys/amd64/include/pc/bios.h @@ -40,6 +40,9 @@ #define SMAP_TYPE_ACPI_RECLAIM 3 #define SMAP_TYPE_ACPI_NVS 4 #define SMAP_TYPE_ACPI_ERROR 5 +#define SMAP_TYPE_DISABLED 6 +#define SMAP_TYPE_PMEM 7 +#define SMAP_TYPE_PRAM 12 #define SMAP_XATTR_ENABLED 0x00000001 #define SMAP_XATTR_NON_VOLATILE 0x00000002 diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 960fa6a37f03..932526f89b98 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -1424,7 +1424,8 @@ add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, "ACPIMemoryNVS", "MemoryMappedIO", "MemoryMappedIOPortSpace", - "PalCode" + "PalCode", + "PersistentMemory" }; *mrcnt = 0; @@ -1448,7 +1449,7 @@ add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, for (i = 0, j = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, efihdr->descriptor_size)) { if (boothowto & RB_VERBOSE) { - if (p->md_type <= EFI_MD_TYPE_PALCODE) + if (p->md_type < nitems(types)) type = types[p->md_type]; else type = ""; @@ -1470,6 +1471,12 @@ add_efi_map_entries(struct efi_map_header *efihdr, struct mem_region *mr, printf("RP "); if (p->md_attr & EFI_MD_ATTR_XP) printf("XP "); + if (p->md_attr & EFI_MD_ATTR_NV) + printf("NV "); + if (p->md_attr & EFI_MD_ATTR_MORE_RELIABLE) + printf("MORE_RELIABLE "); + if (p->md_attr & EFI_MD_ATTR_RO) + printf("RO "); if (p->md_attr & EFI_MD_ATTR_RT) printf("RUNTIME"); printf("\n"); diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c index 9d4cfb151636..19d398192924 100644 --- a/sys/arm64/arm64/machdep.c +++ b/sys/arm64/arm64/machdep.c @@ -707,7 +707,8 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, "ACPIMemoryNVS", "MemoryMappedIO", "MemoryMappedIOPortSpace", - "PalCode" + "PalCode", + "PersistentMemory" }; /* @@ -728,7 +729,7 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, for (i = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, efihdr->descriptor_size)) { if (boothowto & RB_VERBOSE) { - if (p->md_type <= EFI_MD_TYPE_PALCODE) + if (p->md_type < nitems(types)) type = types[p->md_type]; else type = ""; @@ -750,6 +751,12 @@ add_efi_map_entries(struct efi_map_header *efihdr, vm_paddr_t *physmap, printf("RP "); if (p->md_attr & EFI_MD_ATTR_XP) printf("XP "); + if (p->md_attr & EFI_MD_ATTR_NV) + printf("NV "); + if (p->md_attr & EFI_MD_ATTR_MORE_RELIABLE) + printf("MORE_RELIABLE "); + if (p->md_attr & EFI_MD_ATTR_RO) + printf("RO "); if (p->md_attr & EFI_MD_ATTR_RT) printf("RUNTIME"); printf("\n"); diff --git a/sys/i386/include/pc/bios.h b/sys/i386/include/pc/bios.h index d1d8caff4a61..355dc615ecd0 100644 --- a/sys/i386/include/pc/bios.h +++ b/sys/i386/include/pc/bios.h @@ -210,6 +210,9 @@ struct PIR_table #define SMAP_TYPE_ACPI_RECLAIM 3 #define SMAP_TYPE_ACPI_NVS 4 #define SMAP_TYPE_ACPI_ERROR 5 +#define SMAP_TYPE_DISABLED 6 +#define SMAP_TYPE_PMEM 7 +#define SMAP_TYPE_PRAM 12 #define SMAP_XATTR_ENABLED 0x00000001 #define SMAP_XATTR_NON_VOLATILE 0x00000002 diff --git a/sys/sys/efi.h b/sys/sys/efi.h index a4ffeb02a49b..3bdcdc384dbe 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -69,6 +69,7 @@ struct efi_md { #define EFI_MD_TYPE_IOMEM 11 /* Memory-mapped I/O. */ #define EFI_MD_TYPE_IOPORT 12 /* I/O port space. */ #define EFI_MD_TYPE_PALCODE 13 /* PAL */ +#define EFI_MD_TYPE_PERSISTENT 14 /* Persistent memory. */ uint32_t __pad; uint64_t md_phys; void *md_virt; @@ -82,6 +83,10 @@ struct efi_md { #define EFI_MD_ATTR_WP 0x0000000000001000UL #define EFI_MD_ATTR_RP 0x0000000000002000UL #define EFI_MD_ATTR_XP 0x0000000000004000UL +#define EFI_MD_ATTR_NV 0x0000000000008000UL +#define EFI_MD_ATTR_MORE_RELIABLE \ + 0x0000000000010000UL +#define EFI_MD_ATTR_RO 0x0000000000020000UL #define EFI_MD_ATTR_RT 0x8000000000000000UL };