diff options
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/nexus.c | 2 | ||||
-rw-r--r-- | sys/amd64/include/pc/bios.h | 10 |
3 files changed, 10 insertions, 4 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 7252386..d79e87f 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -881,7 +881,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) printf("SMAP type=%02x base=%016lx len=%016lx\n", smap->type, smap->base, smap->length); - if (smap->type != 0x01) + if (smap->type != SMAP_TYPE_MEMORY) continue; if (smap->length == 0) diff --git a/sys/amd64/amd64/nexus.c b/sys/amd64/amd64/nexus.c index b5498b7..54d9e5f 100644 --- a/sys/amd64/amd64/nexus.c +++ b/sys/amd64/amd64/nexus.c @@ -587,7 +587,7 @@ ram_attach(device_t dev) rid = 0; for (smap = smapbase; smap < smapend; smap++) { - if (smap->type != 0x01 || smap->length == 0) + if (smap->type != SMAP_TYPE_MEMORY || smap->length == 0) continue; error = bus_set_resource(dev, SYS_RES_MEMORY, rid, smap->base, smap->length); diff --git a/sys/amd64/include/pc/bios.h b/sys/amd64/include/pc/bios.h index ffad369..782d4bf 100644 --- a/sys/amd64/include/pc/bios.h +++ b/sys/amd64/include/pc/bios.h @@ -38,10 +38,16 @@ extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen, /* * Int 15:E820 'SMAP' structure - * - * XXX add constants for type */ + #define SMAP_SIG 0x534D4150 /* 'SMAP' */ + +#define SMAP_TYPE_MEMORY 1 +#define SMAP_TYPE_RESERVED 2 +#define SMAP_TYPE_ACPI_RECLAIM 3 +#define SMAP_TYPE_ACPI_NVS 4 +#define SMAP_TYPE_ACPI_ERROR 5 + struct bios_smap { u_int64_t base; u_int64_t length; |