From 5340942440527b99423261ee230f71ce200b8c7c Mon Sep 17 00:00:00 2001 From: KATO Takenori Date: Sun, 3 Sep 2000 14:11:03 +0000 Subject: [PATCH] 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. --- sys/pc98/i386/machdep.c | 16 +++++++++++++++- 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 5d6472bedc8a..4253d5b199ed 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 #include +#if NACPI > 0 +#include +#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 5d6472bedc8a..4253d5b199ed 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 #include +#if NACPI > 0 +#include +#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;