diff --git a/Platforms/QemuQ35Pkg/FvmainCompactScratchEnd.inc.fdf b/Platforms/QemuQ35Pkg/FvmainCompactScratchEnd.inc.fdf index 771373bc09..1866fcaee1 100644 --- a/Platforms/QemuQ35Pkg/FvmainCompactScratchEnd.inc.fdf +++ b/Platforms/QemuQ35Pkg/FvmainCompactScratchEnd.inc.fdf @@ -1,65 +1,65 @@ -## @file -# This FDF include file computes the end of the scratch buffer used in -# DecompressMemFvs() [QemuQ35Pkg/Sec/SecMain.c]. It is based on the decompressed -# (ie. original) size of the LZMA-compressed section of the one FFS file in -# the FVMAIN_COMPACT firmware volume. -# -# Copyright (C) 2015, Red Hat, Inc. -# -# SPDX-License-Identifier: BSD-2-Clause-Patent -## - -# The GUID EE4E5898-3914-4259-9D6E-DC7BD79403CF means "LzmaCustomDecompress". -# The decompressed output will have the following structure (see the file -# "9E21FD93-9C72-4c15-8C4B-E77F1DB2D792SEC1.guided.dummy" in the -# Build/Ovmf*/*/FV/Ffs/9E21FD93-9C72-4c15-8C4B-E77F1DB2D792/ directory): -# -# Size Contents -# ------------------- -------------------------------------------------------- -# 4 EFI_COMMON_SECTION_HEADER, stating size 124 (0x7C) and -# type 0x19 (EFI_SECTION_RAW). The purpose of this section -# is to pad the start of PEIFV to 128 bytes. -# 120 Zero bytes (padding). -# -# 4 EFI_COMMON_SECTION_HEADER, stating size -# (PcdOvmfPeiMemFvSize + 4), and type 0x17 -# (EFI_SECTION_FIRMWARE_VOLUME_IMAGE). -# PcdOvmfPeiMemFvSize PEIFV. Note that the above sizes pad the offset of this -# object to 128 bytes. See also the "guided.dummy.txt" -# file in the same directory. -# -# 4 EFI_COMMON_SECTION_HEADER, stating size 12 (0xC) and -# type 0x19 (EFI_SECTION_RAW). The purpose of this section -# is to pad the start of DXEFV to 16 bytes. -# 8 Zero bytes (padding). -# -# 4 EFI_COMMON_SECTION_HEADER, stating size -# (PcdOvmfDxeMemFvSize + 4), and type 0x17 -# (EFI_SECTION_FIRMWARE_VOLUME_IMAGE). -# PcdOvmfDxeMemFvSize DXEFV. Note that the above sizes pad the offset of this -# object to 16 bytes. See also the "guided.dummy.txt" file -# in the same directory. -# -# The total size after decompression is (128 + PcdOvmfPeiMemFvSize + 16 + -# PcdOvmfDxeMemFvSize). - -DEFINE OUTPUT_SIZE = (128 + gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfPeiMemFvSize + 16 + gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDxeMemFvSize) - -# LzmaCustomDecompressLib uses a constant scratch buffer size of 64KB; see -# SCRATCH_BUFFER_REQUEST_SIZE in -# "MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c". - -DEFINE DECOMP_SCRATCH_SIZE = 0x00010000 - -# Note: when we use PcdOvmfDxeMemFvBase in this context, BaseTools have not yet -# offset it with MEMFD's base address. For that reason we have to do it manually. -# -# The calculation below mirrors DecompressMemFvs() [QemuQ35Pkg/Sec/SecMain.c]. - -DEFINE OUTPUT_BASE = ($(MEMFD_BASE_ADDRESS) + gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDxeMemFvBase + 0x00100000) -DEFINE DECOMP_SCRATCH_BASE_UNALIGNED = ($(OUTPUT_BASE) + $(OUTPUT_SIZE)) -DEFINE DECOMP_SCRATCH_BASE_ALIGNMENT = 0x000FFFFF -DEFINE DECOMP_SCRATCH_BASE_MASK = 0xFFF00000 -DEFINE DECOMP_SCRATCH_BASE = (($(DECOMP_SCRATCH_BASE_UNALIGNED) + $(DECOMP_SCRATCH_BASE_ALIGNMENT)) & $(DECOMP_SCRATCH_BASE_MASK)) - -SET gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd = $(DECOMP_SCRATCH_BASE) + $(DECOMP_SCRATCH_SIZE) +## @file +# This FDF include file computes the end of the scratch buffer used in +# DecompressMemFvs() [QemuQ35Pkg/Sec/SecMain.c]. It is based on the decompressed +# (ie. original) size of the LZMA-compressed section of the one FFS file in +# the FVMAIN_COMPACT firmware volume. +# +# Copyright (C) 2015, Red Hat, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +# The GUID EE4E5898-3914-4259-9D6E-DC7BD79403CF means "LzmaCustomDecompress". +# The decompressed output will have the following structure (see the file +# "9E21FD93-9C72-4c15-8C4B-E77F1DB2D792SEC1.guided.dummy" in the +# Build/Ovmf*/*/FV/Ffs/9E21FD93-9C72-4c15-8C4B-E77F1DB2D792/ directory): +# +# Size Contents +# ------------------- -------------------------------------------------------- +# 4 EFI_COMMON_SECTION_HEADER, stating size 124 (0x7C) and +# type 0x19 (EFI_SECTION_RAW). The purpose of this section +# is to pad the start of PEIFV to 128 bytes. +# 120 Zero bytes (padding). +# +# 4 EFI_COMMON_SECTION_HEADER, stating size +# (PcdOvmfPeiMemFvSize + 4), and type 0x17 +# (EFI_SECTION_FIRMWARE_VOLUME_IMAGE). +# PcdOvmfPeiMemFvSize PEIFV. Note that the above sizes pad the offset of this +# object to 128 bytes. See also the "guided.dummy.txt" +# file in the same directory. +# +# 4 EFI_COMMON_SECTION_HEADER, stating size 12 (0xC) and +# type 0x19 (EFI_SECTION_RAW). The purpose of this section +# is to pad the start of DXEFV to 16 bytes. +# 8 Zero bytes (padding). +# +# 4 EFI_COMMON_SECTION_HEADER, stating size +# (PcdOvmfDxeMemFvSize + 4), and type 0x17 +# (EFI_SECTION_FIRMWARE_VOLUME_IMAGE). +# PcdOvmfDxeMemFvSize DXEFV. Note that the above sizes pad the offset of this +# object to 16 bytes. See also the "guided.dummy.txt" file +# in the same directory. +# +# The total size after decompression is (128 + PcdOvmfPeiMemFvSize + 16 + +# PcdOvmfDxeMemFvSize). + +DEFINE OUTPUT_SIZE = (128 + gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfPeiMemFvSize + 16 + gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDxeMemFvSize) + +# LzmaCustomDecompressLib uses a constant scratch buffer size of 64KB; see +# SCRATCH_BUFFER_REQUEST_SIZE in +# "MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c". + +DEFINE DECOMP_SCRATCH_SIZE = 0x00010000 + +# Note: when we use PcdOvmfDxeMemFvBase in this context, BaseTools have not yet +# offset it with MEMFD's base address. For that reason we have to do it manually. +# +# The calculation below mirrors DecompressMemFvs() [QemuQ35Pkg/Sec/SecMain.c]. + +DEFINE OUTPUT_BASE = ($(MEMFD_BASE_ADDRESS) + gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDxeMemFvBase + 0x00100000) +DEFINE DECOMP_SCRATCH_BASE_UNALIGNED = ($(OUTPUT_BASE) + $(OUTPUT_SIZE)) +DEFINE DECOMP_SCRATCH_BASE_ALIGNMENT = 0x000FFFFF +DEFINE DECOMP_SCRATCH_BASE_MASK = 0xFFF00000 +DEFINE DECOMP_SCRATCH_BASE = (($(DECOMP_SCRATCH_BASE_UNALIGNED) + $(DECOMP_SCRATCH_BASE_ALIGNMENT)) & $(DECOMP_SCRATCH_BASE_MASK)) + +SET gUefiQemuQ35PkgTokenSpaceGuid.PcdOvmfDecompressionScratchEnd = $(DECOMP_SCRATCH_BASE) + $(DECOMP_SCRATCH_SIZE) diff --git a/Platforms/QemuQ35Pkg/QemuQ35Pkg.ci.yaml b/Platforms/QemuQ35Pkg/QemuQ35Pkg.ci.yaml index 0bf6945e06..29c208c90b 100644 --- a/Platforms/QemuQ35Pkg/QemuQ35Pkg.ci.yaml +++ b/Platforms/QemuQ35Pkg/QemuQ35Pkg.ci.yaml @@ -1,143 +1,143 @@ -## @file -# Core CI configuration for QemuQ35Pkg -# -# QemuQ35Pkg is part of Platform Ci for builds so this is only -# used for code analysis. -# -# Copyright (c) Microsoft Corporation -# SPDX-License-Identifier: BSD-2-Clause-Patent -## -{ - ## options defined .pytool/Plugin/CompilerPlugin - "CompilerPlugin": { - "DscPath": "" # Don't support this test - }, - - ## options defined .pytool/Plugin/HostUnitTestCompilerPlugin - "HostUnitTestCompilerPlugin": { - "DscPath": "" # Don't support this test - }, - - ## options defined .pytool/Plugin/CharEncodingCheck - "CharEncodingCheck": { - "IgnoreFiles": [] - }, - - ## options defined .pytool/Plugin/DependencyCheck - "DependencyCheck": { - "AcceptableDependencies": [ - "MdePkg/MdePkg.dec", - "MdeModulePkg/MdeModulePkg.dec", - "Temp/Temp.dec", - "NetworkPkg/NetworkPkg.dec", - "SecurityPkg/SecurityPkg.dec", - "UefiCpuPkg/UefiCpuPkg.dec", - "StandaloneMmPkg/StandaloneMmPkg.dec", - "ShellPkg/ShellPkg.dec", - "EmbeddedPkg/EmbeddedPkg.dec", - "SourceLevelDebugPkg/SourceLevelDebugPkg.dec", - "MsGraphicsPkg/MsGraphicsPkg.dec", - "MsCorePkg/MsCorePkg.dec", - "PcBdsPkg/PcBdsPkg.dec", - "PolicyServicePkg/PolicyServicePkg.dec", - "SetupDataPkg/SetupDataPkg.dec", - "MfciPkg/MfciPkg.dec", - "OemPkg/OemPkg.dec", - "QemuQ35Pkg/QemuQ35Pkg.dec" - ], - # For host based unit tests - "AcceptableDependencies-HOST_APPLICATION":[ - "UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec" - ], - # For UEFI shell based apps - "AcceptableDependencies-UEFI_APPLICATION":[], - "IgnoreInf": [] - }, - - ## options defined .pytool/Plugin/DscCompleteCheck - "DscCompleteCheck": { - "IgnoreInf": [""], - "DscPath": "" # Don't support this test - }, - - ## options defined .pytool/Plugin/HostUnitTestDscCompleteCheck - "HostUnitTestDscCompleteCheck": { - "IgnoreInf": [""], - "DscPath": "" # Don't support this test - }, - - ## options defined .pytool/Plugin/GuidCheck - "GuidCheck": { - "IgnoreGuidName": ["SecCore", "ResetVector"], # Expected duplication for gEfiFirmwareVolumeTopFileGuid - "IgnoreGuidValue": [], - "IgnoreFoldersAndFiles": [], - "IgnoreDuplicates": [], - }, - - ## options defined .pytool/Plugin/LibraryClassCheck - "LibraryClassCheck": { - "IgnoreHeaderFile": [] - }, - - ## options defined .pytool/Plugin/SpellCheck - "SpellCheck": { - "AuditOnly": True, # Enable after fixing failures - "IgnoreFiles": [], # use gitignore syntax to ignore errors in matching files - "ExtendWords": [ - "acpitable", - "blkio", - "bochs", - "buildlog", - "BOOTBLOCK", - "decomp", - "dispi", - "dmdepkg", - "dramc", - "endmacro", - "frontpage", - "fvmain", - "intune", - "keepexceptiontable", - "loadfile", - "lodsb", - "memfd", - "memfd's", - "noclearmem", - "pciexbar", - "pdecode", - "peifv", - "pmbase", - "pmcntrl", - "pnpid", - "pusha", - "pvscsi", - "qemulog", - "qemuq", - "ramfb", - "secfv", - "selawik", - "stdvga", - "unblank", - "vmware", - "vring", - "authenticode", - "tlsset", - "tlsget", - "windbg", - "imgscan", - "bootable", - "deadloop", - "devicepath", - "pciinit", - "subrectangle" - ], # words to extend to the dictionary for this package - "IgnoreStandardPaths": [], # Standard Plugin defined paths that should be ignore - "AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported) - }, - - "UncrustifyCheck": { - "IgnoreFiles": [ - "**/ConfigData*.h" - ] # Standard Plugin defined paths that should be ignored. - } -} +## @file +# Core CI configuration for QemuQ35Pkg +# +# QemuQ35Pkg is part of Platform Ci for builds so this is only +# used for code analysis. +# +# Copyright (c) Microsoft Corporation +# SPDX-License-Identifier: BSD-2-Clause-Patent +## +{ + ## options defined .pytool/Plugin/CompilerPlugin + "CompilerPlugin": { + "DscPath": "" # Don't support this test + }, + + ## options defined .pytool/Plugin/HostUnitTestCompilerPlugin + "HostUnitTestCompilerPlugin": { + "DscPath": "" # Don't support this test + }, + + ## options defined .pytool/Plugin/CharEncodingCheck + "CharEncodingCheck": { + "IgnoreFiles": [] + }, + + ## options defined .pytool/Plugin/DependencyCheck + "DependencyCheck": { + "AcceptableDependencies": [ + "MdePkg/MdePkg.dec", + "MdeModulePkg/MdeModulePkg.dec", + "Temp/Temp.dec", + "NetworkPkg/NetworkPkg.dec", + "SecurityPkg/SecurityPkg.dec", + "UefiCpuPkg/UefiCpuPkg.dec", + "StandaloneMmPkg/StandaloneMmPkg.dec", + "ShellPkg/ShellPkg.dec", + "EmbeddedPkg/EmbeddedPkg.dec", + "SourceLevelDebugPkg/SourceLevelDebugPkg.dec", + "MsGraphicsPkg/MsGraphicsPkg.dec", + "MsCorePkg/MsCorePkg.dec", + "PcBdsPkg/PcBdsPkg.dec", + "PolicyServicePkg/PolicyServicePkg.dec", + "SetupDataPkg/SetupDataPkg.dec", + "MfciPkg/MfciPkg.dec", + "OemPkg/OemPkg.dec", + "QemuQ35Pkg/QemuQ35Pkg.dec" + ], + # For host based unit tests + "AcceptableDependencies-HOST_APPLICATION":[ + "UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec" + ], + # For UEFI shell based apps + "AcceptableDependencies-UEFI_APPLICATION":[], + "IgnoreInf": [] + }, + + ## options defined .pytool/Plugin/DscCompleteCheck + "DscCompleteCheck": { + "IgnoreInf": [""], + "DscPath": "" # Don't support this test + }, + + ## options defined .pytool/Plugin/HostUnitTestDscCompleteCheck + "HostUnitTestDscCompleteCheck": { + "IgnoreInf": [""], + "DscPath": "" # Don't support this test + }, + + ## options defined .pytool/Plugin/GuidCheck + "GuidCheck": { + "IgnoreGuidName": ["SecCore", "ResetVector"], # Expected duplication for gEfiFirmwareVolumeTopFileGuid + "IgnoreGuidValue": [], + "IgnoreFoldersAndFiles": [], + "IgnoreDuplicates": [], + }, + + ## options defined .pytool/Plugin/LibraryClassCheck + "LibraryClassCheck": { + "IgnoreHeaderFile": [] + }, + + ## options defined .pytool/Plugin/SpellCheck + "SpellCheck": { + "AuditOnly": True, # Enable after fixing failures + "IgnoreFiles": [], # use gitignore syntax to ignore errors in matching files + "ExtendWords": [ + "acpitable", + "blkio", + "bochs", + "buildlog", + "BOOTBLOCK", + "decomp", + "dispi", + "dmdepkg", + "dramc", + "endmacro", + "frontpage", + "fvmain", + "intune", + "keepexceptiontable", + "loadfile", + "lodsb", + "memfd", + "memfd's", + "noclearmem", + "pciexbar", + "pdecode", + "peifv", + "pmbase", + "pmcntrl", + "pnpid", + "pusha", + "pvscsi", + "qemulog", + "qemuq", + "ramfb", + "secfv", + "selawik", + "stdvga", + "unblank", + "vmware", + "vring", + "authenticode", + "tlsset", + "tlsget", + "windbg", + "imgscan", + "bootable", + "deadloop", + "devicepath", + "pciinit", + "subrectangle" + ], # words to extend to the dictionary for this package + "IgnoreStandardPaths": [], # Standard Plugin defined paths that should be ignore + "AdditionalIncludePaths": [] # Additional paths to spell check (wildcards supported) + }, + + "UncrustifyCheck": { + "IgnoreFiles": [ + "**/ConfigData*.h" + ] # Standard Plugin defined paths that should be ignored. + } +} diff --git a/Platforms/QemuQ35Pkg/ReadMe.rst b/Platforms/QemuQ35Pkg/ReadMe.rst index fc2a317c2b..3c05fe08f7 100644 --- a/Platforms/QemuQ35Pkg/ReadMe.rst +++ b/Platforms/QemuQ35Pkg/ReadMe.rst @@ -1,15 +1,15 @@ -================ -QEMU Q35 Package -================ - -Summary -======= - -This package provides the Project Mu based Q35 virtual platform and provides exemplary -integrations for Project Mu features, including UEFI Frontpage, Device Firmware Configuration -Interface (DFCI), Windows Hardware Error Architecture (WHEA), etc. - -Documentation -============= - -Documentation can be found in the `Docs directory <./Docs>`_ +================ +QEMU Q35 Package +================ + +Summary +======= + +This package provides the Project Mu based Q35 virtual platform and provides exemplary +integrations for Project Mu features, including UEFI Frontpage, Device Firmware Configuration +Interface (DFCI), Windows Hardware Error Architecture (WHEA), etc. + +Documentation +============= + +Documentation can be found in the `Docs directory <./Docs>`_ diff --git a/Platforms/QemuQ35Pkg/UnsignedPermissions.xml b/Platforms/QemuQ35Pkg/UnsignedPermissions.xml index ad59cb54cc..745ed58048 100644 --- a/Platforms/QemuQ35Pkg/UnsignedPermissions.xml +++ b/Platforms/QemuQ35Pkg/UnsignedPermissions.xml @@ -1,25 +1,25 @@ - - - - - - + + + + + + \ No newline at end of file