diff options
| author | Mike Smith <msmith@FreeBSD.org> | 2000-09-30 20:12:27 +0000 |
|---|---|---|
| committer | Mike Smith <msmith@FreeBSD.org> | 2000-09-30 20:12:27 +0000 |
| commit | 96f5284585e607865edb3e61d295e468e954afea (patch) | |
| tree | 05d4c764085fab48ce2fea8b4939df329194e6ef /sys/amd64 | |
| parent | bde5ba9dc0f0b25c209f5805090ca87988519ae1 (diff) | |
Notes
Diffstat (limited to 'sys/amd64')
| -rw-r--r-- | sys/amd64/amd64/bios.c | 25 | ||||
| -rw-r--r-- | sys/amd64/amd64/machdep.c | 28 | ||||
| -rw-r--r-- | sys/amd64/include/pc/bios.h | 13 |
3 files changed, 17 insertions, 49 deletions
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c index 18f498941231..56880eaa2bc4 100644 --- a/sys/amd64/amd64/bios.c +++ b/sys/amd64/amd64/bios.c @@ -31,7 +31,6 @@ * Code for dealing with the BIOS in x86 PC systems. */ -#include "acpi.h" #include "isa.h" #include <sys/param.h> @@ -50,10 +49,6 @@ #include <isa/pnpreg.h> #include <isa/pnpvar.h> -#if NACPI > 0 -#include <sys/acpi.h> -#endif - #define BIOS_START 0xe0000 #define BIOS_SIZE 0x20000 @@ -148,26 +143,6 @@ bios32_init(void *junk) printf("pnpbios: Bad PnP BIOS data checksum\n"); } } -#if NACPI > 0 - /* - * ACPI BIOS - * acpi_rsdp is GLOBAL and holds RSD PTR signature - */ - if ((sigaddr = bios_sigsearch(0, "RSD PTR ", 8, 16, 0)) != 0) { - /* get a virtual pointer to the structure */ - acpi_rsdp = (struct ACPIrsdp *)(uintptr_t)BIOS_PADDRTOVADDR(sigaddr); - for (cv = (u_int8_t *)acpi_rsdp, ck = 0, i = 0; i < sizeof(struct ACPIrsdp); i++) { - ck += cv[i]; - } - - /* If checksum is NG, disable it */ - if (ck != 0) { - printf("ACPI: Bad ACPI BIOS data checksum\n"); - acpi_rsdp=NULL;/* 0xa0000<=RSD_PTR<0x100000*/ - } - } -#endif - if (bootverbose) { /* look for other know signatures */ printf("Other BIOS signatures found:\n"); diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 69e241a8607f..4fb4c456e287 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -37,7 +37,6 @@ * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD$ */ -#include "acpi.h" #include "apm.h" #include "npx.h" #include "opt_atalk.h" @@ -100,6 +99,7 @@ #include <machine/ipl.h> #include <machine/md_var.h> #include <machine/mutex.h> +#include <machine/pc/bios.h> #include <machine/pcb_ext.h> /* pcb.h included via sys/user.h */ #include <machine/globaldata.h> #include <machine/globals.h> @@ -120,10 +120,6 @@ #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)); @@ -1457,11 +1453,7 @@ getmemsize(int first) vm_offset_t pa, physmap[PHYSMAP_SIZE]; pt_entry_t pte; const char *cp; - struct { - u_int64_t base; - u_int64_t length; - u_int32_t type; - } *smap; + struct bios_smap *smap; bzero(&vmf, sizeof(struct vm86frame)); bzero(physmap, sizeof(physmap)); @@ -1521,22 +1513,16 @@ getmemsize(int first) /* * get memory map with INT 15:E820 */ -#define SMAPSIZ sizeof(*smap) -#define SMAP_SIG 0x534D4150 /* 'SMAP' */ - vmc.npages = 0; 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 { vmf.vmf_eax = 0xE820; vmf.vmf_edx = SMAP_SIG; - vmf.vmf_ecx = SMAPSIZ; + vmf.vmf_ecx = sizeof(struct bios_smap); i = vm86_datacall(0x15, &vmf, &vmc); if (i || vmf.vmf_eax != SMAP_SIG) break; @@ -1547,13 +1533,7 @@ 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/amd64/include/pc/bios.h b/sys/amd64/include/pc/bios.h index 1d8b893dcd55..9df5a0dcaae6 100644 --- a/sys/amd64/include/pc/bios.h +++ b/sys/amd64/include/pc/bios.h @@ -218,3 +218,16 @@ extern int bios16(struct bios_args *, char *, ...); extern int bios16_call(struct bios_regs *, char *); extern int bios32(struct bios_regs *, u_int, u_short); extern void set_bios_selectors(struct bios_segments *, int); + +/* + * Int 15:E820 'SMAP' structure + * + * XXX add constants for type + */ +#define SMAP_SIG 0x534D4150 /* 'SMAP' */ +struct bios_smap { + u_int64_t base; + u_int64_t length; + u_int32_t type; +} __attribute__ ((packed)); + |
