]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
2 years agoUefiPayloadPkg: Add PCI root bridge info hob support for SBL
Ma, Maurice [Thu, 30 Sep 2021 16:59:07 +0000 (09:59 -0700)]
UefiPayloadPkg: Add PCI root bridge info hob support for SBL

Current UefiPayloadPkg can suport PCI root bridge info HOB
provided by bootloader. For UniversalPayload, bootloader can
directly provide this HOB for payload consumption. However,
for legacy UEFI payload, it is required to migrate the HOB
information from bootloader HOB space to UEFI payload HOB
space. This patch added the missing part for the bootloader
ParseLib in order to support both legacy and universal UEFI
payload.

This patch was tested on Slim Bootloader with latest UEFI
payload, and it worked as expected.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
2 years agoBaseTools: Change RealPath to AbsPath
Chen, Christine [Tue, 12 Oct 2021 04:07:38 +0000 (12:07 +0800)]
BaseTools: Change RealPath to AbsPath

Currently the realpath is used when parse modules, which shows the
path with a drive letter in build log. In Windows 'subst' comand is
used to associates a path with a drive letter, when use the mapped
drive letter for build, with realpath function the build log will
have different disk letter info which will cause confusion. In this
situation, if use adspath function to show the path info, it will keep
same letter with the mapped drive letter, which avoids confusion.
This patch modifies the realpath to abspath.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@Intel.com>
2 years agoMdePkg/BaseLib: Add QuickSort function on BaseLib
IanX Kuo [Tue, 12 Oct 2021 00:05:31 +0000 (08:05 +0800)]
MdePkg/BaseLib: Add QuickSort function on BaseLib

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3675

Add QuickSort function into BaseLib

Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: IanX Kuo <ianx.kuo@intel.com>
2 years agoCryptoPkg/BaseCryptLib: Eliminate extra buffer copy in Pkcs7Verify()
Bob Morgan [Fri, 10 Sep 2021 21:34:14 +0000 (05:34 +0800)]
CryptoPkg/BaseCryptLib: Eliminate extra buffer copy in Pkcs7Verify()

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3617

Create a read-only openSSL BIO wrapper for the existing input
buffer passed to Pkcs7Verify() instead of copying the buffer
into an empty writable BIO which causes memory allocations
within openSSL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Bob Morgan <bobm@nvidia.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2 years agoShellPkg: Support ProcessorUpgradeSocketLGA4677 from SMBIOS 3.5.0
Star Zeng [Tue, 28 Sep 2021 02:27:28 +0000 (10:27 +0800)]
ShellPkg: Support ProcessorUpgradeSocketLGA4677 from SMBIOS 3.5.0

The patch adds entry into QueryTable.c for ProcessorUpgradeSocketLGA4677
from SMBIOS 3.5.0.
It also adds entries into QueryTable.c for ProcessorUpgradeSocketLGA4189
and ProcessorUpgradeSocketLGA1200 from SMBIOS 3.4.0.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2 years agoMdePkg: Add ProcessorUpgradeSocketLGA4677 from SMBIOS 3.5.0
Zeng, Star [Tue, 28 Sep 2021 02:36:16 +0000 (10:36 +0800)]
MdePkg: Add ProcessorUpgradeSocketLGA4677 from SMBIOS 3.5.0

This patch adds ProcessorUpgradeSocketLGA4677 definition into Smbios.h
from SMBIOS 3.5.0.
It also adds ProcessorUpgradeSocketLGA4189 and ProcessorUpgradeSocketLGA1200
definitions into from SMBIOS 3.4.0.

Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2 years agoUefiPayloadPkg: Add a macro to select the SecurityStubDxe driver.
Liu, Zhiguang [Mon, 27 Sep 2021 01:59:59 +0000 (09:59 +0800)]
UefiPayloadPkg: Add a macro to select the SecurityStubDxe driver.

The SecurityStubDxe driver may be provided by platform payload.

Cc: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2 years agoDynamicTablesPkg: SSDT CPU topology and LPI state generator
Pierre Gondois [Fri, 8 Oct 2021 14:46:32 +0000 (15:46 +0100)]
DynamicTablesPkg: SSDT CPU topology and LPI state generator

In the GIC interrupt model, logical processors are required to
have a Processor Device object in the DSDT and must convey each
processor's GIC information to the OS using the GICC structure.
Additionally, _LPI objects may be needed as they provide a method
to describe Low Power Idle states that defines the local power
states for each node in a hierarchical processor topology.

Therefore, add support to generate the CPU topology and the LPI
state information in an SSDT table.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add CM_ARM_LPI_INFO object
Pierre Gondois [Fri, 8 Oct 2021 14:46:31 +0000 (15:46 +0100)]
DynamicTablesPkg: Add CM_ARM_LPI_INFO object

Introduce the CM_ARM_LPI_INFO CmObj in the ArmNameSpaceObjects.
This allows to describe LPI state information, as described in
ACPI 6.4, s8.4.4.3 "_LPI (Low Power Idle States)".

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML code generation to add an _LPI state
Pierre Gondois [Fri, 8 Oct 2021 14:46:30 +0000 (15:46 +0100)]
DynamicTablesPkg: AML code generation to add an _LPI state

Add AmlAddLpiState() to generates AML code to add an _LPI state
to an _LPI object created using AmlCreateLpiNode().

AmlAddLpiState increments the count of LPI states in the LPI
node by one, and adds the following package:
  Package() {
    MinResidency,
    WorstCaseWakeLatency,
    Flags,
    ArchFlags,
    ResCntFreq,
    EnableParentState,
    (GenericRegisterDescriptor != NULL) ?           // Entry method. If a
      ResourceTemplate(GenericRegisterDescriptor) : // Register is given,
      Integer,                                      // use it. Use the
                                                    // Integer otherwise
    ResourceTemplate() {                            // NULL Residency
      Register (SystemMemory, 0, 0, 0, 0)           // Counter
    },
    ResourceTemplate() {                            // NULL Usage Counter
      Register (SystemMemory, 0, 0, 0, 0)
    },
    ""                                              // NULL State Name
  },

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML code generation for a _LPI object
Pierre Gondois [Fri, 8 Oct 2021 14:46:29 +0000 (15:46 +0100)]
DynamicTablesPkg: AML code generation for a _LPI object

_LPI object provides a method to describe Low Power Idle
states that define the local power states for each node
in a hierarchical processor topology.

