diff options
-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; |