loader: Update the memory address of GUEST_CFG_OFFSET

GUEST_CFG_OFFSET is used to pass the memory top info from DM
to HV. The address should be in E820 reserved range to prevent
guest use it for other purpose.

Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Yin Fengwei 2018-07-05 11:26:22 +08:00 committed by lijinxia
parent a91952d3d4
commit 76662a634f
3 changed files with 14 additions and 14 deletions

View File

@ -50,8 +50,8 @@ static char bootargs[STR_LEN];
* ctx->highmem = request_memory_size - ctx->lowmem_limit * ctx->highmem = request_memory_size - ctx->lowmem_limit
* *
* Begin End Type Length * Begin End Type Length
* 0: 0 - 0xF0000 RAM 0xF0000 * 0: 0 - 0xef000 RAM 0xEF000
* 1 0xf0000 - 0x100000 (reserved) 0x10000 * 1 0xef000 - 0x100000 (reserved) 0x11000
* 2 0x100000 - lowmem RAM lowmem - 0x100000 * 2 0x100000 - lowmem RAM lowmem - 0x100000
* 3: lowmem - bff_fffff (reserved) 0xc00_00000-lowmem * 3: lowmem - bff_fffff (reserved) 0xc00_00000-lowmem
* 4: 0xc00_00000 - dff_fffff PCI hole 512MB * 4: 0xc00_00000 - dff_fffff PCI hole 512MB
@ -61,13 +61,13 @@ static char bootargs[STR_LEN];
const struct e820_entry e820_default_entries[NUM_E820_ENTRIES] = { const struct e820_entry e820_default_entries[NUM_E820_ENTRIES] = {
{ /* 0 to mptable/smbios/acpi */ { /* 0 to mptable/smbios/acpi */
.baseaddr = 0x00000000, .baseaddr = 0x00000000,
.length = 0xF0000, .length = 0xEF000,
.type = E820_TYPE_RAM .type = E820_TYPE_RAM
}, },
{ /* mptable/smbios/acpi to lowmem */ { /* guest_cfg_addr/mptable/smbios/acpi to lowmem */
.baseaddr = 0xF0000, .baseaddr = 0xEF000,
.length = 0x10000, .length = 0x11000,
.type = E820_TYPE_RESERVED .type = E820_TYPE_RESERVED
}, },

View File

@ -282,11 +282,11 @@ struct acrn_vm_pci_msix_remap {
* It's designed to support passing DM config data pointer, based on it, * It's designed to support passing DM config data pointer, based on it,
* hypervisor would parse then pass DM defined configuration to GUEST VCPU * hypervisor would parse then pass DM defined configuration to GUEST VCPU
* when booting guest VM. * when booting guest VM.
* the address 0xd0000 here is designed by DM, as it arranged all memory * the address 0xef000 here is designed by DM, as it arranged all memory
* layout below 1M, DM should make sure there is no overlap for the address * layout below 1M, DM add this address to E280 reserved range to make sure
* 0xd0000 usage. * there is no overlap for the address 0xef000 usage.
*/ */
#define GUEST_CFG_OFFSET 0xd0000 #define GUEST_CFG_OFFSET 0xef000
/** /**
* @brief Info The power state data of a VCPU. * @brief Info The power state data of a VCPU.

View File

@ -262,11 +262,11 @@ struct acrn_vm_pci_msix_remap {
* It's designed to support passing DM config data pointer, based on it, * It's designed to support passing DM config data pointer, based on it,
* hypervisor would parse then pass DM defined configuration to GUEST VCPU * hypervisor would parse then pass DM defined configuration to GUEST VCPU
* when booting guest VM. * when booting guest VM.
* the address 0xd0000 here is designed by DM, as it arranged all memory * the address 0xef000 here is designed by DM, as it arranged all memory
* layout below 1M, DM should make sure there is no overlap for the address * layout below 1M, DM add this address to E280 reserved range to make sure
* 0xd0000 usage. * there is no overlap for the address 0xef000 usage.
*/ */
#define GUEST_CFG_OFFSET 0xd0000 #define GUEST_CFG_OFFSET 0xef000
/** /**
* @brief Info The power state data of a VCPU. * @brief Info The power state data of a VCPU.