Therefore, add AmlCreateLpiNode() to generate code for a
_LPI object.

AmlCreateLpiNode ("_LPI", 0, 1, ParentNode, &LpiNode) is
equivalent of the following ASL code:
  Name (_LPI, Package (
0,  // Revision
1,  // LevelId
0   // Count
))

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML code generation for a Method returning a NS
Pierre Gondois [Fri, 8 Oct 2021 14:46:28 +0000 (15:46 +0100)]
DynamicTablesPkg: AML code generation for a Method returning a NS

Add AmlCodeGenMethodRetNameString() to generate AML code to create
a Method returning a NameString (NS).

AmlCodeGenMethodRetNameString (
  "MET0", "_CRS", 1, TRUE, 3, ParentNode, NewObjectNode
  );
is equivalent of the following ASL code:
Method(MET0, 1, Serialized, 3) {
  Return (_CRS)
}

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML code generation to Return a NameString
Pierre Gondois [Fri, 8 Oct 2021 14:46:27 +0000 (15:46 +0100)]
DynamicTablesPkg: AML code generation to Return a NameString

Add AmlCodeGenReturnNameString() to generate AML code for a
Return object node, returning the object as a NameString.

AmlCodeGenReturn ("NAM1", ParentNode, NewObjectNode) is
equivalent of the following ASL code:
  Return(NAM1)

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML code generation for a Method
Pierre Gondois [Fri, 8 Oct 2021 14:46:26 +0000 (15:46 +0100)]
DynamicTablesPkg: AML code generation for a Method

Add AmlCodeGenMethod() to generate code for a control method.

AmlCodeGenMethod ("MET0", 1, TRUE, 3, ParentNode, NewObjectNode)
is equivalent of the following ASL code:
    Method(MET0, 1, Serialized, 3) {}

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML code generation for a ResourceTemplate
Pierre Gondois [Fri, 8 Oct 2021 14:46:25 +0000 (15:46 +0100)]
DynamicTablesPkg: AML code generation for a ResourceTemplate

ASL provides a ResourceTemplate macro that creates a Buffer in which
resource descriptor macros can be listed. The ResourceTemplate macro
automatically generates an End descriptor and calculates the checksum
for the resource template.

Therefore, add AmlCodeGenResourceTemplate() to generate AML code for
the ResourceTemplate() macro. This function generates a Buffer node
with an EndTag resource data descriptor, which is similar to the ASL
ResourceTemplate() macro.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Helper function to compute package length
Pierre Gondois [Fri, 8 Oct 2021 14:46:24 +0000 (15:46 +0100)]
DynamicTablesPkg: Helper function to compute package length

Some AML object have a PkgLen which indicates the size of the
AML object. The package length can be encoded in 1 to 4 bytes.
The bytes used to encode the PkgLen is itself counted in the
PkgLen value. So, if an AML object's size increments/decrements,
the number of bytes used to encode the PkgLen value can itself
increment/decrement.

Therefore, a helper function AmlComputePkgLength() is introduced
to simply computation of the PkgLen.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML code generation for a Package
Pierre Gondois [Fri, 8 Oct 2021 14:46:23 +0000 (15:46 +0100)]
DynamicTablesPkg: AML code generation for a Package

Add AmlCodeGenPackage() to generate AML code for declaring
a Package() object. This function generates an empty package
node. New elements can then be added to the package's variable
argument list.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML Code generation for Resource data EndTag
Pierre Gondois [Fri, 8 Oct 2021 14:46:22 +0000 (15:46 +0100)]
DynamicTablesPkg: AML Code generation for Resource data EndTag

Add a helper function AmlCodeGenEndTag() to generate AML Resource Data
EndTag. The EndTag resource data is automatically generated by the ASL
compiler at the end of a list of resource data elements. Therefore, an
equivalent function is not present in ASL.

However, AmlCodeGenEndTag() is useful when generating AML code for the
ResourceTemplate() macro.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: AML Code generation for Register()
Pierre Gondois [Fri, 8 Oct 2021 14:46:21 +0000 (15:46 +0100)]
DynamicTablesPkg: AML Code generation for Register()

Add AmlCodeGenRegister() to generate AML code for the
Generic Register Resource Descriptor. This function is
equivalent to the ASL macro Register().

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Make AmlNodeGetIntegerValue public
Pierre Gondois [Fri, 8 Oct 2021 14:46:20 +0000 (15:46 +0100)]
DynamicTablesPkg: Make AmlNodeGetIntegerValue public

Remove the STATIC qualifier for the AmlUtility function
AmlNodeGetIntegerValue() and add the definition to the
header file so that it can be used by other AmlLib
sub-modules.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Update error handling for node creation
Pierre Gondois [Fri, 8 Oct 2021 14:46:19 +0000 (15:46 +0100)]
DynamicTablesPkg: Update error handling for node creation

The node creation functions:
- AmlCreateRootNode()
- AmlCreateObjectNode()
- AmlCreateDataNode()
are now resetting the input pointer where the created node is stored.
Thus, it is not necessary to set some local variables to NULL or
check a node value before trying to delete it.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Clear pointer in node creation fcts
Pierre Gondois [Fri, 8 Oct 2021 14:46:18 +0000 (15:46 +0100)]
DynamicTablesPkg: Clear pointer in node creation fcts

The following functions:
- AmlCreateRootNode()
- AmlCreateObjectNode()
- AmlCreateDataNode()
create a node and return it by populating a pointer. This pointer
should only be considered/used if the function returns successfully.
Otherwise, the value stored in this pointer should be ignored.

For their error handling, some other functions assume that this
pointer is reset to NULL if an error occurs during a node creation.
To make this assumption correct, explicitly clear this input pointer.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Set EndTag's Checksum if RdList is modified
Pierre Gondois [Fri, 8 Oct 2021 14:46:17 +0000 (15:46 +0100)]
DynamicTablesPkg: Set EndTag's Checksum if RdList is modified

ACPI 6.4, s6.4.2.9 "End Tag":
"This checksum is generated such that adding it to the sum of all the data
bytes will produce a zero sum."
"If the checksum field is zero, the resource data is treated as if the
checksum operation succeeded. Configuration proceeds normally."

To avoid re-computing checksums, if a new resource data elements is
added/removed/modified in a list of resource data elements, the AmlLib
resets the checksum to 0.

