audk/OvmfPkg/XenPlatformPei/Xen.h

40 lines
969 B
C
Raw Normal View History

OvmfPkg: Introduce XenPlatformPei Introduce XenPlatformPei, a copy of OvmfPkg/PlatformPei without some of QEMU specific initialization, Xen does not support QemuFwCfg. This new module will be adjusted to accommodate Xen PVH. fw_cfg dependents that have been removed, which are dynamically skipped when running PlatformPei on Xen: - GetFirstNonAddress(): controlling the 64-bit PCI MMIO aperture via the (experimental) "opt/ovmf/X-PciMmio64Mb" file - GetFirstNonAddress(): honoring the hotplug DIMM area ("etc/reserved-memory-end") in the placement of the 64-bit PCI MMIO aperture - NoexecDxeInitialization() is removed, so PcdPropertiesTableEnable and PcdSetNxForStack are left constant FALSE (not set dynamically from fw_cfg "opt/ovmf/PcdXxxx") - MaxCpuCountInitialization(), PublishPeiMemory(): the max CPU count is not taken from the QemuFwCfgItemSmpCpuCount fw_cfg key; PcdCpuMaxLogicalProcessorNumber is used intact and PcdCpuApInitTimeOutInMicroSeconds is never changed or used. - InitializeXenPlatform(), S3Verification(): S3 is assumed disabled (not consulting "etc/system-states" via QemuFwCfgS3Enabled()). - InstallFeatureControlCallback(): the feature control MSR is not set from "etc/msr_feature_control" (also removed FeatureControl.c as there is nothing been executed) Also removed: - SMRAM/TSEG-related low mem size adjusting (PcdSmmSmramRequire is assumed FALSE) in PublishPeiMemory(), - QemuInitializeRam() entirely, Xen related changes: - Have removed the module variable mXen, as it should be always true. - Have the platform PEI initialization fails if Xen has not been detected. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20190813113119.14804-5-anthony.perard@citrix.com>
2019-08-13 13:30:48 +02:00
/** @file
Ovmf info structure passed by Xen
Copyright (c) 2013, Citrix Systems UK Ltd.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef __XEN_H__
#define __XEN_H__
#include <PiPei.h>
// Physical address of OVMF info
#define OVMF_INFO_PHYSICAL_ADDRESS 0x00001000
// This structure must match the definition on Xen side
#pragma pack(1)
typedef struct {
CHAR8 Signature[14]; // XenHVMOVMF\0
UINT8 Length; // Length of this structure
UINT8 Checksum; // Set such that the sum over bytes 0..length == 0
//
// Physical address of an array of TablesCount elements.
//
// Each element contains the physical address of a BIOS table.
//
EFI_PHYSICAL_ADDRESS Tables;
UINT32 TablesCount;
//
// Physical address of the E820 table, contains E820EntriesCount entries.
//
EFI_PHYSICAL_ADDRESS E820;
UINT32 E820EntriesCount;
} EFI_XEN_OVMF_INFO;
#pragma pack()
#endif /* __XEN_H__ */