Files
xen/tools/firmware/rombios/config.h
T
Ian Campbell d22b23ec11 hvmloader: reinstate datastructure shared with DSDT in SeaBIOS case.
I mistakenly thought that the "struct bios_info" was a ROMBIOS
specific data structure and so caused it to be populated only in the
ROMBIOS case.

However it turns out that the majority of the struct's fields are
actually referenced from the ACPI DSDT and hence are needed for
SeaBIOS too.

While in principal it might have been possible to continue to mix
ROMBIOS and ACPI bits in this datastructure this is, evidently,
confusing but also leads to header file dependencies from
ROMBIOS->hvmloader which I had been hoping to avoid so as to head-off
future accidental re-entanglement of ROMBIOS and hvmloader.

So instead I have split the ACPI parts into a new "struct acpi_info"
which is defined entirely within the acpi building code in hvmloader
and which comes with a big comment pointing to the DSDT interaction.

This new ACPI info is placed at 0x9F000 which is available under both
ROMBIOS and SeaBIOS. This address is in a reserved region of the E820
and is just above the ROMBIOS stack.

The resulting "struct rombios_info" is hardly worthy of its own
structure but keep it anyway.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2011-06-03 17:22:51 +01:00

37 lines
1.1 KiB
C

#ifndef _ROMBIOS_CONFIG_H
#define _ROMBIOS_CONFIG_H
/* Memory map. */
#define LOWHEAP_PHYSICAL_ADDRESS 0x00010000
#define LOWHEAP_SIZE 0x00070000
#define OPTIONROM_PHYSICAL_ADDRESS 0x000C8000
#define OPTIONROM_PHYSICAL_END 0x000EA000
#define BIOS_INFO_PHYSICAL_ADDRESS 0x000EA000
#define ACPI_PHYSICAL_ADDRESS 0x000EA020
#define E820_PHYSICAL_ADDRESS 0x000EA100
#define SMBIOS_PHYSICAL_ADDRESS 0x000EB000
#define SMBIOS_PHYSICAL_END 0x000F0000
#define ROMBIOS_PHYSICAL_ADDRESS 0x000F0000
/* Offsets from E820_PHYSICAL_ADDRESS. */
#define E820_NR_OFFSET 0x0
#define E820_OFFSET 0x8
#define E820_NR ((uint16_t *)(E820_PHYSICAL_ADDRESS + E820_NR_OFFSET))
#define E820 ((struct e820entry *)(E820_PHYSICAL_ADDRESS + E820_OFFSET))
/* Xen Platform Device */
#define XEN_PF_IOBASE 0x10
#define PFFLAG_ROM_LOCK 1 /* Sets whether ROM memory area is RW or RO */
/* Located at BIOS_INFO_PHYSICAL_ADDRESS. */
struct rombios_info {
uint32_t bios32_entry; /* 0 - Entry point for 32-bit BIOS */
};
#define BIOSINFO_OFF_bios32_entry 0
#endif