This patch also refactors the AmlAppendRdNode() function by getting the
last Resource Data node directly instead of iterating over all the
elements of the list of Resource Data node.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add AmlSetRdListCheckSum()
Pierre Gondois [Fri, 8 Oct 2021 14:46:16 +0000 (15:46 +0100)]
DynamicTablesPkg: Add AmlSetRdListCheckSum()

Lists of Resource Data elements end with an EndTag (most of the time).
This function finds the EndTag (if present) in a list of Resource Data
elements and sets the checksum.

ACPI 6.4, s6.4.2.9 "End Tag":
"This checksum is generated such that adding it to the sum of all the data
bytes will produce a zero sum."
"If the checksum field is zero, the resource data is treated as if the
checksum operation succeeded. Configuration proceeds normally."

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add AmlRdSetEndTagChecksum()
Pierre Gondois [Fri, 8 Oct 2021 14:46:15 +0000 (15:46 +0100)]
DynamicTablesPkg: Add AmlRdSetEndTagChecksum()

Add AmlRdSetEndTagChecksum(), setting the CheckSum value contained in a
Resource Data element.

ACPI 6.4, s6.4.2.9 "End Tag":
"This checksum is generated such that adding it to the sum of all the
data bytes will produce a zero sum."
"If the checksum field is zero, the resource data is treated as if the
checksum operation succeeded. Configuration proceeds normally."

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add AddSsdtAcpiHeader()
Pierre Gondois [Fri, 8 Oct 2021 14:46:14 +0000 (15:46 +0100)]
DynamicTablesPkg: Add AddSsdtAcpiHeader()

To fetch the Oem information from the ConfigurationManagerProtocol
and the AcpiTableInfo, and populate the SSDT ACPI header when
creating a RootNode via the AmlLib, create AddSsdtAcpiHeader().

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add missing parameter check
Pierre Gondois [Fri, 8 Oct 2021 14:46:13 +0000 (15:46 +0100)]
DynamicTablesPkg: Add missing parameter check

Add missing check of 'AcpiTableInfo' in AddAcpiHeader().

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Remove unnecessary includes
Pierre Gondois [Fri, 8 Oct 2021 14:46:12 +0000 (15:46 +0100)]
DynamicTablesPkg: Remove unnecessary includes

Some includes are not necessary. Remove them.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoShellPkg: Update Acpiview HMAT parser to ACPI spec version 6.4
Chris Jones [Wed, 14 Jul 2021 11:45:12 +0000 (12:45 +0100)]
ShellPkg: Update Acpiview HMAT parser to ACPI spec version 6.4

Add parser support for the new "MinTransferSize" field of the System
Locality, Latency and Bandwidth structure, introduced by the ACPI
specification version 6.4.

Also update the HMAT parser to use the newer ACPI version 6.4
definitions.

Signed-off-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Zhichao Gao <zhcihao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2 years agoMdeModulePkg/Core/Dxe: Add lock protection in CoreLocateHandleBuffer()
Hua Ma [Wed, 29 Sep 2021 05:08:14 +0000 (13:08 +0800)]
MdeModulePkg/Core/Dxe: Add lock protection in CoreLocateHandleBuffer()

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3666

Currently, CoreLocateHandleBuffer() follows three steps:
1) get the size of protocol database firstly
2) allocate the buffer based on the size
3) get the protocol database into the buffer
There is no lock protection for the whole three steps. If a new protocol
added in step 2) by other task, e.g. (event timer handle USB device
hotplug). The size of protocol database may be increased and cannot fit
into the previous buffer in step 3). The protocol database cannot be
returned successfully, EFI_BUFFER_TOO_SMALL error will be returned.

This patch adds the lock to protect the whole three steps.
It can make sure the correct protocol database be returned.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Dandan Bi <dandan.bi@intel.com>
Signed-off-by: Hua Ma <hua.ma@intel.com>
Reviewed-by: Dandan Bi dandan.bi@intel.com
Reviewed-by: Liming Gao gaoliming@byosoft.com.cn
2 years agoShellPkg: Add Type 5 PCC Subspace Structure parser
Chris Jones [Fri, 13 Aug 2021 17:02:45 +0000 (18:02 +0100)]
ShellPkg: Add Type 5 PCC Subspace Structure parser

Bugzilla: 3563 (https://bugzilla.tianocore.org/show_bug.cgi?id=3563)

Update the Acpiview PCCT parser with the HW Registers based
Communications Subspace Structure (Type 5) as defined in Section 14.1.7
of the ACPI 6.4 specification.

Signed-off-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar <sami.mujawar@arm.com>
2 years agoShellPkg: Update Acpiview PCCT parser to ACPI 6.4
Chris Jones [Fri, 13 Aug 2021 17:02:44 +0000 (18:02 +0100)]
ShellPkg: Update Acpiview PCCT parser to ACPI 6.4

Bugzilla: 3563 (https://bugzilla.tianocore.org/show_bug.cgi?id=3563)

Update the Acpiview PCCT parser to use Acpi64.h.

Signed-off-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar <sami.mujawar@arm.com>
2 years agoShellPkg: Update Acpiview GTDT parser to ACPI 6.4
Chris Jones [Mon, 16 Aug 2021 14:52:18 +0000 (15:52 +0100)]
ShellPkg: Update Acpiview GTDT parser to ACPI 6.4

Bugzilla: 3565 (https://bugzilla.tianocore.org/show_bug.cgi?id=3565)

Update the Acpiview GTDT parser to use Acpi64.h and as such rename all
occurences of "SBSA Generic Watchdog" to "Arm Generic Watchdog".

Signed-off-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2 years agoDynamicTablesPkg: Rename SBSA generic watchdog
Chris Jones [Mon, 16 Aug 2021 14:52:17 +0000 (15:52 +0100)]
DynamicTablesPkg: Rename SBSA generic watchdog

Buzilla: 3565 (https://bugzilla.tianocore.org/show_bug.cgi?id=3565)

As part of the updates to ACPI 6.4 the "SBSA Generic Watchdog" was
renamed to the "Arm Generic Watchdog". This patch implements that
change by updating the GTDT generator to use Acpi64.h and renames
any occurence of "SBSA Generic Watchdog" to "Arm Generic Watchdog".

Signed-off-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2 years agoDynamicTablesPkg: Update FADT generator to ACPI 6.4
Chris Jones [Tue, 17 Aug 2021 13:50:58 +0000 (14:50 +0100)]
DynamicTablesPkg: Update FADT generator to ACPI 6.4

Bugzilla: 3568 (https://bugzilla.tianocore.org/show_bug.cgi?id=3568)

Update the FADT generator to use Acpi64.h. As the FADT revision tracks
the ACPI revision this updates the minor revision value generated.

Mantis ID for change: https://mantis.uefi.org/mantis/view.php?id=2105

Signed-off-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2 years agoOvmfPkg/Microvm: add Maintainers.txt entry
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:19 +0000 (11:01 +0200)]
OvmfPkg/Microvm: add Maintainers.txt entry

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2 years agoOvmfPkg/Microvm: wire up serial console, drop super-io
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:17 +0000 (11:01 +0200)]
OvmfPkg/Microvm: wire up serial console, drop super-io

Microvm has no LPC bridge, so drop the PciSioSerialDxe driver.
Use SerialDxe instead, with ioport hardcoded to 0x3f8 aka com1 aka ttyS0.

With this tianocore boots to uefi shell prompt on the serial console.
Direct kernel boot can be used too.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: use PciHostBridgeLibNull
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:16 +0000 (11:01 +0200)]
OvmfPkg/Microvm: use PciHostBridgeLibNull

Shortcut PCI support for now (proper PCIe
support will be wired up later).

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: BdsPlatform: PciAcpiInitialization tweak.
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:15 +0000 (11:01 +0200)]
OvmfPkg/Microvm: BdsPlatform: PciAcpiInitialization tweak.

Nothing to do here ;)

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/ResetSystemLib: add driver for microvm
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:14 +0000 (11:01 +0200)]
OvmfPkg/ResetSystemLib: add driver for microvm

