diff options
author | jhb <jhb@FreeBSD.org> | 2008-03-21 15:34:39 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-03-21 15:34:39 +0000 |
commit | 303513927da71ddd45e86cae9835a0042b270442 (patch) | |
tree | 29da7d4dfd2af1b67dd183e3d42340ae3046c0a5 /sys/i386 | |
parent | d3daa7de751aaab660373c4f551cc81d4be6c569 (diff) | |
download | FreeBSD-src-303513927da71ddd45e86cae9835a0042b270442.zip FreeBSD-src-303513927da71ddd45e86cae9835a0042b270442.tar.gz |
MFC: Add constants for the different memory types in the SMAP table and
use the SMAP types and constants from <machine/pc/bios.h> in the boot code.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/machdep.c | 2 | ||||
-rw-r--r-- | sys/i386/include/pc/bios.h | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 30584da..d7a355a 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1770,7 +1770,7 @@ int15e820: smap->type, smap->base, smap->length); has_smap = 1; - if (smap->type != 0x01) + if (smap->type != SMAP_TYPE_MEMORY) continue; if (smap->length == 0) diff --git a/sys/i386/include/pc/bios.h b/sys/i386/include/pc/bios.h index 4533de7..ca06024 100644 --- a/sys/i386/include/pc/bios.h +++ b/sys/i386/include/pc/bios.h @@ -271,10 +271,16 @@ struct PIR_table /* * 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; |