void acpi_build_tables(struct acpi_config *config, unsigned int physical)
{
- struct acpi_info *acpi_info = (struct acpi_info *)ACPI_INFO_PHYSICAL_ADDRESS;
+ struct acpi_info *acpi_info;
struct acpi_20_rsdp *rsdp;
struct acpi_20_rsdt *rsdt;
struct acpi_20_xsdt *xsdt;
unsigned long secondary_tables[16];
int nr_secondaries, i;
+ /* Allocate and initialise the acpi info area. */
+ mem_hole_populate_ram(ACPI_INFO_PHYSICAL_ADDRESS >> PAGE_SHIFT, 1);
+ acpi_info = (struct acpi_info *)ACPI_INFO_PHYSICAL_ADDRESS;
memset(acpi_info, 0, sizeof(*acpi_info));
/*
Scope (\_SB)
{
- /* ACPI_INFO_PHYSICAL_ADDRESS == 0x9F000 */
- OperationRegion(BIOS, SystemMemory, 0x9F000, 24)
+ /* ACPI_INFO_PHYSICAL_ADDRESS == 0xFC000000 */
+ OperationRegion(BIOS, SystemMemory, 0xFC000000, 24)
Field(BIOS, ByteAcc, NoLock, Preserve) {
UAR1, 1,
UAR2, 1,
#define PCI_MEM_END 0xfc000000
extern unsigned long pci_mem_start, pci_mem_end;
-/* Reserved for special BIOS mappings, etc. */
-#define RESERVED_MEMBASE 0xfc000000
/* Memory map. */
#define SCRATCH_PHYSICAL_ADDRESS 0x00010000
#define HYPERCALL_PHYSICAL_ADDRESS 0x00080000
-#define ACPI_INFO_PHYSICAL_ADDRESS 0x0009F000
#define VGABIOS_PHYSICAL_ADDRESS 0x000C0000
#define HVMLOADER_PHYSICAL_ADDRESS 0x00100000
-
-#define ACPI_INFO_SIZE 0xC00
-#define ACPI_INFO_PHYSICAL_END (ACPI_INFO_PHYSICAL_ADDRESS + ACPI_INFO_SIZE)
+/* Special BIOS mappings, etc. are allocated from here upwards... */
+#define RESERVED_MEMBASE 0xFC000000
+/* NB. ACPI_INFO_PHYSICAL_ADDRESS *MUST* match definition in acpi/dsdt.asl! */
+#define ACPI_INFO_PHYSICAL_ADDRESS 0xFC000000
+#define RESERVED_MEMORY_DYNAMIC 0xFC001000
extern unsigned long scratch_start;
/* Lowmem must be at least 512K to keep Windows happy) */
ASSERT ( lowmem_reserved_base > 512<<10 );
+ ASSERT ( bios_image_base < 0x100000 );
+
/*
- * Lowmem reservation must either cover the ACPI info region
- * entirely or not at all. Sitting half way through suggests
- * something funny is going on.
+ * 0x0-lowmem_reserved_base: Ordinary RAM.
*/
- ASSERT ( lowmem_reserved_base < ACPI_INFO_PHYSICAL_ADDRESS ||
- lowmem_reserved_base > ACPI_INFO_PHYSICAL_END );
-
- ASSERT ( bios_image_base < 0x100000 );
+ e820[nr].addr = 0x00000;
+ e820[nr].size = lowmem_reserved_base;
+ e820[nr].type = E820_RAM;
+ nr++;
- if ( lowmem_reserved_base < ACPI_INFO_PHYSICAL_ADDRESS )
- {
- /*
- * 0x0-lowmem_reserved_base: Ordinary RAM.
- */
- e820[nr].addr = 0x00000;
- e820[nr].size = lowmem_reserved_base;
- e820[nr].type = E820_RAM;
- nr++;
- }
- else
+ /* lowmem_reserved_base-0xA0000: reserved by BIOS implementation. */
+ if ( lowmem_reserved_base < 0xA0000 )
{
- /* 0x0-ACPI_INFO: Ordinary RAM. */
- e820[nr].addr = 0x00000;
- e820[nr].size = ACPI_INFO_PHYSICAL_ADDRESS;
- e820[nr].type = E820_RAM;
- nr++;
-
- /* ACPI INFO: Reserved. */
- e820[nr].addr = ACPI_INFO_PHYSICAL_ADDRESS;
- e820[nr].size = ACPI_INFO_SIZE;
+ /* Reserved for internal use. */
+ e820[nr].addr = lowmem_reserved_base;
+ e820[nr].size = 0xA0000-lowmem_reserved_base;
e820[nr].type = E820_RESERVED;
nr++;
-
- /* ACPI_INFO-lowmem_reserved_base: Ordinary RAM. */
- e820[nr].addr = ACPI_INFO_PHYSICAL_END;
- e820[nr].size = lowmem_reserved_base - ACPI_INFO_PHYSICAL_END;
- e820[nr].type = E820_RAM;
- nr++;
- }
-
- /* lowmem_reserved_base-0xa00000: reserved by BIOS implementation. */
- if ( lowmem_reserved_base < 0xA0000 )
- {
- /* Reserved for internal use. */
- e820[nr].addr = lowmem_reserved_base;
- e820[nr].size = 0xA0000-lowmem_reserved_base;
- e820[nr].type = E820_RESERVED;
- nr++;
}
/*
{
/*
* 0x9E000-0x09F000: Stack.
- * 0x9F000-0x09C000: ACPI info.
* 0x9FC00-0x0A0000: Extended BIOS Data Area (EBDA).
* ...
* 0xE0000-0x0F0000: PC-specific area. We place various tables here.
}
}
-static uint32_t reserve = RESERVED_MEMBASE - 1;
+static uint32_t reserve = RESERVED_MEMORY_DYNAMIC - 1;
xen_pfn_t mem_hole_alloc(uint32_t nr_mfns)
{