Uses the generic event device to reset and poweroff.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: PlatformPei/Platform: add id.
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:13 +0000 (11:01 +0200)]
OvmfPkg/Microvm: PlatformPei/Platform: add id.

Add + set microvm id for PcdOvmfHostBridgePciDevId.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: PlatformPei/Platform memory map tweaks
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:12 +0000 (11:01 +0200)]
OvmfPkg/Microvm: PlatformPei/Platform memory map tweaks

Microvm needs ioapic hobs only.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: PlatformPei/MemDetect tweaks
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:11 +0000 (11:01 +0200)]
OvmfPkg/Microvm: PlatformPei/MemDetect tweaks

Skip host bridge setup on microvm.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: use XenTimerDxe (lapic timer)
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:10 +0000 (11:01 +0200)]
OvmfPkg/Microvm: use XenTimerDxe (lapic timer)

Microvm has no acpi timer, so go use XenTimerDxe
which uses the local apic instead.

Set PcdFSBClock to 1000 MHz, which is the lapic
timer frequency used by KVM.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: use MdePkg/Library/SecPeiDxeTimerLibCpu
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:09 +0000 (11:01 +0200)]
OvmfPkg/Microvm: use MdePkg/Library/SecPeiDxeTimerLibCpu

Microvm has no acpi timer, so use the generic lib instead.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: no emulated scsi
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:08 +0000 (11:01 +0200)]
OvmfPkg/Microvm: no emulated scsi

Microvm focus is virtio, so go drop support
for emulated scsi host adapters.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: no csm
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:07 +0000 (11:01 +0200)]
OvmfPkg/Microvm: no csm

Guests depending on BIOS will probably not work that well with microvm
due to legacy hardware being not available.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: no sev
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:06 +0000 (11:01 +0200)]
OvmfPkg/Microvm: no sev

Microvm has no SEV support.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: no tpm
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:05 +0000 (11:01 +0200)]
OvmfPkg/Microvm: no tpm

Microvm has no TPM support.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: no secure boot
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:04 +0000 (11:01 +0200)]
OvmfPkg/Microvm: no secure boot

Without SMM secure boot isn't actually secure, so drop it too.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: no smm
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:03 +0000 (11:01 +0200)]
OvmfPkg/Microvm: no smm

Microvm has no SMM support.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: rename output files, fix includes
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:02 +0000 (11:01 +0200)]
OvmfPkg/Microvm: rename output files, fix includes

Rename the firmware volume files (s/OVMF/MICROVM/).
Fix includes so they work with microvm config being in a subdirectory.
With this patch applied the build works.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/Microvm: copy OvmfPkgX64 files as-is
Gerd Hoffmann [Wed, 8 Sep 2021 09:01:01 +0000 (11:01 +0200)]
OvmfPkg/Microvm: copy OvmfPkgX64 files as-is

Create Microvm subdirectory.  Copy OvmfPkgX64 .dsc and .fdf files
unmodified as starting point for MicrovmX64.

Changes come as separate patches, to simplify patch review and rebases.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3599
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoArmVirtPkg: Disable the TPM2 platform hierarchy
Stefan Berger [Fri, 24 Sep 2021 11:42:21 +0000 (07:42 -0400)]
ArmVirtPkg: Disable the TPM2 platform hierarchy

Disable the TPM2 platform hierarchy by directly calling
ConfigureTpmPlatformHierarchy().

Per the TCG firmware specification "TCG PC Client Platform Firmware Profile
Specification" the TPM 2 platform hierarchy needs to be disabled or a
random password set and discarded before the firmware passes control to the
next stage bootloader or kernel.

Current specs are here:
https://trustedcomputinggroup.org/wp-content/uploads/TCG_PCClient_PFP_r1p05_v23_pub.pdf

Section 11 states:
"Platform Firmware MUST protect access to the Platform Hierarchy
and prevent access to the platform hierarchy by non-manufacturer-
controlled components."

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3510
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2 years agoArmVirtPkg: Reference new TPM classes in the build system for compilation
Stefan Berger [Fri, 24 Sep 2021 11:42:20 +0000 (07:42 -0400)]
ArmVirtPkg: Reference new TPM classes in the build system for compilation

We just added the same functionality to the OvmfPkg. However, on x86, we
could use the notification mechanism around
gEfiDxeSmmReadyToLockProtocolGuid to indirectly invoke
ConfigureTpmPlatformHierarchy(). Since ARM does not have an SMM mode, we
have to use direct invocation of this function at the same place in
PlatformBootManagerBeforeConsole() as it is called on x86.

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3510
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2 years agoArmVirtPkg/TPM: Add a NULL implementation of TpmPlatformHierarchyLib
Stefan Berger [Fri, 24 Sep 2021 11:42:19 +0000 (07:42 -0400)]
ArmVirtPkg/TPM: Add a NULL implementation of TpmPlatformHierarchyLib

Add a NULL implementation of the library class TpmPlatformHierarchyLib.

Link: https://bugzilla.tianocore.org/show_bug.cgi?id=3510
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2 years agoArmPkg: SmbiosMiscDxe: Don't populate ExtendedBiosSize when size < 16MB
Rebecca Cran [Mon, 4 Oct 2021 16:22:33 +0000 (10:22 -0600)]
ArmPkg: SmbiosMiscDxe: Don't populate ExtendedBiosSize when size < 16MB

According to the SMBIOS specification, the ExtendedBiosSize field should
be zero when the BIOS size is less than 16MB:

"Size (n) where 64K * (n+1) is the size of the
physical device containing the BIOS, in
bytes.
FFh - size is 16MB or greater, see Extended
BIOS ROM Size for actual size."

Fix the code in MiscBiosVendorFunction.c to only populate the
ExtendedBiosSize field if the BIOS size is greater than 16MB.

Fix the code to correctly populate the ExtendedBiosSize field with the
unit bits set to MB if the size is between 16MB and 16GB.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Nhi Pham <nhi@os.amperecomputing.com>
2 years agoIntelFsp2Pkg: Adopt FSP 2.3 specification.
Chasel Chiu [Fri, 1 Oct 2021 07:34:39 +0000 (15:34 +0800)]
IntelFsp2Pkg: Adopt FSP 2.3 specification.

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3674

Add ExtendedImageRevision in FSP_INFO_HEADER structure, also add
FSP_NON_VOLATILE_STORAGE_HOB2 header.

Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
2 years agoDynamicTablesPkg: Rework AmlResourceDataCodegen.c/h
Pierre Gondois [Thu, 30 Sep 2021 07:48:21 +0000 (08:48 +0100)]
DynamicTablesPkg: Rework AmlResourceDataCodegen.c/h

Rework all the functions to to have a generic prototype:
 - First take take the resource data specific arguments.
   E.g.: for a Register(): the AddressSpace, BitWidth, ...
 - The penultimate parameter is a NameOpNode. The resource data
   created is appended to the ResourceTemplate() contained in the
   NameOpNode.
 - The last parameter is a pointer holding the created resource data.

A least one of the two last parameter must be provided. One of them can
be omitted. This generic interface allows to either:
 - Add the resource data to a NameOpNode. This is a common case for the
   Ssdt tables generator.
 - Get the created resource data and let the caller place it in an AML
   tree.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Deprecate Crs specific methods in AmlLib
Pierre Gondois [Thu, 30 Sep 2021 07:48:20 +0000 (08:48 +0100)]
DynamicTablesPkg: Deprecate Crs specific methods in AmlLib

Some functions in the AmlLib have 'Crs' in their name and can only
be applied to '_CRS' AML objects. To re-use them on AML objects that
have different names:
 - Rename them and remove the '_CRS' name check.
 - Create aliases having of the 'Crs' function prototypes. These
   aliases are available when DISABLE_NEW_DEPRECATED_INTERFACES
   is not defined. They will be deprecated in a near future.

The deprecated functions are:
- AmlNameOpCrsGetFirstRdNode()
- AmlNameOpCrsGetNextRdNode()
- AmlCodeGenCrsAddRdInterrupt()

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Update DynamicTablesPkg.ci.yaml
Pierre Gondois [Thu, 30 Sep 2021 07:48:19 +0000 (08:48 +0100)]
DynamicTablesPkg: Update DynamicTablesPkg.ci.yaml

To prepare edk2 upstream CI for incoming modifications:
1- Disable the Ecc check 9005:
   "Only Doxygen commands '@bug', '@todo', [...], '@{', '@}'
   are allowed to mark the code Unknown doxygen command [...]"
2- Disable the Ecc check 8003 for the following keyword:
   "DISABLE_NEW_DEPRECATED_INTERFACES"
   Indeed, this error has been corrected on the latest version of
   BaseTools, but is still triggered when using the older python
   packages containing the BaseTools.
3- Add word exceptions for the cspell tool.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Use %a formatter in AmlDbgPrint
Pierre Gondois [Thu, 30 Sep 2021 07:48:18 +0000 (08:48 +0100)]
DynamicTablesPkg: Use %a formatter in AmlDbgPrint

The correct formatter to print a CHAR8 char in edk2 is '%a'.
Replace the '%s' formatters by '%a'.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add Configuration Manager Object parser
Sami Mujawar [Thu, 30 Sep 2021 07:48:17 +0000 (08:48 +0100)]
DynamicTablesPkg: Add Configuration Manager Object parser

The Platform information repository in the Configuration Manager
may be dynamically populated, for e.g. by a Hardware Information
Parser like FdtHwInfoParser. In such cases it is useful to trace
the CM objects that were populated by the parser.

Therefore, introduce helper functions that can parse and trace
the Configuration Manager Objects.

Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add AmlGetEisaIdFromString() to AcpiHelperLib
Pierre Gondois [Thu, 30 Sep 2021 07:48:16 +0000 (08:48 +0100)]
DynamicTablesPkg: Add AmlGetEisaIdFromString() to AcpiHelperLib

Add a function converting a 7 characters string to its UINT32
EISAID. The algorithm used to create the EISAID is described
in the ACPI 6.4 specification, s19.3.4 "ASL Macros".

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Add HexFromAscii() to AcpiHelperLib
Pierre Gondois [Thu, 30 Sep 2021 07:48:15 +0000 (08:48 +0100)]
DynamicTablesPkg: Add HexFromAscii() to AcpiHelperLib

Add HexFromAscii(), converting an hexadecimal ascii char
to an integer.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Rename single char input parameter
Pierre Gondois [Thu, 30 Sep 2021 07:48:14 +0000 (08:48 +0100)]
DynamicTablesPkg: Rename single char input parameter

The Ecc tool forbids the usage of one char variable: Ecc error 8007:
"There should be no use of short (single character) variable names"

To follow this policy, rename this one letter parameter.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Update TableHelperLib.inf
Pierre Gondois [Thu, 30 Sep 2021 07:48:13 +0000 (08:48 +0100)]
DynamicTablesPkg: Update TableHelperLib.inf

