summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2009-04-15 17:31:22 +0000
committerjkim <jkim@FreeBSD.org>2009-04-15 17:31:22 +0000
commite8cee11d8da15a3ce5f89e6ccbfb680794814d57 (patch)
tree42347e17b226dd42a13dd0a4b0ea3697313e1f46 /sys/amd64
parentd83ff0154faefe4a4c8fe9f7e7ea79df1f4c39da (diff)
downloadFreeBSD-src-e8cee11d8da15a3ce5f89e6ccbfb680794814d57.zip
FreeBSD-src-e8cee11d8da15a3ce5f89e6ccbfb680794814d57.tar.gz
A simple rewrite of biossmap.c:
- Do not iterate int 15h, function e820h twice. Instead, we use STAILQ to store each return buffer and copy all at once. - Export optional extended attributes defined in ACPI 3.0 as separate metadata. Currently, there are only two bits defined in the specification. For example, if the descriptor has extended attributes and it is not enabled, it has to be ignored by OS. We may implement it in the kernel later if it is necessary and proven correct in reality. - Check return buffer size strictly as suggested in ACPI 3.0. Reviewed by: jhb
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/include/metadata.h1
-rw-r--r--sys/amd64/include/pc/bios.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/include/metadata.h b/sys/amd64/include/metadata.h
index 84e6f87..4c7ec9e 100644
--- a/sys/amd64/include/metadata.h
+++ b/sys/amd64/include/metadata.h
@@ -30,5 +30,6 @@
#define _MACHINE_METADATA_H_
#define MODINFOMD_SMAP 0x1001
+#define MODINFOMD_SMAP_XATTR 0x1002
#endif /* !_MACHINE_METADATA_H_ */
diff --git a/sys/amd64/include/pc/bios.h b/sys/amd64/include/pc/bios.h
index 782d4bf..364f86c 100644
--- a/sys/amd64/include/pc/bios.h
+++ b/sys/amd64/include/pc/bios.h
@@ -48,6 +48,10 @@ extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen,
#define SMAP_TYPE_ACPI_NVS 4
#define SMAP_TYPE_ACPI_ERROR 5
+#define SMAP_XATTR_ENABLED 0x00000001
+#define SMAP_XATTR_NON_VOLATILE 0x00000002
+#define SMAP_XATTR_MASK (SMAP_XATTR_ENABLED | SMAP_XATTR_NON_VOLATILE)
+
struct bios_smap {
u_int64_t base;
u_int64_t length;
OpenPOWER on IntegriCloud