Patch by Dustin Howett (GSOC): Move ACPI probing out of the
bootloader's smp init and into its own unit. ACPI tables can now generally be found with acpi_find_table(signature). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26538 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+17
-16
@@ -1,9 +1,10 @@
|
||||
/*
|
||||
* Copyright 2008, Dustin Howett, dustin.howett@gmail.com. All rights reserved.
|
||||
* Copyright 2007, Michael Lotz, mmlr@mlotz.ch. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_x86_SMP_ACPI_H
|
||||
#define _KERNEL_ARCH_x86_SMP_ACPI_H
|
||||
#ifndef _KERNEL_ARCH_x86_ARCH_ACPI_H
|
||||
#define _KERNEL_ARCH_x86_ARCH_ACPI_H
|
||||
|
||||
#define ACPI_RSDP_SIGNATURE "RSD PTR "
|
||||
#define ACPI_RSDT_SIGNATURE "RSDT"
|
||||
@@ -11,7 +12,7 @@
|
||||
|
||||
#define ACPI_LOCAL_APIC_ENABLED 0x01
|
||||
|
||||
struct acpi_rsdp {
|
||||
typedef struct acpi_rsdp {
|
||||
char signature[8]; /* "RSD PTR " including blank */
|
||||
uint8 checksum; /* checksum of bytes 0-19 (per ACPI 1.0) */
|
||||
char oem_id[6]; /* not null terminated */
|
||||
@@ -21,9 +22,9 @@ struct acpi_rsdp {
|
||||
uint64 xsdt_address; /* 64bit physical memory address of XSDT */
|
||||
uint8 extended_checksum; /* including entire table */
|
||||
uint8 reserved[3];
|
||||
} _PACKED;
|
||||
} _PACKED acpi_rsdp;
|
||||
|
||||
struct acpi_descriptor_header {
|
||||
typedef struct acpi_descriptor_header {
|
||||
char signature[4]; /* table identifier as ASCII string */
|
||||
uint32 length; /* length in bytes of the entire table */
|
||||
uint8 revision;
|
||||
@@ -33,39 +34,39 @@ struct acpi_descriptor_header {
|
||||
uint32 oem_revision; /* oem supplied revision number */
|
||||
char creator_id[4]; /* creator / asl compiler id */
|
||||
uint32 creator_revision; /* compiler revision */
|
||||
} _PACKED;
|
||||
} _PACKED acpi_descriptor_header;
|
||||
|
||||
struct acpi_madt {
|
||||
acpi_descriptor_header header; /* "APIC" signature */
|
||||
typedef struct acpi_madt {
|
||||
acpi_descriptor_header header; /* "APIC" signature */
|
||||
uint32 local_apic_address; /* physical address for local CPUs APICs */
|
||||
uint32 flags;
|
||||
} _PACKED;
|
||||
} _PACKED acpi_madt;
|
||||
|
||||
enum {
|
||||
ACPI_MADT_LOCAL_APIC = 0,
|
||||
ACPI_MADT_IO_APIC = 1
|
||||
};
|
||||
|
||||
struct acpi_apic {
|
||||
typedef struct acpi_apic {
|
||||
uint8 type;
|
||||
uint8 length;
|
||||
} _PACKED;
|
||||
} _PACKED acpi_apic;
|
||||
|
||||
struct acpi_local_apic {
|
||||
typedef struct acpi_local_apic {
|
||||
uint8 type; /* 0 = processor local APIC */
|
||||
uint8 length; /* 8 bytes */
|
||||
uint8 acpi_processor_id;
|
||||
uint8 apic_id; /* the id of this APIC */
|
||||
uint32 flags; /* 1 = enabled */
|
||||
} _PACKED;
|
||||
} _PACKED acpi_local_apic;
|
||||
|
||||
struct acpi_io_apic {
|
||||
typedef struct acpi_io_apic {
|
||||
uint8 type; /* 1 = I/O APIC */
|
||||
uint8 length; /* 12 bytes */
|
||||
uint8 io_apic_id; /* the id of this APIC */
|
||||
uint8 reserved;
|
||||
uint32 io_apic_address; /* phyisical address of I/O APIC */
|
||||
uint32 interrupt_base; /* global system interrupt base */
|
||||
} _PACKED;
|
||||
} _PACKED acpi_io_apic;
|
||||
|
||||
#endif /* _KERNEL_ARCH_x86_SMP_ACPI_H */
|
||||
#endif /* _KERNEL_ARCH_x86_ARCH_ACPI_H */
|
||||
+4
-3
@@ -1,12 +1,13 @@
|
||||
/*
|
||||
* Copyright 2008, Dustin Howett, dustin.howett@gmail.com. All rights reserved.
|
||||
* Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
* Distributed under the terms of the NewOS License.
|
||||
*/
|
||||
#ifndef _KERNEL_ARCH_x86_SMP_APIC_H
|
||||
#define _KERNEL_ARCH_x86_SMP_APIC_H
|
||||
#ifndef _KERNEL_ARCH_x86_ARCH_APIC_H
|
||||
#define _KERNEL_ARCH_x86_ARCH_APIC_H
|
||||
|
||||
#define MP_FLOATING_SIGNATURE '_PM_'
|
||||
#define MP_CONFIG_TABLE_SIGNATURE 'PCMP'
|
||||
@@ -191,4 +192,4 @@ enum {
|
||||
MP_INTR_TYPE_ExtINT,
|
||||
};
|
||||
|
||||
#endif /* _KERNEL_ARCH_x86_SMP_APIC_H */
|
||||
#endif /* _KERNEL_ARCH_x86_ARCH_APIC_H */
|
||||
Reference in New Issue
Block a user