Update the inf file version and BASE_NAME of the library.
Remove unused sections.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoDynamicTablesPkg: Extract AcpiHelperLib from TableHelperLib
Pierre Gondois [Thu, 30 Sep 2021 07:48:12 +0000 (08:48 +0100)]
DynamicTablesPkg: Extract AcpiHelperLib from TableHelperLib

The TableHelperLib contains helper functions. Some rely on
DynamicTablesPkg definitions (they use Configuration Manager objects).
Some others are more generic.

To allow using these generic functions without including
DynamicTablesPkg definitions, move them to a new AcpiHelperLib
library.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2 years agoUefiPayloadPkg: Remove asm code and sharing libraries
Guo Dong [Wed, 29 Sep 2021 03:34:40 +0000 (20:34 -0700)]
UefiPayloadPkg: Remove asm code and sharing libraries

Remove asm code used for payload entry.
Use patchable PCD instead a fixed PCD PcdPayloadStackTop to avoid
potential conflict.

Based on the removal, use same HobLib regardless UNIVERSAL_PAYLOAD.
Use same PlatformHookLib regardless UNIVERSAL_PAYLOAD. The original
PlatformHookLib was removed and UniversalPayloadPlatformHookLib was
rename to new PlatformHookLib.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
2 years agoSecurityPkg: Fix SecureBootDefaultKeysDxe failed to start
Nhi Pham [Mon, 27 Sep 2021 07:46:27 +0000 (15:46 +0800)]
SecurityPkg: Fix SecureBootDefaultKeysDxe failed to start

The dbt and dbx keys are optional, the driver entry should return
EFI_SUCCESS to start if they are not found in the firmware flash. This
patch is to fix it and update the description of retval as well.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Grzegorz Bernacki <gjb@semihalf.com>
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Grzegorz Bernacki <gjb@semihalf.com>
Acked-by: Jiewen Yao <jiewen.yao@intel.com>
2 years agoMdeModulePkg: CI YAML: Added new GUID to ignore duplicate list
Kun Qin [Thu, 16 Sep 2021 00:14:20 +0000 (08:14 +0800)]
MdeModulePkg: CI YAML: Added new GUID to ignore duplicate list

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3629

SMM Communication PPI GUID from MdeModulePkg is defined the same as MM
Communication PPI GUID from MdePkg, according to PI Spec v1.5 and onward.

After introduction of MM Communication PPI definitions, an update in the
ignore duplicate list is needed to avoid breaking CI build.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2 years agoMdePkg: CI YAML: Added new GUID to ignore duplicate list
Kun Qin [Thu, 16 Sep 2021 00:14:19 +0000 (08:14 +0800)]
MdePkg: CI YAML: Added new GUID to ignore duplicate list

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3629

SMM Communication PPI GUID from MdeModulePkg is defined the same as MM
Communication PPI GUID from MdePkg, according to PI Spec v1.5 and onward.

After introduction of MM Communication PPI definitions, an update in the
ignore duplicate list is needed to avoid breaking CI build.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2 years agoMdePkg: MmCommunication: Added definition of MM Communication PPI
Kun Qin [Thu, 16 Sep 2021 00:14:18 +0000 (08:14 +0800)]
MdePkg: MmCommunication: Added definition of MM Communication PPI

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3629

MM Communication PPI was defined in PI Specification since v1.5. This
change added definition of such PPI and related GUIDs into MdePkg.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2 years agoOvmfPkg: Reference new Tcg2PlatformPei in the build system
Stefan Berger [Wed, 15 Sep 2021 01:25:06 +0000 (09:25 +0800)]
OvmfPkg: Reference new Tcg2PlatformPei in the build system

Compile the Tcg2PlatformPei related code now to support TPM 2 platform
hierachy disablement if the TPM state cannot be resumed upon S3 resume.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Peter Grehan <grehan@freebsd.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg: Reference new Tcg2PlatformDxe in the build system for compilation
Stefan Berger [Wed, 15 Sep 2021 01:25:05 +0000 (09:25 +0800)]
OvmfPkg: Reference new Tcg2PlatformDxe in the build system for compilation

Compile the Tcg2PlatformDxe related code now.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Peter Grehan <grehan@freebsd.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg: Handle TPM 2 physical presence opcodes much earlier
Stefan Berger [Wed, 15 Sep 2021 01:25:04 +0000 (09:25 +0800)]
OvmfPkg: Handle TPM 2 physical presence opcodes much earlier

Handle the TPM 2 physical presence interface (PPI) opcodes in
PlatformBootManagerBeforeConsole() before the TPM 2 platform hierarchy
is disabled. Since the handling of the PPI opcodes may require inter-
action with the user, initialize the keyboard before handling PPI codes.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Peter Grehan <grehan@freebsd.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoOvmfPkg/TPM PPI: Connect default consoles for user interaction
Stefan Berger [Wed, 15 Sep 2021 01:25:03 +0000 (09:25 +0800)]
OvmfPkg/TPM PPI: Connect default consoles for user interaction

Activate the default console when user interaction is required for
the processing of TPM 2 physical presence interface opcodes.

Background:
TPM 2 physical presence interface (PPI) opcodes need to be handled before
the TPM 2 platform hierarchy is disabled. Due to this requirement we will
move the function call to handle the PPI opcodes into
PlatformBootManagerBeforeConsole() which runs before the initialization
of the consoles. However, since for interaction with the user we need
the console to be available, activate it now before displaying any message
to the user.

Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Peter Grehan <grehan@freebsd.org>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
2 years agoUefiPayloadPkg: Update maximum logic processor to 256
Cheng-Chieh Huang [Wed, 26 May 2021 08:01:39 +0000 (08:01 +0000)]
UefiPayloadPkg: Update maximum logic processor to 256

Signed-off-by: Cheng-Chieh Huang <chengchieh@google.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Cheng-Chieh Huang <chengchieh@google.com>
Cc: Daniel Schaefer <daniel.schaefer@hpe.com>
Cc: Trammell Hudson <hudson@trmm.net>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
2 years agoBaseTools: Remove hard-coded strings for target and tools_def
Pierre Gondois [Thu, 23 Sep 2021 08:59:03 +0000 (16:59 +0800)]
BaseTools: Remove hard-coded strings for target and tools_def

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3653

The "target.txt" and "tools_def.txt" filenames are hard-coded
at some places when global definitions are available at:
BaseTools/Source/Python/Common/TargetTxtClassObject.py:
DefaultTargetTxtFile
and
BaseTools/Source/Python/Common/ToolDefClassObject.py:
DefaultToolsDefFile

