X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=OvmfPkg%2FOvmfXen.fdf;h=05138ffc5b4f4915a05bdbd6c12f9756d5efe670;hb=0a5d2b505cca2a6038a6bca1e299b09c73ae34a4;hp=2ceff7baa2c78f383bb246087a13a1d655281a81;hpb=3b96221f77f4181524657e145b51fa423f3faebe;p=mirror_edk2.git diff --git a/OvmfPkg/OvmfXen.fdf b/OvmfPkg/OvmfXen.fdf index 2ceff7baa2..05138ffc5b 100644 --- a/OvmfPkg/OvmfXen.fdf +++ b/OvmfPkg/OvmfXen.fdf @@ -15,8 +15,8 @@ !include OvmfPkg.fdf.inc # -# Build the variable store and the firmware code as one unified flash device -# image. +# This will allow the flash device image to be recognize as an ELF, with first +# an ELF headers, then the firmware code. # [FD.OVMF] BaseAddress = $(FW_BASE_ADDRESS) @@ -25,7 +25,102 @@ ErasePolarity = 1 BlockSize = $(BLOCK_SIZE) NumBlocks = $(FW_BLOCKS) -!include VarStore.fdf.inc +!if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048) +0x00000000|0x0000e000 +!endif +!if $(FD_SIZE_IN_KB) == 4096 +0x00000000|0x00040000 +!endif +DATA = { + # + # This hex array have been generated by OvmfPkg/OvmfXenElfHeaderGenerator.c + # and copied manually. + # + # ELF file header + 0x7f, 0x45, 0x4c, 0x46, # e_ident[0..3]: Magic number + 0x01, # File class: 32-bit objects + 0x01, # Data encoding: 2's complement, little endian + 0x01, # File version + 0x03, # OS ABI identification: Object uses GNU ELF extensions + 0x00, # ABI version + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, # e_ident[EI_PAD...] + 0x02, 0x00, # e_type = Executable file + 0x03, 0x00, # e_machine = Intel 80386 + 0x01, 0x00, 0x00, 0x00, # e_version + 0xd0, 0xff, 0x2f, 0x00, # e_entry: Entry point virtual address + 0x34, 0x00, 0x00, 0x00, # e_phoff: Program header table file offset + 0x00, 0x00, 0x00, 0x00, # e_shoff: Section header table file offset + 0x00, 0x00, 0x00, 0x00, # e_flags: Processor-specific flags + 0x34, 0x00, # e_ehsize: ELF header size + 0x20, 0x00, # e_phentsize: Program header table entry size + 0x02, 0x00, # e_phnum: Program header table entry count + 0x00, 0x00, # e_shentsize: Section header table entry size + 0x00, 0x00, # e_shnum: Section header table entry count + 0x00, 0x00, # e_shstrndx + + # ELF Program segment headers + # - Load segment + 0x01, 0x00, 0x00, 0x00, # p_type = Loadable program segment + 0x00, 0x00, 0x00, 0x00, # p_offset + 0x00, 0x00, 0x10, 0x00, # p_vaddr: Segment virtual address + 0x00, 0x00, 0x10, 0x00, # p_paddr: Segment physical address + 0x00, 0x00, 0x20, 0x00, # p_filesz: Segment size in file + 0x00, 0x00, 0x20, 0x00, # p_memsz: Segment size in memory + 0x07, 0x00, 0x00, 0x00, # p_flags = Segment is executable | writable | readable + 0x00, 0x00, 0x00, 0x00, # p_align + # - ELFNOTE segment + 0x04, 0x00, 0x00, 0x00, # p_type = PT_NOTE + 0x74, 0x00, 0x00, 0x00, # p_offset = point to XEN_ELFNOTE_PHYS32_ENTRY below + 0x74, 0x00, 0x10, 0x00, + 0x74, 0x00, 0x10, 0x00, + 0x14, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, # p_flags = Segment is readable + 0x00, 0x00, 0x00, 0x00, + + # XEN_ELFNOTE_PHYS32_ENTRY + 0x04, 0x00, 0x00, 0x00, # name size + 0x04, 0x00, 0x00, 0x00, # desc size + 0x12, 0x00, 0x00, 0x00, # type = XEN_ELFNOTE_PHYS32_ENTRY + 0x58, 0x65, 0x6e, 0x00, # name = "Xen" + 0xd0, 0xff, 0x2f, 0x00, # desc: PVH entry point + 0x00 +} + +!if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048) +0x0000e000|0x00001000 +!endif +!if $(FD_SIZE_IN_KB) == 4096 +0x00040000|0x00001000 +!endif +#NV_EVENT_LOG + +!if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048) +0x0000f000|0x00001000 +!endif +!if $(FD_SIZE_IN_KB) == 4096 +0x00041000|0x00001000 +!endif +#NV_FTW_WORKING +DATA = { + # EFI_FAULT_TOLERANT_WORKING_BLOCK_HEADER->Signature = gEdkiiWorkingBlockSignatureGuid = + # { 0x9e58292b, 0x7c68, 0x497d, { 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95 }} + 0x2b, 0x29, 0x58, 0x9e, 0x68, 0x7c, 0x7d, 0x49, + 0xa0, 0xce, 0x65, 0x0, 0xfd, 0x9f, 0x1b, 0x95, + # Crc:UINT32 #WorkingBlockValid:1, WorkingBlockInvalid:1, Reserved + 0x2c, 0xaf, 0x2c, 0x64, 0xFE, 0xFF, 0xFF, 0xFF, + # WriteQueueSize: UINT64 + 0xE0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +} + +!if ($(FD_SIZE_IN_KB) == 1024) || ($(FD_SIZE_IN_KB) == 2048) +0x00010000|0x00010000 +!endif +!if $(FD_SIZE_IN_KB) == 4096 +0x00042000|0x00042000 +!endif +#NV_FTW_SPARE + $(VARS_SIZE)|$(FVMAIN_SIZE) FV = FVMAIN_COMPACT @@ -77,6 +172,10 @@ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfLockBoxStorageBase|gUefiOvmfPkgTokenSpaceGuid. 0x007000|0x001000 gEfiMdePkgTokenSpaceGuid.PcdGuidedExtractHandlerTableAddress|gUefiOvmfPkgTokenSpaceGuid.PcdGuidedExtractHandlerTableSize +0x008000|0x001000 +# Used by XenResetVector to communicate with XenPlatformPei +gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtr|gUefiOvmfPkgTokenSpaceGuid.PcdXenPvhStartOfDayStructPtrSize + 0x010000|0x010000 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamBase|gUefiOvmfPkgTokenSpaceGuid.PcdOvmfSecPeiTempRamSize @@ -199,21 +298,22 @@ INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf INF MdeModulePkg/Universal/EbcDxe/EbcDxe.inf -INF OvmfPkg/8259InterruptControllerDxe/8259.inf +INF OvmfPkg/XenTimerDxe/XenTimerDxe.inf INF UefiCpuPkg/CpuIo2Dxe/CpuIo2Dxe.inf INF UefiCpuPkg/CpuDxe/CpuDxe.inf -INF OvmfPkg/8254TimerDxe/8254Timer.inf INF OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf INF MdeModulePkg/Universal/Metronome/Metronome.inf -INF PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf +INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf +INF OvmfPkg/XenIoPvhDxe/XenIoPvhDxe.inf INF OvmfPkg/XenIoPciDxe/XenIoPciDxe.inf INF OvmfPkg/XenBusDxe/XenBusDxe.inf INF OvmfPkg/XenPvBlkDxe/XenPvBlkDxe.inf +INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf @@ -243,7 +343,7 @@ INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf INF MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf INF OvmfPkg/SioBusDxe/SioBusDxe.inf -!ifndef $(SOURCE_DEBUG_ENABLE) +!if $(SOURCE_DEBUG_ENABLE) == FALSE INF MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf !endif INF MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf