diff options
author | kato <kato@FreeBSD.org> | 2000-09-03 14:11:03 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 2000-09-03 14:11:03 +0000 |
commit | 8804903d0e8aa72e4c60d2610f671d4f2ec1e514 (patch) | |
tree | 1271b52a32857b873c521b95c970efce8fe5095a /sys/pc98 | |
parent | f729518373a69a6b7ad1a54c1bd21cd6aaec7035 (diff) | |
download | FreeBSD-src-8804903d0e8aa72e4c60d2610f671d4f2ec1e514.zip FreeBSD-src-8804903d0e8aa72e4c60d2610f671d4f2ec1e514.tar.gz |
Merged from sys/i386/i386/machdep.c rev. 1.404 just for keeping
similarity. No PC-98 may have ACPI feature, but I'm not 100%
sure.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/i386/machdep.c | 16 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 16 |
2 files changed, 30 insertions, 2 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 5d6472b..4253d5b 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -38,6 +38,7 @@ * $FreeBSD$ */ +#include "acpi.h" #include "apm.h" #include "npx.h" #include "opt_atalk.h" @@ -121,6 +122,10 @@ #include <sys/ptrace.h> #include <machine/sigframe.h> +#if NACPI > 0 +#include <sys/acpi.h> +#endif + extern void init386 __P((int first)); extern void dblfault_handler __P((void)); @@ -1777,6 +1782,9 @@ getmemsize(int first) smap = (void *)vm86_addpage(&vmc, 1, KERNBASE + (1 << PAGE_SHIFT)); vm86_getptr(&vmc, (vm_offset_t)smap, &vmf.vmf_es, &vmf.vmf_di); +#if NACPI > 0 + acpi_init_addr_range(); +#endif physmap_idx = 0; vmf.vmf_ebx = 0; do { @@ -1793,7 +1801,13 @@ getmemsize(int first) (u_int32_t)smap->base, *(u_int32_t *)((char *)&smap->length + 4), (u_int32_t)smap->length); - +#if NACPI > 0 + /* Save ACPI related memory Info */ + if (smap->type == 0x03 || smap->type == 0x04) { + acpi_register_addr_range(smap->base, + smap->length, smap->type); + } +#endif if (smap->type != 0x01) goto next_run; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 5d6472b..4253d5b 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -38,6 +38,7 @@ * $FreeBSD$ */ +#include "acpi.h" #include "apm.h" #include "npx.h" #include "opt_atalk.h" @@ -121,6 +122,10 @@ #include <sys/ptrace.h> #include <machine/sigframe.h> +#if NACPI > 0 +#include <sys/acpi.h> +#endif + extern void init386 __P((int first)); extern void dblfault_handler __P((void)); @@ -1777,6 +1782,9 @@ getmemsize(int first) smap = (void *)vm86_addpage(&vmc, 1, KERNBASE + (1 << PAGE_SHIFT)); vm86_getptr(&vmc, (vm_offset_t)smap, &vmf.vmf_es, &vmf.vmf_di); +#if NACPI > 0 + acpi_init_addr_range(); +#endif physmap_idx = 0; vmf.vmf_ebx = 0; do { @@ -1793,7 +1801,13 @@ getmemsize(int first) (u_int32_t)smap->base, *(u_int32_t *)((char *)&smap->length + 4), (u_int32_t)smap->length); - +#if NACPI > 0 + /* Save ACPI related memory Info */ + if (smap->type == 0x03 || smap->type == 0x04) { + acpi_register_addr_range(smap->base, + smap->length, smap->type); + } +#endif if (smap->type != 0x01) goto next_run; |