Use these global definitions instead.

Also remove the unused gBuildConfiguration and gToolsDefinition
variables from build.py

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2 years agoBaseTools: Remove Makefile/MakefileName fields
Pierre Gondois [Thu, 23 Sep 2021 08:59:02 +0000 (16:59 +0800)]
BaseTools: Remove Makefile/MakefileName fields

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3653

The Makefile and MakefilName fields are never set/used. Remove them.
To check this, the following commands can be used:
- grep -rIn "\.Makefile"
- grep -rIn "\.MakefileName"

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2 years agoBaseTools/build: Set MakefileName
Pierre Gondois [Thu, 23 Sep 2021 08:59:01 +0000 (16:59 +0800)]
BaseTools/build: Set MakefileName

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3653

Running the following command:
  python3 build/build.py -a AARCH64 -t GCC5
  -p ArmPlatformPkg/ArmPlatformPkg.dsc -b DEBUG libraries
triggers the following error:
  make: *** Build/ArmPlatform/DEBUG_GCC5/AARCH64/MdePkg/Library/
  BasePcdLibNull/BasePcdLibNull: Is a directory.  Stop.

Indeed, MakefileName is set to en empty string. Setting MakefileName
resolves the error.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2 years agoBaseTools/GenMake: Use ToolDefinition as fallback option
Pierre Gondois [Thu, 23 Sep 2021 08:59:00 +0000 (16:59 +0800)]
BaseTools/GenMake: Use ToolDefinition as fallback option

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3653

Use the value set in tools_def.txt when the makefile type is
not explicitly set via BuildOption. This allows to have a
valid default makefile name instead of an empty string.

Also use GMAKE_FILETYPE instead of hard-coded "gmake".

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Chris Jones <christopher.jones@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
2 years agoBaseTools: Switch to downloading the AARCH64 compiler from Arm's site
Rebecca Cran [Mon, 30 Aug 2021 05:14:50 +0000 (13:14 +0800)]
BaseTools: Switch to downloading the AARCH64 compiler from Arm's site

Linaro no longer do gcc releases - they're done by Arm now.

Update gcc_aarch64_linux_ext_dep.yaml to fetch the latest AARCH64 gcc
release (10.3-2021.07) from their site and fix LinuxGcc5ToolChain.py with the
new GCC_AARCH64_PREFIX.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Acked-by: Leif Lindholm <leif@nuviainc.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Pierre Gondois <Pierre.Gondois@arm.com>
Acked-by: Bob Feng <bob.c.feng@intel.com>
2 years agoBaseTools: Switch to downloading the ARM compiler from Arm's site
Rebecca Cran [Mon, 30 Aug 2021 05:14:49 +0000 (13:14 +0800)]
BaseTools: Switch to downloading the ARM compiler from Arm's site

Linaro no longer do gcc releases - they're done by Arm now.
Update gcc_arm_linux_ext_dep.yaml to fetch the latest ARM gcc release
(10.3-2021.07) from their site and fix LinuxGcc5ToolChain.py with the
new GCC_ARM_PREFIX.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Acked-by: Leif Lindholm <leif@nuviainc.com>
Acked-by: Liming Gao <gaoliming@byosoft.com.cn>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Pierre Gondois <Pierre.Gondois@arm.com>
Acked-by: Bob Feng <bob.c.feng@intel.com>
2 years agoUefiPayloadPkg: Add ".upld_info" in universal payload
Guo Dong [Fri, 24 Sep 2021 21:14:28 +0000 (14:14 -0700)]
UefiPayloadPkg: Add ".upld_info" in universal payload

V2: Use LittleEndianStructure by review comment.

From the universal scalable firmware payload requirement V0.75,
Payload must have Universal Payload Information Section ".upld_info"
So update the build tool to add this section.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
2 years agoUefiPayloadPkg: Use dummy constructor for PlatformHookLib
Guo Dong [Fri, 24 Sep 2021 04:56:16 +0000 (21:56 -0700)]
UefiPayloadPkg: Use dummy constructor for PlatformHookLib

The Library constructor is only used for library dependency.
So use a dummy function to make it clear instead of using an
actual function.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
2 years agoUefiPayloadPkg: Build a HOB from bootloader ACPI table
Guo Dong [Tue, 28 Sep 2021 16:38:53 +0000 (09:38 -0700)]
UefiPayloadPkg: Build a HOB from bootloader ACPI table

V2: Update BuildHobFromAcpi() to return a HOB pointer.

For universal UEFI payload, build a HOB from the ACPI table, so that
other modules could use this info from HOB at very early DXE phase.
This code are shared by universal payload and non universal payload.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
2 years agoMdePkg: Fix DEVICE_SECURITY_EVENT_DATA_HEADER version definition
yi1 li [Thu, 23 Sep 2021 01:57:08 +0000 (09:57 +0800)]
MdePkg: Fix DEVICE_SECURITY_EVENT_DATA_HEADER version definition

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3646

According to latest TCG PFP spec 1.05 revision 23,
(https://trustedcomputinggroup.org/resource/pc-client-specific
-platform-firmware-profile-specification/),
10.2.7 DEVICE_SECURITY_EVENT_DATA Structure,
the version should be 1.

Signed-off-by: yi1 li <yi1.li@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2 years agoMdeModulePkg/BootManagerMenuApp: Limit string drawing within one line
Zhichao Gao [Thu, 9 Sep 2021 06:17:04 +0000 (14:17 +0800)]
MdeModulePkg/BootManagerMenuApp: Limit string drawing within one line

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3590

Limit the draw box always within the screen's column and row.
Limit the string drawing within one line.
For the incompleted string the last 3 characters in one line would
be replaced with "...".

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2 years agoMdeModulePkg/PciBusDxe: Improve the flow of testing support attributes
xueshengfeng [Fri, 24 Sep 2021 06:30:45 +0000 (14:30 +0800)]
MdeModulePkg/PciBusDxe: Improve the flow of testing support attributes

https://bugzilla.tianocore.org/show_bug.cgi?id=3635

