Satoshi Tanda
c410ad4da4
MdePkg/BaseLib: Fix AsmReadSs() with GCC toolchain
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3405
AsmReadSs() in Ia32/GccInlinePriv.c and X64/GccInlinePriv.c return the
DS segment selector value instead of SS.
Signed-off-by: Satoshi Tanda <tanda.sat@gmail.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
2021-06-04 03:24:04 +00:00
Pierre Gondois
039e07f626
MdePkg/MdeModulePkg: Move AML_NAME_SEG_SIZE definition
...
A NameSeg is made 4 chars.
Cf. ACPI 6.4 s20.2.2 "Name Objects Encoding":
NameSeg := <leadnamechar namechar namechar namechar>
Notice that NameSegs shorter than 4 characters are filled
with trailing underscores (‘_’s).
AML_NAME_SEG_SIZE is currently defined in:
- DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h
- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h
Since the value can be inferred from the ACPI specification
and to avoid multiple definitions, move it to
MdePkg/Include/IndustryStandard/
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Star Zeng <star.zeng@intel.com >
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com >
2021-06-02 09:57:17 +00:00
Ashish Singhal
fdf3666f01
MdePkg: Update DBG2 and SPCR header with NVIDIA 16550 Subtype
...
Add macros for NVIDIA 16550 UART specific debug port subtype in both
DBG2 as well as SPCR header file.
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com >
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Sunny Wang <sunny.wang@arm.com >
2021-06-01 03:28:16 +00:00
Marcin Wojtas
197e27c90a
MdePkg: Add new 16550-compatible Serial Port Subtypes to DBG2
...
The Microsoft Debug Port Table 2 (DBG2) specification revision
May 31, 2017 adds support for 16550-compatible Serial Port
Subtype with parameters defined in Generic Address Structure (GAS) [1]
Reflect that in the EDK2 headers.
[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/acpi-debug-port-table
Signed-off-by: Marcin Wojtas <mw@semihalf.com >
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Sunny Wang <sunny.wang@arm.com >
2021-06-01 03:28:16 +00:00
Kun Qin
d3ff5dbe1d
MdePkg: MmControl: Fix function and structure definition mismatches
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3397
Current Ppi/MmControl.h file has structure definition of "struct
_PEI_MM_CONTROL_PPI". This name mismatches with its definition in PI
Specification v1.7 (Errata) as "struct _EFI_PEI_MM_CONTROL_PPI".
In addition, field types "PEI_MM_ACTIVATE" and "PEI_MM_DEACTIVATE" used
in "struct _PEI_MM_CONTROL_PPI" mismatches with the definition of
"EFI_PEI_MM_ACTIVATE" and "EFI_PEI_MM_DEACTIVATE" in the PI spec.
This change fixes these mismatches by using the PI spec defined names.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Fixes: 6f33f7a262
Signed-off-by: Kun Qin <kuqin12@gmail.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-06-01 02:10:53 +00:00
Tom Lendacky
2b5b2ff04d
MdePkg/BaseLib: add support for RMPADJUST instruction
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
The RMPADJUST instruction will be used by the SEV-SNP guest to modify the
RMP permissions for a guest page. See AMD APM volume 3 for further
details.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-9-brijesh.singh@amd.com >
2021-05-29 12:15:21 +00:00
Brijesh Singh
5a7cbd54a1
MdePkg/BaseLib: add support for PVALIDATE instruction
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
The PVALIDATE instruction validates or rescinds validation of a guest
page RMP entry. Upon completion, a return code is stored in EAX, rFLAGS
bits OF, ZF, AF, PF and SF are set based on this return code. If the
instruction completed succesfully, the rFLAGS bit CF indicates if the
contents of the RMP entry were changed or not.
For more information about the instruction see AMD APM volume 3.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-8-brijesh.singh@amd.com >
2021-05-29 12:15:21 +00:00
Tom Lendacky
dfd41aef78
MdePkg/Register/Amd: define GHCB macros for SNP AP creation
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
Version 2 of GHCB introduces NAE for creating AP when SEV-SNP is enabled
in the guest VM. See the GHCB specification, Table 5 "List of Supported
Non-Automatic Events" and sections 4.1.9 and 4.3.2, for further details.
While at it, define the VMSA state save area that is required for creating
the AP. The save area format is defined in AMD APM volume 2, Table B-4
(there is a mistake in the table that defines the size of the reserved
area at offset 0xc8 as a dword, when it is actually a word). The format of
the save area segment registers is further defined in AMD APM volume 2,
sections 10 and 15.5.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-7-brijesh.singh@amd.com >
[lersek@redhat.com: fix typo in BZ reference]
2021-05-29 12:15:21 +00:00
Brijesh Singh
4665fa6503
MdePkg/Register/Amd: define GHCB macro for the Page State Change
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
The Page State Change NAE exit will be used by the SEV-SNP guest to
request a page state change using the GHCB protocol. See the GHCB
spec section 4.1.6 and 2.3.1 for more detail on the structure
definitions.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Erdem Aktas <erdemaktas@google.com >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-6-brijesh.singh@amd.com >
2021-05-29 12:15:21 +00:00
Brijesh Singh
f0983b2074
MdePkg/Register/Amd: define GHCB macro for Register GPA structure
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
An SEV-SNP guest is required to perform the GHCB GPA registration. See
the GHCB specification for further details.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Erdem Aktas <erdemaktas@google.com >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-5-brijesh.singh@amd.com >
2021-05-29 12:15:21 +00:00
Brijesh Singh
34e16ff883
MdePkg/Register/Amd: define GHCB macros for hypervisor feature detection
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
Version 2 of GHCB introduces advertisement of features that are supported
by the hypervisor. See the GHCB spec section 2.2 for an additional details.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Erdem Aktas <erdemaktas@google.com >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-4-brijesh.singh@amd.com >
2021-05-29 12:15:21 +00:00
Brijesh Singh
f828fc9876
MdePkg/Register/Amd: realign macros with more space for future expansion
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
Version 2 of the GHCB spec introduces several new SNP-specific NAEs.
Unfortunately, the names for those NAEs break the alignment. Add some
white spaces so that the SNP support patches do not break the alignment.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-3-brijesh.singh@amd.com >
2021-05-29 12:15:21 +00:00
Brijesh Singh
0095070e70
MdePkg/Register/Amd: expand the SEV MSR to include the SNP definition
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3275
Define the SEV-SNP MSR bits.
Cc: James Bottomley <jejb@linux.ibm.com >
Cc: Min Xu <min.m.xu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Tom Lendacky <thomas.lendacky@amd.com >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Erdem Aktas <erdemaktas@google.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com >
Message-Id: <20210519181949.6574-2-brijesh.singh@amd.com >
2021-05-29 12:15:21 +00:00
Rebecca Cran
9301e5644c
MdePkg/BaseRngLib: Add support for ARMv8.5 RNG instructions
...
Make BaseRngLib more generic by moving x86-specific functionality into
'Rand' and adding files under 'AArch64' to support the optional ARMv8.5
RNG instruction RNDR that is a part of FEAT_RNG.
Signed-off-by: Rebecca Cran <rebecca@nuviainc.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com >
2021-05-11 16:26:05 +00:00
Jason
0bbc207275
MdePkg/Cpuid.h: Define new element in CPUID Leaf(07h) data structure.
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3309
Define new element(Hybird) in CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS
(07h) data structure.
Signed-off-by: Jason Lou <yun.lou@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 >
Reviewed: Ray Ni <ray.ni@intel.com >
2021-04-20 01:27:58 +00:00
Michael D Kinney
db2338af0d
MdePkg/Include: Allow CPU specific defines to be predefined
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3308
The EDK II Build Specifications do not restrict the set of
CPU architectures that can be supported. Remove places in
the EDK II that assumes a fixed set of CPU architectures.
Update EFI_REMOVABLE_MEDIA_FILE_NAME to allow it to be
predefined in tools_def.txt or a DSC file [BuildOptions]
section using a *_*_*_CC_FLAGS statement.
Add support for the following two defines. If neither are
defines, then preserve the current behavior. If either is
defined, then compare these 16-bit values to Machine in the
EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) and
EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) macros.
* EFI_IMAGE_MACHINE_TYPE_VALUE
* EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Andrew Fish <afish@apple.com >
Cc: Abner Chang <abner.chang@hpe.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Abner Chang <abner.chang@hpe.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-04-15 15:58:44 +00:00
Abner Chang
7cc8cd7b58
RedfishPkg/RestJsonStructureDxe: Fix typo in function header
...
In v2, BZ reference is added.
BZ#:3030
Fix the typo [in]/[out] of parameter DestroyStructure in
function header.
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Reviewed-by: Nickle Wang <nickle.wang@hpe.com >
2021-04-15 07:33:32 +00:00
Takuto Naito
037090cb7c
MdePkg: Fix AsmReadMsr64() and AsmWriteMsr64() with GCC toolchain
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3325
1. AsmReadMsr64() in X64/GccInlinePriv.c
AsmReadMsr64 can return uninitialized value if FilterBeforeMsrRead
returns False. This causes build error with the CLANG toolchain.
2. AsmWriteMsr64() in X64/GccInlinePriv.c
In the case that FilterBeforeMsrWrite changes Value and returns True,
The original Value, not the changed Value, is written to the MSR.
This behavior is different from the one of AsmWriteMsr64() in
X64/WriteMsr64.c for the MSFT toolchain.
Signed-off-by: Takuto Naito <naitaku@gmail.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-04-14 01:50:19 +00:00
Anthony PERARD
44ad51d6b1
MdePkg: Allow PcdFSBClock to by Dynamic
...
We are going to want to change the value of PcdFSBClock at run time in
OvmfXen, so move it to the PcdsDynamic section.
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2490
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Message-Id: <20210412133003.146438-3-anthony.perard@citrix.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-04-13 11:54:58 +00:00
Dandan Bi
dc4d42302c
MdePkg/Baseib: Filter/trace MSR access for IA32/X64
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
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: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
2021-04-08 02:02:57 +00:00
Dandan Bi
38c8be123a
MdePkg/IoLib: Filter/trace port IO/MMIO access
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
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: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
2021-04-08 02:02:57 +00:00
Jiaxin Wu
4ac0296201
MdePkg/BaseLib: Add support for the XSETBV instruction
...
*v2: refine the coding format.
https://bugzilla.tianocore.org/show_bug.cgi?id=3284
This patch is to support XSETBV instruction so as to support
Extended Control Register(XCR) write.
Extended Control Register(XCR) read has already been supported
by below commit to support XGETBV instruction:
9b3ca509ab
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Ni Ray <ray.ni@intel.com >
Cc: Yao Jiewen <jiewen.yao@intel.com >
Signed-off-by: Jiaxin Wu <Jiaxin.wu@intel.com >
Signed-off-by: Zhang Hongbin1 <hongbin1.zhang@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-04-06 00:43:49 +00:00
Michael D Kinney
8c10a2c014
MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3286
Remove duplicate declaration of structure type
EFI_RESET_NOTIFICATION_PROTOCOL from ResetNotification.h. The
forward declaration of the top of this file already declared
this type.
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-04-01 23:16:31 +00:00
Michael D Kinney
32976569af
MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3285
Remove duplicate declaration of structure type
EFI_HII_POPUP_PROTOCOL from HiiPopup.h. The forward
declaration of the top of this file already declared
this type.
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-04-01 23:16:31 +00:00
Dandan Bi
821e042f42
MdePkg: Consume MdeLibs.dsc.inc for RegisterFilterLib
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
MdeLibs.dsc.inc was added for some basic/default library
instances provided by MdePkg and RegisterFilterLibNull Library
was also added into it as the first version of MdeLibs.dsc.inc.
So update platform dsc to consume MdeLibs.dsc.inc for
RegisterFilterLibNull which will be consumed by IoLib and BaseLib.
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: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
2021-03-31 05:47:10 +00:00
Dandan Bi
98ff7e3c63
MdePkg: Add MdeLibs.dsc.inc file to MdePkg
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
MdeLibs.dsc.inc is added for some default libraries provided by MdePkg.
Platform can include MdeLibs.dsc.inc file to avoid some potential
incompatible changes to platform dsc file in future.
Only add RegisterFilterLib into it as the first version of MdeLibs.dsc.inc.
Can update and maintain MdeLibs.dsc.inc gradually later.
"MdeLibs.dsc.inc" for the [LibraryClasses*] section(s)
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
2021-03-30 12:48:30 +00:00
Dandan Bi
1c11e7a214
MdePkg: Add RegisterFilterLib class and NULL instance
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3246
1. Add a new library class (RegisterFilterLib) to filter
and trace port IO/MMIO/MSR access.
2. Add a NULL instance (RegisterFilterLibNull) can be used
to keep current behavior.
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: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Acked-by: Ard Biesheuvel <ardb@kernel.org >
Reviewed-by: Abner Chang <abner.chang@hpe.com >
2021-03-30 12:48:30 +00:00
Abner Chang
fe66288873
MdePkg/Include: EFI Redfish Discover protocol
...
Move GUID definition of EFI Redfish Discover protocol
to under MdePkg. With this we don't have dependency of
RedfishPkg in ShellPkg.
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Cc: Peter O'Hanley <peter.ohanley@hpe.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-03-26 02:56:22 +00:00
Ankur Arora
4bf2a5b045
MdePkg: use CpuPause() in CpuDeadLoop()
...
CpuPause() might allow the CPU to go into a lower power state
state while we spin.
On X86, CpuPause() executes a PAUSE instruction which the Intel
and AMD specs describe as follows:
Intel:
"PAUSE: An additional function of the PAUSE instruction is to reduce
the power consumed by a processor while executing a spin loop. A
processor can execute a spin-wait loop extremely quickly, causing the
processor to consume a lot of power while it waits for the resource it
is spinning on to become available. Inserting a pause instruction in a
spin-wait loop greatly reduces the processor?s power consumption."
AMD:
"PAUSE: Improves the performance of spin loops, by providing a hint to
the processor that the current code is in a spin loop. The processor
may use this to optimize power consumption while in the spin loop.
Architecturally, this instruction behaves like a NOP instruction."
On RISC-V and ARM64, CpuPause() executes a NOP, which is no worse than
the tight loop we have.
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-03-25 03:40:17 +00:00
Jiaxin Wu
9fd7e88c23
MdePkg: Support standalone MM Driver Unload capability
...
https://bugzilla.tianocore.org/show_bug.cgi?id=3240
This patch is to support standalone MM Driver Unload capability
by providing _DriverUnloadHandler() function.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Signed-off-by: Jiaxin Wu <Jiaxin.wu@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-03-18 04:16:21 +00:00
Chandramohan Akula
2e51b27fed
MdePkg/UefiLib: Correct the arguments passed to IsLanguageSupported()
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3211
Correct the arguments passed to the IsLanguageSupported() function in
AddUnicodeString2() and LookupUnicodeString2() as expected by the function
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: Chandramohan Akula <chandramohan.akula@broadcom.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-03-17 01:42:43 +00:00
Ray Ni
e59760f87e
MdePkg/Nasm.inc: add macros for C types used in structure definition
...
Signed-off-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 >
2021-03-08 02:22:37 +00:00
Kun Qin
7cda5d9e3a
MdePkg: MmUnblockMemoryLib: Added definition and null instance
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3168
This interface provides an abstration layer to allow MM modules to access
requested areas that are outside of MMRAM. On MM model that blocks all
non-MMRAM accesses, areas requested through this API will be mapped or
unblocked for accessibility inside MM environment.
For MM modules that need to access regions outside of MMRAMs, the agents
that set up these regions are responsible for invoking this API in order
for these memory areas to be accessible from inside MM.
Example usages:
1. To enable runtime cache feature for variable service, Variable MM
module will need to access the allocated runtime buffer. Thus the agent
sets up these buffers, VariableSmmRuntimeDxe, will need to invoke this
API to make these regions accessible by Variable MM.
2. For TPM ACPI table to communicate to physical presence handler, the
corresponding NVS region has to be accessible from inside MM. Once the
NVS region are assigned, it needs to be unblocked thourgh this API.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Hao A Wu <hao.a.wu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Signed-off-by: Kun Qin <kun.q@outlook.com >
Acked-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Message-Id: <MWHPR06MB31028AF0D0785B93E4E7CF63F3969@MWHPR06MB3102.namprd06.prod.outlook.com >
2021-03-05 15:25:07 +00:00
Sheng Wei
bdf1df8a5f
MdePkg/Include: Add CET instructions to Nasm.inc
...
This is to add instruction SAVEPREVSSP, CLRSSBSY and RSTORSSP_RAX in Nasm.
The open CI is using NASM 2.14.02.
CET instructions are supported since NASM 2.15.01.
DB-encoded CET instructions need to be removed after open CI update to
NASM 2.15.01.
The BZ ticket is https://bugzilla.tianocore.org/show_bug.cgi?id=3227 .
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3192
Signed-off-by: Sheng Wei <w.sheng@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
2021-03-02 05:11:55 +00:00
Rebecca Cran
4e1f316cec
MdePkg: Update IndustryStandard/SmBios.h with processor status data
...
Add a bitfield that describes the structure of the byte in the Status
field of the SMBIOS Type 4 Processor Information table.
Signed-off-by: Rebecca Cran <rebecca@nuviainc.com >
Reviewed-by: Leif Lindholm <leif@nuviainc.com >
Acked-by: Sami Mujawar <sami.mujawar@arm.com >
2021-02-08 19:35:23 +00:00
Kun Qin
14a746bb6a
MdePkg: UefiDevicePathLib: Support UefiDevicePathLib under StandaloneMm
...
This change added an instance of UefiDevicePathLib for StandaloneMm. It
abstracts DevicePathFromHandle function into different files for
Standalone MM and other instances to avoid linking gBS into MM_STANDALONE
drivers.
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 <kun.q@outlook.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-02-01 10:03:35 -08:00
Michael Kubacki
ea56ebf67d
MdePkg/SmiHandlerProfileLibNull: Add MM_STANDALONE support
...
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3184
Allows the library instance to be linked with MM_STANDALONE modules.
Cc: Eric Dong <eric.dong@intel.com >
Cc: Hao A Wu <hao.a.wu@intel.com >
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-02-01 01:40:38 +00:00
Lou, Yun
2d6fc9d36f
MdePkg/Cpuid.h: Change and add some macro definitions.
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3105
Change and add some macro definitions about
CPUID_HYBRID_INFORMATION Leaf(1Ah).
Signed-off-by: Jason Lou <yun.lou@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 >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Cc: Rahul Kumar <rahul1.kumar@intel.com >
2021-01-26 04:14:10 +00:00
Nhi Pham
96a9acfc52
MdePkg/Tpm2Acpi.h: Add Start Method Specific Parameters for ARM SMC
...
Add Start Method Specific Parameters for ARM SMC Start Method described
in the TCG ACPI Specification version 1.2, revision 8.
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: Nhi Pham <nhi@os.amperecomputing.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2021-01-25 02:21:32 +00:00
Jason Lou
79f3404ad8
MdePkg/Cpuid.h: Add CPUID_HYBRID_INFORMATION Leaf(1Ah).
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3105
The UefiCpuPkg/CpuCacheInfoLib will reference new definition
about CPUID_HYBRID_INFORMATION Leaf(1Ah).
Signed-off-by: Jason Lou <yun.lou@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 >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2021-01-19 14:03:04 +00:00
Marc Moisson-Franckhauser
a955c6f97f
MdePkg/IndustryStandard: AEST Table definition
...
Bugzilla: 3049 (https://bugzilla.tianocore.org/show_bug.cgi?id=3049 )
Add definition for the Arm Error Source Table (AEST) described in
the ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document,
dated 28 September 2020.
(https://developer.arm.com/documentation/den0085/0101/ )
Signed-off-by: Marc Moisson-Franckhauser <marc.moisson-franckhauser@arm.com >
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com >
2021-01-08 03:50:34 +00:00
Samer El-Haj-Mahmoud
e61088c858
MdeModulePkg/Graphics: Fix spelling mistakes
...
Fix various spelling mistakes in GraphicsConsoleDxe, ConsPlitter,
and SimpleTextOut header
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Hao A Wu <hao.a.wu@intel.com >
Cc: Zhichao Gao <zhichao.gao@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Ard Biesheuvel <Ard.Biesheuvel@arm.com >
Cc: Pete Batard <pete@akeo.ie >
Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com >
Reviewed-by: Zhichao Gao <zhichao.gao@intel.com >
2021-01-06 05:27:29 +00:00
Luo, Heng
42fe8ca453
MdePkg: Define structures for Resizable BAR Capability
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3138
Define structures for Resizable BAR Capability in
MdePkg/Include/IndustryStandard/PciExpress21.h,
Change ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c
to use new structures.
Cc: Ray Ni <ray.ni@intel.com >
Cc: Hao A Wu <hao.a.wu@intel.com >
Signed-off-by: Heng Luo <heng.luo@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2021-01-04 08:25:28 +00:00
Sheng Wei
5c3cdebf95
MdePkg/include: Add DMAR SATC Table Definition
...
SoC Integrated Address Translation Cache (SATC) reporting structure is one
of the Remapping Structure, which is imported since Intel(R) Virtualization
Technology for Directed I/O (VT-D) Architecture Specification v3.2.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3109
Signed-off-by: Sheng Wei <w.sheng@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Jenny Huang <jenny.huang@intel.com >
Cc: Kowalewski Robert <robert.kowalewski@intel.com >
Cc: Feng Roger <roger.feng@intel.com >
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2020-12-15 11:18:52 +00:00
Rebecca Cran
0db89a661f
MdePkg,ShellPkg: Fix typo in SMBIOS_TABLE_TYPE17 field FirmwareVersion
...
"FirmwareVersion" was misspelled "FirwareVersion".
Also, update SmbiosView PrintInfo.c to use the new field name.
Signed-off-by: Rebecca Cran <rebecca@nuviainc.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2020-12-10 02:24:10 +00:00
Rebecca Cran
bd9da7b1da
MdePkg,ShellPkg: Fix typo in SMBIOS_TABLE_TYPE4 field ProcessorManufacturer
...
In SmBios.h, the SMBIOS_TABLE_TYPE4 field "ProcessorManufacture"
should be "ProcessorManufacturer".
Also, update SmbiosView PrintInfo.c to use the new field name.
Signed-off-by: Rebecca Cran <rebecca@nuviainc.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2020-12-10 02:24:10 +00:00
Rebecca Cran
e157c8f9ed
MdePkg: Fix typos in SmBios.h PROCESSOR_CHARACTERISTIC_FLAGS struct
...
Fix typos of "Processor64BitCapable", "ProcessorEnhancedVirtualization",
and Processor128BitCapable.
Signed-off-by: Rebecca Cran <rebecca@nuviainc.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2020-12-10 02:24:10 +00:00
Michael D Kinney
29d59baa39
MdePkg/IndustryStandard: Fix CXL 1.1 structure layout issues
...
https://bugzilla.tianocore.org/show_bug.cgi?id=3074
* Fix offset of LinkLayerControlAndStatus in the
CXL_1_1_LINK_CAPABILITY_STRUCTURE structure
* Fix offset of LinkLayerAckTimerControl in the
CXL_1_1_LINK_CAPABILITY_STRUCTURE structure
* Fix offset of LinkLayerDefeature in
the CXL_1_1_LINK_CAPABILITY_STRUCTURE structure
* Add CXL_11_SIZE_ASSERT() macro to verify the size of
a register layout structure at compile time and use
it to verify the sizes of the CXL 1.1 register structures.
* Add CXL_11_OFFSET_ASSERT() macro to verify the offset of
fields in a register layout structure at compiler time and
use it to verify the offset of fields in CXL 1.1
register structures.
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Ashraf Javeed <ashraf.javeed@intel.com >
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com >
Reviewed-by: Ashraf Javeed <ashraf.javeed@intel.com >
2020-11-17 01:57:22 +00:00
Pete Batard
4eea8f0136
MdePkg/BaseRngLibDxe: Add DXE_RUNTIME_DRIVER class to RngLib
...
The Raspberry Pi platform with Secure Boot enabled currently fails to build
with error:
Module type [DXE_RUNTIME_DRIVER] is not supported by library instance
[/home/appveyor/projects/rpi4/edk2/MdePkg/Library/DxeRngLib/DxeRngLib.inf]
Add the missing class to fix this issue.
Signed-off-by: Pete Batard <pete@akeo.ie >
Reviewed-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com >
Reviewed-by: Andrei Warkentin <awarkentin@vmware.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2020-11-13 03:39:41 +00:00
Abner Chang
5ec3033154
MdePkg: Add GUID for REST Style Formset
...
BZ: 2916
https://bugzilla.tianocore.org/show_bug.cgi?id=2916
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com >
Signed-off-by: Ye Ting <ting.ye@intel.com >
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com >
Signed-off-by: Wang Fan <fan.wang@intel.com >
Signed-off-by: Abner Chang <abner.chang@hpe.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <gaoliming@byosoft.com.cn >
Cc: Zhiguang Liu <zhiguang.liu@intel.com >
Cc: Nickle Wang <nickle.wang@hpe.com >
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn >
2020-11-11 00:53:00 +00:00