Currently, in order to test the supported attributes,
the PciTestSupportedAttribute() will set the command register
to 0x27 (EFI_PCI_COMMAND_IO_SPACE, EFI_PCI_COMMAND_MEMORY_SPACE,
EFI_PCI_COMMAND_BUS_MASTER, EFI_PCI_COMMAND_VGA_PALETTE_SNOOP) firstly,
and then read back to check whether these attributes are
set successfully in the device.
This will cause the other enabled bits
 (other than EFI_PCI_COMMAND_IO_SPACE,EFI_PCI_COMMAND_MEMORY_SPACE,
 EFI_PCI_COMMAND_BUS_MASTER,EFI_PCI_COMMAND_VGA_PALETTE_SNOOP)
 be cleared for a short of time
 This patch fixes this issue by keeping the origina
 enabled bits when setting 0x27.

Signed-off-by: xueshengfeng <xueshengfeng@byosoft.com.cn>
Reviewed-by: Ray <ray.ni@intel.com>
2 years agoUefiPayloadPkg: Add Macro to enable or disable some drivers.
Zhiguang Liu [Sat, 18 Sep 2021 07:10:29 +0000 (15:10 +0800)]
UefiPayloadPkg: Add Macro to enable or disable some drivers.

Add Macro to enable or disable RamDiskDxe and SioBusDxe drivers.

Cc: Guo Dong <guo.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Maurice Ma <maurice.ma@intel.com>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
2 years agoEmbeddedPkg: Add LoadFile2 for linux initrd
Jeff Brasen [Mon, 13 Sep 2021 23:18:51 +0000 (23:18 +0000)]
EmbeddedPkg: Add LoadFile2 for linux initrd

Add support under a pcd feature for using the new interface to pass
initrd to the linux kernel instead of via device tree.
This feature is also enabled if ACPI tables are present, and will skip
locating and installation of device tree.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2 years agoEmbeddedPkg: Install FDT if UpdateDtb is not present
Jeff Brasen [Mon, 13 Sep 2021 23:18:50 +0000 (23:18 +0000)]
EmbeddedPkg: Install FDT if UpdateDtb is not present

Currently if mAndroidBootImg->UpdateDtb is not supported on the platform
the device tree updates of the initrd are not made.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2 years agoEmbeddedPkg: AndroidBootImgBoot error handling updates
Jeff Brasen [Mon, 13 Sep 2021 23:18:49 +0000 (23:18 +0000)]
EmbeddedPkg: AndroidBootImgBoot error handling updates

Update AndroidBootImgBoot to use a single return point
Make sure Kernel args are freed and Image is unloaded.

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2 years agoEmbeddedPkg: Remove duplicate libfdt.h include
Jeff Brasen [Mon, 13 Sep 2021 23:18:48 +0000 (23:18 +0000)]
EmbeddedPkg: Remove duplicate libfdt.h include

Remove duplicate libfdt.h include statement in AndroidBootImgLib

Signed-off-by: Jeff Brasen <jbrasen@nvidia.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2 years agoOvmfPkg: set a default value for the WorkAreaHeader PCD
Corvin Köhne [Fri, 17 Sep 2021 05:37:24 +0000 (07:37 +0200)]
OvmfPkg: set a default value for the WorkAreaHeader PCD

SEC checks in IsSevGuest if the PCD defined WorkAreaHeader size
matches the size of the WorkAreaHeader struct definition. Set a
default value for the PCD to avoid unnecessary DSC/FDF file
changes in all OVMF DSC/FDF files.

Signed-off-by: Corvin Köhne <c.koehne@beckhoff.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2 years agoIntelFsp2WrapperPkg: Make PcdFspModeSelection dynamic
Zhang Xiaoqiang [Thu, 16 Sep 2021 03:44:47 +0000 (11:44 +0800)]
IntelFsp2WrapperPkg: Make PcdFspModeSelection dynamic

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3632

PcdFspModeSelection will be used to set FSP mode.
Make PcdFspModeSelection dynamic and set it accordingly.

Signed-off-by: Zhang Xiaoqiang <xiaoqiang.zhang@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
2 years agoSecurityPkg: Add debug log for indicating IBB verified OBB successfully
Yang, Longlong [Fri, 17 Sep 2021 02:50:55 +0000 (10:50 +0800)]
SecurityPkg: Add debug log for indicating IBB verified OBB successfully

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3615

Debug message should be added for indicating IBB is successfully verifying
the OBB.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Min M Xu <min.m.xu@intel.com>
Cc: Qi Zhang <qi1.zhang@intel.com>
Signed-off-by: Longlong Yang <longlong.yang@intel.com>
Reviewed-by: Min M Xu <min.m.xu@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
2 years agoUefiCpuPkg: SecCoreNative without ResetVector
S, Ashraf Ali [Thu, 16 Sep 2021 14:26:37 +0000 (22:26 +0800)]
UefiCpuPkg: SecCoreNative without ResetVector

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3492

Currently SecCore.inf having the resetvector code under IA32. if the
user wants to use both SecCore and UefiCpuPkg ResetVector it's not
possible, since SecCore and ResetVector(VTF0.INF/ResetVector.inf)
are sharing the same GUID which is BFV. to overcome this issue we can
create the Duplicate version of the SecCore.inf as SecCoreNative.inf
which contains pure SecCore Native functionality without resetvector.
SecCoreNative.inf should have the Unique GUID so that it can be used
along with UefiCpuPkg ResetVector in there implementation.

Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Debkumar De <debkumar.de@intel.com>
Cc: Harry Han <harry.han@intel.com>
Cc: Catharine West <catharine.west@intel.com>
Cc: Digant H Solanki <digant.h.solanki@intel.com>
Cc: Sangeetha V <sangeetha.v@intel.com>
Signed-off-by: Ashraf Ali S <ashraf.ali.s@intel.com>
2 years agoArmPkg/ProcessorSubClassDxe: Fix the format of ProcessorId
Nhi Pham [Wed, 15 Sep 2021 13:55:32 +0000 (20:55 +0700)]
ArmPkg/ProcessorSubClassDxe: Fix the format of ProcessorId

According to SMBIOS 3.4, section 7.5.3.3 ARM64-class CPUs, if
SMCCC_ARCH_SOC_ID is supported, the first DWORD is the JEP-106 code and
the second DWORD is the SoC revision value. But in the current
implementation, they are set in reverse. This patch is to correct it.

Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Rebecca Cran <rebecca@nuviainc.com>
Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com>
Reviewed-by: Rebecca Cran <rebecca@nuviainc.com>
Acked-by: Leif Lindholm <leif@nuviainc.com>