Date   

Re: [PATCH 08/10] OvmfPkg: Update Sec to support Tdvf Config-B

Min Xu
 

On January 14, 2022 4:32 PM, Gerd Hoffmann wrote:
I don't see that PEI-less boot is required for that. Sure, when
stripping down the build and removing all the features which require
PEIMs there isn't much left to do for the PEI phase. So it makes
sense to look into dropping PEI altogether. But it's more a "nice to have"
than a hard requirement, no?
No. I have to say PEI-less boot in Config-B is a hard requirement.
I'm still wondering why though. I have not yet seen a reason why config-b
can't use the PEI-based boot flow.
Hi, Gerd, I think Jiewen has discussed this (PEI-less boot in Config-B) in another mail thread. We can continue the discussion there. Let's first focus on the PlatformInitLib here. Thanks for your understanding.

4. But a basic version of PlatformInitLib is a good start.
Yes. Having initially only the functions needed by config-b in
PlatformInitLib is perfectly fine, but this should be a code *move* not a
copy.

During the development and community review, we can understand
better what functions should be wrapped into PlatformInitLib.
After that PlatformInitLib can be evolved for OvmfPkg/PlatformPei,
Bhyve/PlatformPei, XenPlatformPei.
Yes, most likely there are a number of opportunities to reduce code
duplication in the three PlatformPei variants we have by moving code
to the
(shared) PlatformInitLib.

That can be looked at later.
So let me summarize the discussion about PlatformInitLib.
1. PlatformInitLib wraps the common functions in OvmfPkg/PlatformPei.
These common functions covers the memory detection via fw_cfg, pci
init, cmos, (MemDetect.c/Platform.c/Cmos.c).
Yes. Everything needed for PEI-less / config-b boot moves to PlatformInitLib.

PlatformInitLib is added as dependency to OvmfPkg/PlatformPei, so
PlatformPei can call those functions when booting with PEI.

PEI-less boot will add PlatformInitLib to SEC (and DXE) instead so the same
code can be used then.

Not sure how to handle cmos best. Not needed for memory detection on
qemu, but cloudhw depends on it so it is back for now. Will cloudhw support
tdx too btw?
Yes, Cloudhw support TDX too. Actually we have some PoC and plan to upstream it later.
BTW, cmos is needed in GetSystemMemorySizeBelow4gb which call CmosRead for 0x34/0x35.

And PlatformInitLib will
not handle the S3/SMM variants.
At least not initially. Maybe later when we move more code to the lib to
reduce code duplication in xen/bhyve/qemu PlatformPei variants.

2. OvmfPkg/PlatformPei will be refactored with PlatformInitLib. The
functions not needed by config-b stay in PlatformPei.
3. Config-B support PEI-less boot for both legacy guest and td guest.
Yes.
Thanks
Min


Re: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE Drivers to use untested memory

Howell, Stacy <stacy.howell@...>
 

Hi Sean,
Setting all memory as tested in PEI is a workaround for the issue that this patch addresses. However, promoting all memory in PEI is not a workable solution for BIOSes that incorporate full memory testing functionality, as this relies on the tested flag to determine which memory regions to test.

This patch addresses a discrepancy in EDK2 core regarding how untested memory is treated for allocation by DXE drivers. In the case where a DXE driver does not request a specific memory region DXE Core will promote untested memory if necessary to provide memory to the driver. In the case where a DXE driver requests a specific memory range of untested memory, DXE Core will currently return an error instead of promoting untested memory to make the region available for the driver.

Thanks,
Stacy

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Tuesday, January 11, 2022 10:57 AM
To: devel@edk2.groups.io; spbrogan@outlook.com; Gao, Liming <gaoliming@byosoft.com.cn>; Howell, Stacy <stacy.howell@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Bi, Dandan <dandan.bi@intel.com>
Subject: RE: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE Drivers to use untested memory

Hi Sean,

The auto promotion of memory was only intended as a dev/debug feature to maximize platform boot without having to tune what memory is tested in PEI phase.

In my opinion, a production platform should never trigger any auto promotions of untested to tested memory, and part of production validation should make sure this event never occurs in any production boot scenarios.

The specific bug being fix here is that auto promotion was not symmetric across all memory allocation types. It simply aligns this dev/debug feature.

Mike

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Sean
Sent: Monday, January 10, 2022 6:47 PM
To: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>;
Howell, Stacy <stacy.howell@intel.com>
Cc: Bi, Dandan <dandan.bi@intel.com>
Subject: Re: 回复: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE
Drivers to use untested memory

if this is auto promotion is happening in the core then what is the
value of memory testing and tracking that state. Is memory testing
state a necessary feature of the Dxe Core?


I think it makes more sense that if you platform wants to use a given
range your platform should either test it and/or mark it as tested.

OR

The dxe core should do away with the memory testing tracking.


On most platforms i have seen in the past few years all memory is
marked as tested without doing any testing. The only value in the
flag is keep the initial memory allocations in a given low range (below 4gb).




On 1/10/2022 5:59 PM, gaoliming wrote:
Stacy:
This fix covers the case with AllocateAddress allocation type. I
agree this fix. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

Thanks
Liming
-----邮件原件-----
发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Stacy Howell
发送时间: 2022年1月8日 3:36
收件人: devel@edk2.groups.io
抄送: Stacy Howell <stacy.howell@intel.com>; Dandan Bi
<dandan.bi@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>
主题: [edk2-devel] [PATCH] MdeModulePkg\CoreDxe: Allow DXE Drivers to
use untested memory

REF: https://https://bugzilla.tianocore.org/show_bug.cgi?id=3795
CC: Dandan Bi <dandan.bi@intel.com>
CC: Liming Gao <gaoliming@byosoft.com.cn>

Updated CoreInternalAllocatePages() to call PromoteMemoryResource()
and re-attempt the allocation if unable to convert the specified
memory range

Signed-off-by: Stacy Howell <stacy.howell@intel.com>
---
MdeModulePkg/Core/Dxe/Mem/Page.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c
b/MdeModulePkg/Core/Dxe/Mem/Page.c
index 47d4c5d92e..cc0b90ac0d 100644
--- a/MdeModulePkg/Core/Dxe/Mem/Page.c
+++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
@@ -1417,6 +1417,20 @@ CoreInternalAllocatePages (
Status = CoreConvertPages (Start, NumberOfPages, MemoryType);
}

+ if (EFI_ERROR (Status)) {
+ //
+ // If requested memory region is unavailable it may be
+ untested
memory
+ // Attempt to promote memory resources, then re-attempt the
allocation
+ //
+ if (PromoteMemoryResource ()) {
+ if (NeedGuard) {
+ Status = CoreConvertPagesWithGuard (Start, NumberOfPages,
MemoryType);
+ } else {
+ Status = CoreConvertPages (Start, NumberOfPages, MemoryType);
+ }
+ }
+ }
+
Done:
CoreReleaseMemoryLock ();

--
2.32.0.windows.2













Re: [PATCH 01/79] ProcessorPkg/Include: Add header files of RISC-V processor package

Michael D Kinney
 

Hi Abner,

We already have a package for common platform content in the edk2 repo.
This is the MdeModulePkg.

However, the number of common platform features added to the MdeModulePkg over
time has made this a very large package, and this can be measured by how complex the
Maintainer.txt rules are for this package.

The revised approach is to create feature packages that platforms can add
if their platform requires that specific feature category. Examples are
NetworkPkg, SecurityPkg, FmpDevicePkg, FatPkg, RedfishPkg, SourceLevelDebugPkg.

Instead of adding another generic package such as CommonPlatformPkg, I
would prefer to see the libs/modules either added to existing packages
that match the feature category, or create new feature packages if
there is a new feature category.

We also try to limit the edk2 repo to components that are directly related
the UEFI/PI specifications and are not Si/Platform specific. Si/Platform
specific features go into the edk2-platforms repo. An example of a generic
feature in the edk2-platforms repo is Features/Ext4. The UEFI spec only
specifies FAT for UEFI boot from file system.

There are a number of other feature packages in edk2-platforms in the
Features directory, so you should review those as well to see if there
is natural landing zone for any of your components.

Mike

-----Original Message-----
From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Sent: Friday, January 14, 2022 3:15 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Leif Lindholm <leif@nuviainc.com>; devel@edk2.groups.io; Ni, Ray
<ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar <Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header files of RISC-V processor package



-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Friday, January 14, 2022 12:38 AM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Leif
Lindholm <leif@nuviainc.com>; devel@edk2.groups.io; Ni, Ray
<ray.ni@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header
files of RISC-V processor package

Hi Abner,

General recommendations included below. Of course each
lib/modules/include needs to be reviewed and the
best location selected. I am aware that there are components in edk2 that
do not follow these general
recommendations. This is due to content that was added before these
recommendations were established
and we have work to do to get everything aligned.

Mike

-----Original Message-----
From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Sent: Wednesday, January 12, 2022 9:34 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Leif Lindholm
<leif@nuviainc.com>; devel@edk2.groups.io; Ni, Ray
<ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header files of RISC-V processor package

HI Mike,
It is no problem to meet there. However, I am not available to join the
design meeting in the next two weeks. Before we can get
together to discuss the best locations, do you have information regarding
the rationale of driver/library location?

What is the best location for,
- Processor ARCH dependent modules
MdePkg for libs
UefiCpuPkg for modules

- Common modules for all processor ARCHs
Feature Packages based on the common feature. Add to existing if it fits.
Create new for completely new feature area.

- Platform module that is specific to processor ARCH?
edk2-platform repository
How about Leif's suggestion? The CommonPlatformPkg on edk2?

Abner


The only exception so far are platform modules used to support
OvmfPkg/QEMU to support CI.
In this case the modules are added to OvmfPkg.

- Platform module that is common to processor ARCHs?
edk2-platform repository

The only exception so far are platform modules used to support
OvmfPkg/QEMU to support CI.
In this case the modules are added to OvmfPkg.


Thanks
Abner

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Monday, January 10, 2022 11:58 PM
To: Leif Lindholm <leif@nuviainc.com>; devel@edk2.groups.io; Chang,
Abner
(HPS SW/FW Technologist) <abner.chang@hpe.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header
files of RISC-V processor package

Hi Abner,

I see comments from Leif as well.

Do you think a discussion in the design meeting Ray Ni runs would be
valuable
to review all the modules/libs/includes and discuss options for the best
location for them to reside in the edk2 repos?

Thanks,

Mike

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Monday, January 10, 2022 7:55 AM
To: Leif Lindholm <leif@nuviainc.com>; devel@edk2.groups.io; Chang,
Abner <abner.chang@hpe.com>; Kinney, Michael D
<michael.d.kinney@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header files of RISC-V processor package

Hi Abner,

I would also like to see some proposals on adding the RiscV CPU scoped
content
to the existing MdePkg/UefiCpuPkg instead of adding a new top level
CPU
package.

There is already some work started to move some of the ARM specific
content
from ARM CPU packages into MdePkg.

Thanks,

Mike

-----Original Message-----
From: Leif Lindholm <leif@nuviainc.com>
Sent: Monday, January 10, 2022 5:11 AM
To: devel@edk2.groups.io; Chang, Abner <abner.chang@hpe.com>
Cc: Andrew Fish <afish@apple.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header files of RISC-V processor package

On Sat, Jan 08, 2022 at 12:07:53 +0800, Abner Chang wrote:
(This is migrated from edk2-platforms:Silicon/RISC-V)

RISC-V processor package library definitions.

IndustryStandard/RiscV.h
-Add RiscV.h which conform with RISC-V Privilege Spec v1.10.

RiscVImpl.h
-Definition of EDK2 RISC-V implementation.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Co-authored-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Co-authored-by: Gilbert Chen <gilbert.chen@hpe.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Hmm, no.
I gave a reviewed-by for that patch to be merged into edk2-platforms
once upon a time. This is not relevant for migration to edk2.

My proposal for migrating this code would be as follows:
- Announce a hold on merging new code to RiscV portions of
edk2-platforms.
- Apply any and all bugfixes and CI/uncrustify fixes in place in
edk2-platforms.
- Get some level of agreement for what to do instead of
RiscVPlatformPkg - i.e. slot into MdeModulePkg instead.
- If that cannot be reached within a few days, create a new
top-level directory called "CommonPlatformPkg" or something,
with you, Daniel(/Gilbert?), Sami, me as maintainers.
- Move all of the RiscVPlatformPkg code under there instead.
- I'll follow with ArmPlatformPkg.
- PC/AT code should move across too over time.
- Move the rest of the code across unmodified as massive single
patches per package (potentially more patches than that for
RiscVPlatformPkg).
- Drop all existing Reviewed-by/Acked-by.
- After each "move" patch, insert a "fixup" patch to address the
things that need fixing due to path/name changes.

/
Leif

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Gilbert Chen <gilbert.chen@hpe.com>
---
.../Include/IndustryStandard/RiscV.h | 156
++++++++++++++++++
.../RISC-V/ProcessorPkg/Include/RiscVImpl.h | 87 ++++++++++
2 files changed, 243 insertions(+)
create mode 100644 Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h
create mode 100644 Silicon/RISC-
V/ProcessorPkg/Include/RiscVImpl.h

diff --git a/Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h b/Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h
new file mode 100644
index 0000000000..2a992394ed
--- /dev/null
+++ b/Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h
@@ -0,0 +1,156 @@
+/** @file
+ RISC-V package definitions.
+
+ Copyright (c) 2019, Hewlett Packard Enterprise Development LP.
All
rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef RISCV_INDUSTRY_STANDARD_H_
+#define RISCV_INDUSTRY_STANDARD_H_
+
+#if defined (MDE_CPU_RISCV64)
+#define RISC_V_XLEN_BITS 64
+#else
+#endif
+
+#define RISC_V_ISA_ATOMIC_EXTENSION (0x00000001 <<
0)
+#define RISC_V_ISA_BIT_OPERATION_EXTENSION
(0x00000001
<< 1)
+#define RISC_V_ISA_COMPRESSED_EXTENSION (0x00000001
<<
2)
+#define RISC_V_ISA_DOUBLE_PRECISION_FP_EXTENSION
(0x00000001 << 3)
+#define RISC_V_ISA_RV32E_ISA (0x00000001 << 4)
+#define RISC_V_ISA_SINGLE_PRECISION_FP_EXTENSION
(0x00000001 << 5)
+#define RISC_V_ISA_ADDITIONAL_STANDARD_EXTENSION
(0x00000001 << 6)
+#define RISC_V_ISA_RESERVED_1 (0x00000001 << 7)
+#define RISC_V_ISA_INTEGER_ISA_EXTENSION (0x00000001
<<
8)
+#define
RISC_V_ISA_DYNAMICALLY_TRANSLATED_LANGUAGE_EXTENSION
(0x00000001 << 9)
+#define RISC_V_ISA_RESERVED_2 (0x00000001 << 10)
+#define RISC_V_ISA_DECIMAL_FP_EXTENSION (0x00000001
<<
11)
+#define RISC_V_ISA_INTEGER_MUL_DIV_EXTENSION
(0x00000001
<< 12)
+#define RISC_V_ISA_USER_LEVEL_INTERRUPT_SUPPORTED
(0x00000001 << 13)
+#define RISC_V_ISA_RESERVED_3 (0x00000001 << 14)
+#define RISC_V_ISA_PACKED_SIMD_EXTENSION
(0x00000001 <<
15)
+#define RISC_V_ISA_QUAD_PRECISION_FP_EXTENSION
(0x00000001 << 16)
+#define RISC_V_ISA_RESERVED_4 (0x00000001 << 17)
+#define RISC_V_ISA_SUPERVISOR_MODE_IMPLEMENTED
(0x00000001 << 18)
+#define RISC_V_ISA_TRANSATIONAL_MEMORY_EXTENSION
(0x00000001 << 19)
+#define RISC_V_ISA_USER_MODE_IMPLEMENTED
(0x00000001
<< 20)
+#define RISC_V_ISA_VECTOR_EXTENSION (0x00000001 <<
21)
+#define RISC_V_ISA_RESERVED_5 (0x00000001 << 22)
+#define RISC_V_ISA_NON_STANDARD_EXTENSION
(0x00000001
<< 23)
+#define RISC_V_ISA_RESERVED_6 (0x00000001 << 24)
+#define RISC_V_ISA_RESERVED_7 (0x00000001 << 25)
+
+//
+// RISC-V CSR definitions.
+//
+//
+// Machine information
+//
+#define RISCV_CSR_MACHINE_MVENDORID 0xF11
+#define RISCV_CSR_MACHINE_MARCHID 0xF12
+#define RISCV_CSR_MACHINE_MIMPID 0xF13
+#define RISCV_CSR_MACHINE_HARRID 0xF14
+//
+// Machine Trap Setup.
+//
+#define RISCV_CSR_MACHINE_MSTATUS 0x300
+#define RISCV_CSR_MACHINE_MISA 0x301
+#define RISCV_CSR_MACHINE_MEDELEG 0x302
+#define RISCV_CSR_MACHINE_MIDELEG 0x303
+#define RISCV_CSR_MACHINE_MIE 0x304
+#define RISCV_CSR_MACHINE_MTVEC 0x305
+
+#define RISCV_TIMER_COMPARE_BITS 32
+//
+// Machine Timer and Counter.
+//
+//#define RISCV_CSR_MACHINE_MTIME 0x701
+//#define RISCV_CSR_MACHINE_MTIMEH 0x741
+//
+// Machine Trap Handling.
+//
+#define RISCV_CSR_MACHINE_MSCRATCH 0x340
+#define RISCV_CSR_MACHINE_MEPC 0x341
+#define RISCV_CSR_MACHINE_MCAUSE 0x342
+ #define MACHINE_MCAUSE_EXCEPTION_ MASK 0x0f
+ #define MACHINE_MCAUSE_INTERRUPT (RISC_V_XLEN_BITS -
1)
+#define RISCV_CSR_MACHINE_MBADADDR 0x343
+#define RISCV_CSR_MACHINE_MIP 0x344
+
+//
+// Machine Protection and Translation.
+//
+#define RISCV_CSR_MACHINE_MBASE 0x380
+#define RISCV_CSR_MACHINE_MBOUND 0x381
+#define RISCV_CSR_MACHINE_MIBASE 0x382
+#define RISCV_CSR_MACHINE_MIBOUND 0x383
+#define RISCV_CSR_MACHINE_MDBASE 0x384
+#define RISCV_CSR_MACHINE_MDBOUND 0x385
+
+//
+// Supervisor mode CSR.
+//
+#define RISCV_CSR_SUPERVISOR_SSTATUS 0x100
+ #define SSTATUS_SIE_BIT_POSITION 1
+ #define SSTATUS_SPP_BIT_POSITION 8
+#define RISCV_CSR_SUPERVISOR_SIE 0x104
+#define RISCV_CSR_SUPERVISOR_SSCRATCH 0x140
+#define RISCV_CSR_SUPERVISOR_SEPC 0x141
+#define RISCV_CSR_SUPERVISOR_SCAUSE 0x142
+ #define SCAUSE_USER_SOFTWARE_INT 0
+ #define SCAUSE_SUPERVISOR_SOFTWARE_INT 1
+ #define SCAUSE_USER_TIMER_INT 4
+ #define SCAUSE_SUPERVISOR_TIMER_INT 5
+ #define SCAUSE_USER_EXTERNAL_INT 8
+ #define SCAUSE_SUPERVISOR_EXTERNAL_INT 9
+#define RISCV_CSR_SUPERVISOR_STVAL 0x143
+#define RISCV_CSR_SUPERVISOR_SIP 0x144
+#define RISCV_CSR_SUPERVISOR_SATP 0x180
+
+#if defined (MDE_CPU_RISCV64)
+ #define RISCV_SATP_MODE_MASK 0xF000000000000000
+ #define RISCV_SATP_MODE_BIT_POSITION 60
+#endif
+ #define RISCV_SATP_MODE_OFF 0
+ #define RISCV_SATP_MODE_SV32 1
+ #define RISCV_SATP_MODE_SV39 8
+ #define RISCV_SATP_MODE_SV48 9
+ #define RISCV_SATP_MODE_SV57 10
+ #define RISCV_SATP_MODE_SV64 11
+
+ #define SATP64_ASID_MASK 0x0FFFF00000000000
+ #define SATP64_PPN_MASK 0x00000FFFFFFFFFFF
+
+#define RISCV_CAUSE_MISALIGNED_FETCH 0x0
+#define RISCV_CAUSE_FETCH_ACCESS 0x1
+#define RISCV_CAUSE_ILLEGAL_INSTRUCTION 0x2
+#define RISCV_CAUSE_BREAKPOINT 0x3
+#define RISCV_CAUSE_MISALIGNED_LOAD 0x4
+#define RISCV_CAUSE_LOAD_ACCESS 0x5
+#define RISCV_CAUSE_MISALIGNED_STORE 0x6
+#define RISCV_CAUSE_STORE_ACCESS 0x7
+#define RISCV_CAUSE_USER_ECALL 0x8
+#define RISCV_CAUSE_HYPERVISOR_ECALL 0x9
+#define RISCV_CAUSE_SUPERVISOR_ECALL 0xa
+#define RISCV_CAUSE_MACHINE_ECALL 0xb
+#define RISCV_CAUSE_FETCH_PAGE_FAULT 0xc
+#define RISCV_CAUSE_LOAD_PAGE_FAULT 0xd
+#define RISCV_CAUSE_STORE_PAGE_FAULT 0xf
+#define RISCV_CAUSE_FETCH_GUEST_PAGE_FAULT 0x14
+#define RISCV_CAUSE_LOAD_GUEST_PAGE_FAULT 0x15
+#define RISCV_CAUSE_STORE_GUEST_PAGE_FAULT 0x17
+
+//
+// Machine Read-Write Shadow of Hypervisor Read-Only Registers
+//
+#define RISCV_CSR_HTIMEW 0xB01
+#define RISCV_CSR_HTIMEHW 0xB81
+//
+// Machine Host-Target Interface (Non-Standard Berkeley
Extension)
+//
+#define RISCV_CSR_MTOHOST 0x780
+#define RISCV_CSR_MFROMHOST 0x781
+
+#endif
diff --git a/Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
b/Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
new file mode 100644
index 0000000000..14092df174
--- /dev/null
+++ b/Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
@@ -0,0 +1,87 @@
+/** @file
+ RISC-V package definitions.
+
+ Copyright (c) 2016 - 2019, Hewlett Packard Enterprise
Development
LP. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef RISCV_H_
+#define RISCV_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/RiscV.h>
+
+#define _ASM_FUNC(Name, Section) \
+ .global Name ; \
+ .section #Section, "ax" ; \
+ .type Name, %function ; \
+ .p2align 2 ; \
+ Name:
+
+#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text.
##
Name)
+
+#if defined (MDE_CPU_RISCV64)
+typedef UINT64 RISC_V_REGS_PROTOTYPE;
+#else
+#endif
+
+//
+// Structure for 128-bit value
+//
+typedef struct {
+ UINT64 Value64_L;
+ UINT64 Value64_H;
+} RISCV_UINT128;
+
+#define RISCV_MACHINE_CONTEXT_SIZE 0x1000
+typedef struct _RISCV_MACHINE_MODE_CONTEXT
RISCV_MACHINE_MODE_CONTEXT;
+
+///
+/// Exception handlers in context.
+///
+typedef struct _EXCEPTION_HANDLER_CONTEXT {
+ EFI_PHYSICAL_ADDRESS InstAddressMisalignedHander;
+ EFI_PHYSICAL_ADDRESS InstAccessFaultHander;
+ EFI_PHYSICAL_ADDRESS IllegalInstHander;
+ EFI_PHYSICAL_ADDRESS BreakpointHander;
+ EFI_PHYSICAL_ADDRESS LoadAddrMisalignedHander;
+ EFI_PHYSICAL_ADDRESS LoadAccessFaultHander;
+ EFI_PHYSICAL_ADDRESS StoreAmoAddrMisalignedHander;
+ EFI_PHYSICAL_ADDRESS StoreAmoAccessFaultHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromUModeHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromSModeHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromHModeHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromMModeHander;
+} EXCEPTION_HANDLER_CONTEXT;
+
+///
+/// Exception handlers in context.
+///
+typedef struct _INTERRUPT_HANDLER_CONTEXT {
+ EFI_PHYSICAL_ADDRESS SoftwareIntHandler;
+ EFI_PHYSICAL_ADDRESS TimerIntHandler;
+} INTERRUPT_HANDLER_CONTEXT;
+
+///
+/// Interrupt handlers in context.
+///
+typedef struct _TRAP_HANDLER_CONTEXT {
+ EXCEPTION_HANDLER_CONTEXT ExceptionHandlerContext;
+ INTERRUPT_HANDLER_CONTEXT IntHandlerContext;
+} TRAP_HANDLER_CONTEXT;
+
+///
+/// Machine mode context used for saveing hart-local context.
+///
+typedef struct _RISCV_MACHINE_MODE_CONTEXT {
+ EFI_PHYSICAL_ADDRESS PeiService; /// PEI service.
+ EFI_PHYSICAL_ADDRESS MachineModeTrapHandler; ///
Machine
mode trap handler.
+ EFI_PHYSICAL_ADDRESS HypervisorModeTrapHandler; ///
Hypervisor
mode trap handler.
+ EFI_PHYSICAL_ADDRESS SupervisorModeTrapHandler; ///
Supervisor
mode trap handler.
+ EFI_PHYSICAL_ADDRESS UserModeTrapHandler; /// USer
mode
trap handler.
+ TRAP_HANDLER_CONTEXT MModeHandler; /// Handler for
machine mode.
+} RISCV_MACHINE_MODE_CONTEXT;
+
+#endif
--
2.31.1






Re: [PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default.

Ma, Maurice <maurice.ma@...>
 

Reviewed-by: Maurice Ma <maurice.ma@intel.com>

-----Original Message-----
From: Liu, Zhiguang <zhiguang.liu@intel.com>
Sent: Thursday, January 13, 2022 22:15
To: devel@edk2.groups.io
Cc: Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Ma,
Maurice <maurice.ma@intel.com>; You, Benjamin
<benjamin.you@intel.com>
Subject: [PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default.

For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Counter.
This is recommended way to get the time, and also how BaseCpuTimerLib
works However, some CPU doesn't support this feature, so disable it by
default.

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>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc
b/UefiPayloadPkg/UefiPayloadPkg.dsc
index 3d08edfe31..65c1bd610e 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -111,6 +111,11 @@
DEFINE SERIAL_DRIVER_ENABLE = TRUE DEFINE
PERFORMANCE_MEASUREMENT_ENABLE = FALSE + # For recent X86 CPU,
0x15 CPUID instruction will return Time Stamp Counter.+ # This is
recommended way to get the time, and also how BaseCpuTimerLib works.+
# However, some CPU doesn't support this feature, so disable it by default.+
DEFINE CPU_TIMER_LIB_ENABLE = FALSE+ [BuildOptions]
*_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG@@ -217,7 +222,7
@@
# # Platform #-!if $(UNIVERSAL_PAYLOAD) == TRUE+!if
$(CPU_TIMER_LIB_ENABLE) == TRUE
TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf !else
TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf--
2.32.0.windows.2


Re: [PATCH 01/79] ProcessorPkg/Include: Add header files of RISC-V processor package

Abner Chang
 

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Friday, January 14, 2022 12:38 AM
To: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>; Leif
Lindholm <leif@nuviainc.com>; devel@edk2.groups.io; Ni, Ray
<ray.ni@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add header
files of RISC-V processor package

Hi Abner,

General recommendations included below. Of course each
lib/modules/include needs to be reviewed and the
best location selected. I am aware that there are components in edk2 that
do not follow these general
recommendations. This is due to content that was added before these
recommendations were established
and we have work to do to get everything aligned.

Mike

-----Original Message-----
From: Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com>
Sent: Wednesday, January 12, 2022 9:34 PM
To: Kinney, Michael D <michael.d.kinney@intel.com>; Leif Lindholm
<leif@nuviainc.com>; devel@edk2.groups.io; Ni, Ray
<ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header files of RISC-V processor package

HI Mike,
It is no problem to meet there. However, I am not available to join the
design meeting in the next two weeks. Before we can get
together to discuss the best locations, do you have information regarding
the rationale of driver/library location?

What is the best location for,
- Processor ARCH dependent modules
MdePkg for libs
UefiCpuPkg for modules

- Common modules for all processor ARCHs
Feature Packages based on the common feature. Add to existing if it fits.
Create new for completely new feature area.

- Platform module that is specific to processor ARCH?
edk2-platform repository
How about Leif's suggestion? The CommonPlatformPkg on edk2?

Abner


The only exception so far are platform modules used to support
OvmfPkg/QEMU to support CI.
In this case the modules are added to OvmfPkg.

- Platform module that is common to processor ARCHs?
edk2-platform repository

The only exception so far are platform modules used to support
OvmfPkg/QEMU to support CI.
In this case the modules are added to OvmfPkg.


Thanks
Abner

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Monday, January 10, 2022 11:58 PM
To: Leif Lindholm <leif@nuviainc.com>; devel@edk2.groups.io; Chang,
Abner
(HPS SW/FW Technologist) <abner.chang@hpe.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Ni, Ray <ray.ni@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header
files of RISC-V processor package

Hi Abner,

I see comments from Leif as well.

Do you think a discussion in the design meeting Ray Ni runs would be
valuable
to review all the modules/libs/includes and discuss options for the best
location for them to reside in the edk2 repos?

Thanks,

Mike

-----Original Message-----
From: Kinney, Michael D <michael.d.kinney@intel.com>
Sent: Monday, January 10, 2022 7:55 AM
To: Leif Lindholm <leif@nuviainc.com>; devel@edk2.groups.io; Chang,
Abner <abner.chang@hpe.com>; Kinney, Michael D
<michael.d.kinney@intel.com>
Cc: Andrew Fish <afish@apple.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: RE: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header files of RISC-V processor package

Hi Abner,

I would also like to see some proposals on adding the RiscV CPU scoped
content
to the existing MdePkg/UefiCpuPkg instead of adding a new top level
CPU
package.

There is already some work started to move some of the ARM specific
content
from ARM CPU packages into MdePkg.

Thanks,

Mike

-----Original Message-----
From: Leif Lindholm <leif@nuviainc.com>
Sent: Monday, January 10, 2022 5:11 AM
To: devel@edk2.groups.io; Chang, Abner <abner.chang@hpe.com>
Cc: Andrew Fish <afish@apple.com>; Kinney, Michael D
<michael.d.kinney@intel.com>; Sami Mujawar
<Sami.Mujawar@arm.com>
Subject: Re: [edk2-devel] [PATCH 01/79] ProcessorPkg/Include: Add
header files of RISC-V processor package

On Sat, Jan 08, 2022 at 12:07:53 +0800, Abner Chang wrote:
(This is migrated from edk2-platforms:Silicon/RISC-V)

RISC-V processor package library definitions.

IndustryStandard/RiscV.h
-Add RiscV.h which conform with RISC-V Privilege Spec v1.10.

RiscVImpl.h
-Definition of EDK2 RISC-V implementation.

Signed-off-by: Abner Chang <abner.chang@hpe.com>
Co-authored-by: Daniel Schaefer <daniel.schaefer@hpe.com>
Co-authored-by: Gilbert Chen <gilbert.chen@hpe.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Hmm, no.
I gave a reviewed-by for that patch to be merged into edk2-platforms
once upon a time. This is not relevant for migration to edk2.

My proposal for migrating this code would be as follows:
- Announce a hold on merging new code to RiscV portions of
edk2-platforms.
- Apply any and all bugfixes and CI/uncrustify fixes in place in
edk2-platforms.
- Get some level of agreement for what to do instead of
RiscVPlatformPkg - i.e. slot into MdeModulePkg instead.
- If that cannot be reached within a few days, create a new
top-level directory called "CommonPlatformPkg" or something,
with you, Daniel(/Gilbert?), Sami, me as maintainers.
- Move all of the RiscVPlatformPkg code under there instead.
- I'll follow with ArmPlatformPkg.
- PC/AT code should move across too over time.
- Move the rest of the code across unmodified as massive single
patches per package (potentially more patches than that for
RiscVPlatformPkg).
- Drop all existing Reviewed-by/Acked-by.
- After each "move" patch, insert a "fixup" patch to address the
things that need fixing due to path/name changes.

/
Leif

Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Gilbert Chen <gilbert.chen@hpe.com>
---
.../Include/IndustryStandard/RiscV.h | 156
++++++++++++++++++
.../RISC-V/ProcessorPkg/Include/RiscVImpl.h | 87 ++++++++++
2 files changed, 243 insertions(+)
create mode 100644 Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h
create mode 100644 Silicon/RISC-
V/ProcessorPkg/Include/RiscVImpl.h

diff --git a/Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h b/Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h
new file mode 100644
index 0000000000..2a992394ed
--- /dev/null
+++ b/Silicon/RISC-
V/ProcessorPkg/Include/IndustryStandard/RiscV.h
@@ -0,0 +1,156 @@
+/** @file
+ RISC-V package definitions.
+
+ Copyright (c) 2019, Hewlett Packard Enterprise Development LP.
All
rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef RISCV_INDUSTRY_STANDARD_H_
+#define RISCV_INDUSTRY_STANDARD_H_
+
+#if defined (MDE_CPU_RISCV64)
+#define RISC_V_XLEN_BITS 64
+#else
+#endif
+
+#define RISC_V_ISA_ATOMIC_EXTENSION (0x00000001 <<
0)
+#define RISC_V_ISA_BIT_OPERATION_EXTENSION
(0x00000001
<< 1)
+#define RISC_V_ISA_COMPRESSED_EXTENSION (0x00000001
<<
2)
+#define RISC_V_ISA_DOUBLE_PRECISION_FP_EXTENSION
(0x00000001 << 3)
+#define RISC_V_ISA_RV32E_ISA (0x00000001 << 4)
+#define RISC_V_ISA_SINGLE_PRECISION_FP_EXTENSION
(0x00000001 << 5)
+#define RISC_V_ISA_ADDITIONAL_STANDARD_EXTENSION
(0x00000001 << 6)
+#define RISC_V_ISA_RESERVED_1 (0x00000001 << 7)
+#define RISC_V_ISA_INTEGER_ISA_EXTENSION (0x00000001
<<
8)
+#define
RISC_V_ISA_DYNAMICALLY_TRANSLATED_LANGUAGE_EXTENSION
(0x00000001 << 9)
+#define RISC_V_ISA_RESERVED_2 (0x00000001 << 10)
+#define RISC_V_ISA_DECIMAL_FP_EXTENSION (0x00000001
<<
11)
+#define RISC_V_ISA_INTEGER_MUL_DIV_EXTENSION
(0x00000001
<< 12)
+#define RISC_V_ISA_USER_LEVEL_INTERRUPT_SUPPORTED
(0x00000001 << 13)
+#define RISC_V_ISA_RESERVED_3 (0x00000001 << 14)
+#define RISC_V_ISA_PACKED_SIMD_EXTENSION
(0x00000001 <<
15)
+#define RISC_V_ISA_QUAD_PRECISION_FP_EXTENSION
(0x00000001 << 16)
+#define RISC_V_ISA_RESERVED_4 (0x00000001 << 17)
+#define RISC_V_ISA_SUPERVISOR_MODE_IMPLEMENTED
(0x00000001 << 18)
+#define RISC_V_ISA_TRANSATIONAL_MEMORY_EXTENSION
(0x00000001 << 19)
+#define RISC_V_ISA_USER_MODE_IMPLEMENTED
(0x00000001
<< 20)
+#define RISC_V_ISA_VECTOR_EXTENSION (0x00000001 <<
21)
+#define RISC_V_ISA_RESERVED_5 (0x00000001 << 22)
+#define RISC_V_ISA_NON_STANDARD_EXTENSION
(0x00000001
<< 23)
+#define RISC_V_ISA_RESERVED_6 (0x00000001 << 24)
+#define RISC_V_ISA_RESERVED_7 (0x00000001 << 25)
+
+//
+// RISC-V CSR definitions.
+//
+//
+// Machine information
+//
+#define RISCV_CSR_MACHINE_MVENDORID 0xF11
+#define RISCV_CSR_MACHINE_MARCHID 0xF12
+#define RISCV_CSR_MACHINE_MIMPID 0xF13
+#define RISCV_CSR_MACHINE_HARRID 0xF14
+//
+// Machine Trap Setup.
+//
+#define RISCV_CSR_MACHINE_MSTATUS 0x300
+#define RISCV_CSR_MACHINE_MISA 0x301
+#define RISCV_CSR_MACHINE_MEDELEG 0x302
+#define RISCV_CSR_MACHINE_MIDELEG 0x303
+#define RISCV_CSR_MACHINE_MIE 0x304
+#define RISCV_CSR_MACHINE_MTVEC 0x305
+
+#define RISCV_TIMER_COMPARE_BITS 32
+//
+// Machine Timer and Counter.
+//
+//#define RISCV_CSR_MACHINE_MTIME 0x701
+//#define RISCV_CSR_MACHINE_MTIMEH 0x741
+//
+// Machine Trap Handling.
+//
+#define RISCV_CSR_MACHINE_MSCRATCH 0x340
+#define RISCV_CSR_MACHINE_MEPC 0x341
+#define RISCV_CSR_MACHINE_MCAUSE 0x342
+ #define MACHINE_MCAUSE_EXCEPTION_ MASK 0x0f
+ #define MACHINE_MCAUSE_INTERRUPT (RISC_V_XLEN_BITS -
1)
+#define RISCV_CSR_MACHINE_MBADADDR 0x343
+#define RISCV_CSR_MACHINE_MIP 0x344
+
+//
+// Machine Protection and Translation.
+//
+#define RISCV_CSR_MACHINE_MBASE 0x380
+#define RISCV_CSR_MACHINE_MBOUND 0x381
+#define RISCV_CSR_MACHINE_MIBASE 0x382
+#define RISCV_CSR_MACHINE_MIBOUND 0x383
+#define RISCV_CSR_MACHINE_MDBASE 0x384
+#define RISCV_CSR_MACHINE_MDBOUND 0x385
+
+//
+// Supervisor mode CSR.
+//
+#define RISCV_CSR_SUPERVISOR_SSTATUS 0x100
+ #define SSTATUS_SIE_BIT_POSITION 1
+ #define SSTATUS_SPP_BIT_POSITION 8
+#define RISCV_CSR_SUPERVISOR_SIE 0x104
+#define RISCV_CSR_SUPERVISOR_SSCRATCH 0x140
+#define RISCV_CSR_SUPERVISOR_SEPC 0x141
+#define RISCV_CSR_SUPERVISOR_SCAUSE 0x142
+ #define SCAUSE_USER_SOFTWARE_INT 0
+ #define SCAUSE_SUPERVISOR_SOFTWARE_INT 1
+ #define SCAUSE_USER_TIMER_INT 4
+ #define SCAUSE_SUPERVISOR_TIMER_INT 5
+ #define SCAUSE_USER_EXTERNAL_INT 8
+ #define SCAUSE_SUPERVISOR_EXTERNAL_INT 9
+#define RISCV_CSR_SUPERVISOR_STVAL 0x143
+#define RISCV_CSR_SUPERVISOR_SIP 0x144
+#define RISCV_CSR_SUPERVISOR_SATP 0x180
+
+#if defined (MDE_CPU_RISCV64)
+ #define RISCV_SATP_MODE_MASK 0xF000000000000000
+ #define RISCV_SATP_MODE_BIT_POSITION 60
+#endif
+ #define RISCV_SATP_MODE_OFF 0
+ #define RISCV_SATP_MODE_SV32 1
+ #define RISCV_SATP_MODE_SV39 8
+ #define RISCV_SATP_MODE_SV48 9
+ #define RISCV_SATP_MODE_SV57 10
+ #define RISCV_SATP_MODE_SV64 11
+
+ #define SATP64_ASID_MASK 0x0FFFF00000000000
+ #define SATP64_PPN_MASK 0x00000FFFFFFFFFFF
+
+#define RISCV_CAUSE_MISALIGNED_FETCH 0x0
+#define RISCV_CAUSE_FETCH_ACCESS 0x1
+#define RISCV_CAUSE_ILLEGAL_INSTRUCTION 0x2
+#define RISCV_CAUSE_BREAKPOINT 0x3
+#define RISCV_CAUSE_MISALIGNED_LOAD 0x4
+#define RISCV_CAUSE_LOAD_ACCESS 0x5
+#define RISCV_CAUSE_MISALIGNED_STORE 0x6
+#define RISCV_CAUSE_STORE_ACCESS 0x7
+#define RISCV_CAUSE_USER_ECALL 0x8
+#define RISCV_CAUSE_HYPERVISOR_ECALL 0x9
+#define RISCV_CAUSE_SUPERVISOR_ECALL 0xa
+#define RISCV_CAUSE_MACHINE_ECALL 0xb
+#define RISCV_CAUSE_FETCH_PAGE_FAULT 0xc
+#define RISCV_CAUSE_LOAD_PAGE_FAULT 0xd
+#define RISCV_CAUSE_STORE_PAGE_FAULT 0xf
+#define RISCV_CAUSE_FETCH_GUEST_PAGE_FAULT 0x14
+#define RISCV_CAUSE_LOAD_GUEST_PAGE_FAULT 0x15
+#define RISCV_CAUSE_STORE_GUEST_PAGE_FAULT 0x17
+
+//
+// Machine Read-Write Shadow of Hypervisor Read-Only Registers
+//
+#define RISCV_CSR_HTIMEW 0xB01
+#define RISCV_CSR_HTIMEHW 0xB81
+//
+// Machine Host-Target Interface (Non-Standard Berkeley
Extension)
+//
+#define RISCV_CSR_MTOHOST 0x780
+#define RISCV_CSR_MFROMHOST 0x781
+
+#endif
diff --git a/Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
b/Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
new file mode 100644
index 0000000000..14092df174
--- /dev/null
+++ b/Silicon/RISC-V/ProcessorPkg/Include/RiscVImpl.h
@@ -0,0 +1,87 @@
+/** @file
+ RISC-V package definitions.
+
+ Copyright (c) 2016 - 2019, Hewlett Packard Enterprise
Development
LP. All rights reserved.<BR>
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef RISCV_H_
+#define RISCV_H_
+
+#include <Uefi.h>
+#include <IndustryStandard/RiscV.h>
+
+#define _ASM_FUNC(Name, Section) \
+ .global Name ; \
+ .section #Section, "ax" ; \
+ .type Name, %function ; \
+ .p2align 2 ; \
+ Name:
+
+#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text.
##
Name)
+
+#if defined (MDE_CPU_RISCV64)
+typedef UINT64 RISC_V_REGS_PROTOTYPE;
+#else
+#endif
+
+//
+// Structure for 128-bit value
+//
+typedef struct {
+ UINT64 Value64_L;
+ UINT64 Value64_H;
+} RISCV_UINT128;
+
+#define RISCV_MACHINE_CONTEXT_SIZE 0x1000
+typedef struct _RISCV_MACHINE_MODE_CONTEXT
RISCV_MACHINE_MODE_CONTEXT;
+
+///
+/// Exception handlers in context.
+///
+typedef struct _EXCEPTION_HANDLER_CONTEXT {
+ EFI_PHYSICAL_ADDRESS InstAddressMisalignedHander;
+ EFI_PHYSICAL_ADDRESS InstAccessFaultHander;
+ EFI_PHYSICAL_ADDRESS IllegalInstHander;
+ EFI_PHYSICAL_ADDRESS BreakpointHander;
+ EFI_PHYSICAL_ADDRESS LoadAddrMisalignedHander;
+ EFI_PHYSICAL_ADDRESS LoadAccessFaultHander;
+ EFI_PHYSICAL_ADDRESS StoreAmoAddrMisalignedHander;
+ EFI_PHYSICAL_ADDRESS StoreAmoAccessFaultHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromUModeHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromSModeHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromHModeHander;
+ EFI_PHYSICAL_ADDRESS EnvCallFromMModeHander;
+} EXCEPTION_HANDLER_CONTEXT;
+
+///
+/// Exception handlers in context.
+///
+typedef struct _INTERRUPT_HANDLER_CONTEXT {
+ EFI_PHYSICAL_ADDRESS SoftwareIntHandler;
+ EFI_PHYSICAL_ADDRESS TimerIntHandler;
+} INTERRUPT_HANDLER_CONTEXT;
+
+///
+/// Interrupt handlers in context.
+///
+typedef struct _TRAP_HANDLER_CONTEXT {
+ EXCEPTION_HANDLER_CONTEXT ExceptionHandlerContext;
+ INTERRUPT_HANDLER_CONTEXT IntHandlerContext;
+} TRAP_HANDLER_CONTEXT;
+
+///
+/// Machine mode context used for saveing hart-local context.
+///
+typedef struct _RISCV_MACHINE_MODE_CONTEXT {
+ EFI_PHYSICAL_ADDRESS PeiService; /// PEI service.
+ EFI_PHYSICAL_ADDRESS MachineModeTrapHandler; ///
Machine
mode trap handler.
+ EFI_PHYSICAL_ADDRESS HypervisorModeTrapHandler; ///
Hypervisor
mode trap handler.
+ EFI_PHYSICAL_ADDRESS SupervisorModeTrapHandler; ///
Supervisor
mode trap handler.
+ EFI_PHYSICAL_ADDRESS UserModeTrapHandler; /// USer
mode
trap handler.
+ TRAP_HANDLER_CONTEXT MModeHandler; /// Handler for
machine mode.
+} RISCV_MACHINE_MODE_CONTEXT;
+
+#endif
--
2.31.1






Re: [PATCH v4 00/11] Create new target for Cloud Hypervisor

Boeuf, Sebastien
 

Great, thank you!

Sebastien


From: Yao, Jiewen <jiewen.yao@...>
Sent: Thursday, January 13, 2022 3:56:09 PM
To: Boeuf, Sebastien <sebastien.boeuf@...>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Justen, Jordan L <jordan.l.justen@...>; kraxel@... <kraxel@...>
Subject: RE: [PATCH v4 00/11] Create new target for Cloud Hypervisor
 
Merged: https://github.com/tianocore/edk2/pull/2411

> -----Original Message-----
> From: Boeuf, Sebastien <sebastien.boeuf@...>
> Sent: Tuesday, January 11, 2022 8:31 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@...>; Justen, Jordan L
> <jordan.l.justen@...>; kraxel@...; Boeuf, Sebastien
> <sebastien.boeuf@...>
> Subject: [PATCH v4 00/11] Create new target for Cloud Hypervisor
>
> From: Sebastien Boeuf <sebastien.boeuf@...>
>
> Since Cloud Hypervisor and QEMU pc/q35 are quite different, it makes
> more sense to create a dedicated OVMF target for Cloud Hypervisor rather
> than trying to support both VMMs from the same OvmfPkgX64 target.
>
> That's the reason why this series introduces a new target called
> CloudHvX64, meant to be used with the Cloud Hypervisor VMM only.
>
> The new target is initially copied over from the OvmfPkgX64, then it is
> trimmed down by removing what is not needed from a Cloud Hypervisor
> perspective.
>
> Sebastien Boeuf (11):
>   OvmfPkg/CloudHv: Add new target for Cloud Hypervisor
>   OvmfPkg/CloudHv: Replace legacy 8254 PIT with local APIC timer
>   OvmfPkg/CloudHv: Connect serial console
>   OvmfPkg/CloudHv: Remove legacy 8259 PIC support
>   OvmfPkg/CloudHv: Remove Q35 specifics
>   OvmfPkg/CloudHv: Reduce dependency on QemuFwCfg
>   OvmfPkg/CloudHv: Remove video support
>   OvmfPkg/CloudHv: Remove USB support
>   OvmfPkg/CloudHv: Remove CSM support
>   OvmfPkg/CloudHv: add Maintainers.txt entry
>   OvmfPkg: Add CloudHvX64 to the CI
>
>  Maintainers.txt                               |   5 +
>  OvmfPkg/CloudHv/CloudHvX64.dsc                | 938 ++++++++++++++++++
>  OvmfPkg/CloudHv/CloudHvX64.fdf                | 503 ++++++++++
>  .../PlatformBootManagerLib/BdsPlatform.c      |   8 +-
>  .../.azurepipelines/Ubuntu-GCC5.yml           |   9 +
>  OvmfPkg/PlatformCI/CloudHvBuild.py            |  37 +
>  6 files changed, 1499 insertions(+), 1 deletion(-)
>  create mode 100644 OvmfPkg/CloudHv/CloudHvX64.dsc
>  create mode 100644 OvmfPkg/CloudHv/CloudHvX64.fdf
>  create mode 100644 OvmfPkg/PlatformCI/CloudHvBuild.py
>
> --
> 2.30.2

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


[PATCH EDK2 v1 1/1] MdeModulePkg/PciBucDxe:Fix issue when initial SR-IVO

wenyi,xie
 

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

When calculating SR-IOV reserve bus in function CreatePciIoDevice(),
there are two points may have problem.
LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride;
PciIoDevice->ReservedBusNum =
(UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);

The first is that if the value of PciIoDevice->InitialVFs is 0, it will
cause overflow, it's better to check InitialVFs before used.
The second is that if number of bus is not enough for all PF and still
allocate bus for VF, it will lead to PCI enumerating failure.

Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
index 9251388bc268..a4d1db534276 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
@@ -2402,12 +2402,12 @@ CreatePciIoDevice (
// Calculate LastVF
//
PFRid = EFI_PCI_RID (Bus, Device, Func);
- LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs - 1) * VFStride;
+ LastVF = PFRid + FirstVFOffset + (PciIoDevice->InitialVFs == 0 ? 0 : PciIoDevice->InitialVFs - 1) * VFStride;

//
// Calculate ReservedBusNum for this PF
//
- PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus + 1);
+ PciIoDevice->ReservedBusNum = (UINT16)(EFI_PCI_BUS_OF_RID (LastVF) - Bus);

DEBUG ((
DEBUG_INFO,
--
2.20.1.windows.1


[PATCH EDK2 v1 0/1] MdeModulePkg/PciBucDxe:Fix issue when initial SR-IVO

wenyi,xie
 

Main Changes :
1.Add check before using InitialVFs.
2.Don't allocate bus for VF.

Wenyi Xie (1):
MdeModulePkg/PciBucDxe:Fix issue when initial SR-IVO

MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--
2.20.1.windows.1


Re: [PATCH 08/10] OvmfPkg: Update Sec to support Tdvf Config-B

Gerd Hoffmann
 

Hi,

I don't see that PEI-less boot is required for that. Sure, when stripping down
the build and removing all the features which require PEIMs there isn't much
left to do for the PEI phase. So it makes sense to look into dropping PEI
altogether. But it's more a "nice to have"
than a hard requirement, no?
No. I have to say PEI-less boot in Config-B is a hard requirement.
I'm still wondering why though. I have not yet seen a reason why
config-b can't use the PEI-based boot flow.

4. But a basic version of PlatformInitLib is a good start.
Yes. Having initially only the functions needed by config-b in PlatformInitLib
is perfectly fine, but this should be a code *move* not a copy.

During the development and community review, we can understand better
what functions should be wrapped into PlatformInitLib. After that
PlatformInitLib can be evolved for OvmfPkg/PlatformPei,
Bhyve/PlatformPei, XenPlatformPei.
Yes, most likely there are a number of opportunities to reduce code
duplication in the three PlatformPei variants we have by moving code to the
(shared) PlatformInitLib.

That can be looked at later.
So let me summarize the discussion about PlatformInitLib.
1. PlatformInitLib wraps the common functions in OvmfPkg/PlatformPei.
These common functions covers the memory detection via fw_cfg, pci
init, cmos, (MemDetect.c/Platform.c/Cmos.c).
Yes. Everything needed for PEI-less / config-b boot moves to
PlatformInitLib.

PlatformInitLib is added as dependency to OvmfPkg/PlatformPei, so
PlatformPei can call those functions when booting with PEI.

PEI-less boot will add PlatformInitLib to SEC (and DXE) instead
so the same code can be used then.

Not sure how to handle cmos best. Not needed for memory detection on
qemu, but cloudhw depends on it so it is back for now. Will cloudhw
support tdx too btw?

And PlatformInitLib will
not handle the S3/SMM variants.
At least not initially. Maybe later when we move more code to the lib
to reduce code duplication in xen/bhyve/qemu PlatformPei variants.

2. OvmfPkg/PlatformPei will be refactored with PlatformInitLib. The
functions not needed by config-b stay in PlatformPei.
3. Config-B support PEI-less boot for both legacy guest and td guest.
Yes.

take care,
Gerd


[PATCH] UefiPayloadPkg: Not use BaseCpuTimerLib by default.

Zhiguang Liu
 

For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp
Counter. This is recommended way to get the time, and also how
BaseCpuTimerLib works However, some CPU doesn't support this feature,
so disable it by default.

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>
Signed-off-by: Zhiguang Liu <zhiguang.liu@intel.com>
---
UefiPayloadPkg/UefiPayloadPkg.dsc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayload=
Pkg.dsc
index 3d08edfe31..65c1bd610e 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkg.dsc
@@ -111,6 +111,11 @@
DEFINE SERIAL_DRIVER_ENABLE =3D TRUE=0D
DEFINE PERFORMANCE_MEASUREMENT_ENABLE =3D FALSE=0D
=0D
+ # For recent X86 CPU, 0x15 CPUID instruction will return Time Stamp Coun=
ter.=0D
+ # This is recommended way to get the time, and also how BaseCpuTimerLib =
works.=0D
+ # However, some CPU doesn't support this feature, so disable it by defau=
lt.=0D
+ DEFINE CPU_TIMER_LIB_ENABLE =3D FALSE=0D
+=0D
[BuildOptions]=0D
*_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES=
=0D
GCC:*_UNIXGCC_*_CC_FLAGS =3D -DMDEPKG_NDEBUG=0D
@@ -217,7 +222,7 @@
#=0D
# Platform=0D
#=0D
-!if $(UNIVERSAL_PAYLOAD) =3D=3D TRUE=0D
+!if $(CPU_TIMER_LIB_ENABLE) =3D=3D TRUE=0D
TimerLib|UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf=0D
!else=0D
TimerLib|UefiPayloadPkg/Library/AcpiTimerLib/AcpiTimerLib.inf=0D
--=20
2.32.0.windows.2


Re: [PATCH] BaseTools/GenFw: Enhance to add export table in PE-COFF

Bob Feng
 

Hi Lixia,

This patch introduce a new command line option --PRM. Could you add the help information about --PRM?

Could you provide more information about the below change? Would there be side-effect?

@@ -750,7 +818,7 @@ ScanSections64 (
if (shdr->sh_addralign <= mCoffAlignment) {
continue;
}
- if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {
+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr) || IsSymbolShdr(shdr)) {
mCoffAlignment = (UINT32)shdr->sh_addralign;
}
}



Thanks,
Bob

-----Original Message-----
From: Huang, Li-Xia <lisa.huang@intel.com>
Sent: Wednesday, January 12, 2022 3:44 PM
To: devel@edk2.groups.io
Cc: Huang, Li-Xia <lisa.huang@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Feng, Bob C <bob.c.feng@intel.com>; Chen, Christine <yuwei.chen@intel.com>
Subject: [edk2-devel][PATCH] BaseTools/GenFw: Enhance to add export table in PE-COFF

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3802
Since PRM module needs to support export table in PE-COFF, we'll enhance GenFw tool to support this.

Add one export flag in GenFw tool. If export flag is set:
Step1: Scan ELF symbol table based on PRM module descriptor to get descriptor offset address;
Step2: Find PRM handlers number and name in COFF file based on the address from step1;
Step3: Write PRM info such as handler name and export RVA into COFF export table.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Lixia Huang <lisa.huang@intel.com>
---
BaseTools/Source/C/GenFw/Elf64Convert.c | 254 +++++++++++++++++-
BaseTools/Source/C/GenFw/ElfConvert.c | 10 +
BaseTools/Source/C/GenFw/ElfConvert.h | 42 ++-
BaseTools/Source/C/GenFw/GenFw.c | 11 +-
.../C/Include/IndustryStandard/PeImage.h | 7 +
5 files changed, 318 insertions(+), 6 deletions(-)

diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
index 0bb3ead228..0079507356 100644
--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
@@ -56,6 +56,18 @@ WriteDebug64 (
VOID ); +STATIC+VOID+ScanSymbol64 (+ VOID+ );++STATIC+VOID+WriteExport64 (+ VOID+ );+ STATIC VOID SetImageSize64 (@@ -122,7 +134,7 @@ STATIC UINT32 mDataOffset;
STATIC UINT32 mHiiRsrcOffset; STATIC UINT32 mRelocOffset; STATIC UINT32 mDebugOffset;-+STATIC UINT32 mExportOffset; // // Used for RISC-V relocations. //@@ -132,6 +144,14 @@ STATIC Elf64_Half mRiscVPass1SymSecIndex = 0;
STATIC INT32 mRiscVPass1Offset; STATIC INT32 mRiscVPass1GotFixup; +//+// Used for Export section.+//+STATIC UINT32 mExportSize;+STATIC UINT32 mExportRVA[PRM_MODULE_EXPORT_SYMBOL_NUM];+STATIC UINT32 mExportSymNum;+STATIC CHAR8 mExportSymName[PRM_MODULE_EXPORT_SYMBOL_NUM][PRM_HANDLER_NAME_MAXIMUM_LENGTH];+ // // Initialization Function //@@ -200,6 +220,10 @@ InitializeElf64 (
ElfFunctions->SetImageSize = SetImageSize64; ElfFunctions->CleanUp = CleanUp64; + if (mExportFlag) {+ ElfFunctions->ScanSymbol = ScanSymbol64;+ ElfFunctions->WriteExport = WriteExport64;+ } return TRUE; } @@ -263,6 +287,17 @@ IsHiiRsrcShdr (
return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namedr->sh_offset + Shdr->sh_name, ELF_HII_SECTION_NAME) == 0); } +STATIC+BOOLEAN+IsSymbolShdr (+ Elf_Shdr *Shdr+ )+{+ Elf_Shdr *Namehdr = GetShdrByIndex(mEhdr->e_shstrndx);++ return (BOOLEAN) (strcmp((CHAR8*)mEhdr + Namehdr->sh_offset + Shdr->sh_name, ELF_SYMBOL_SECTION_NAME) == 0);+}+ STATIC BOOLEAN IsDataShdr (@@ -335,6 +370,38 @@ GetSymName (
return StrtabContents + Sym->st_name; } +//+// Get Prm Handler number and name+//+STATIC+VOID+FindPrmHandler (+ UINT64 Offset+ )+{+ PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER *PrmExport;+ UINT32 NameOffset;+ UINT32 HandlerNum;+ UINT32 Index;+ UINT8 SymName[PRM_HANDLER_NAME_MAXIMUM_LENGTH];++ PrmExport = (PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER*)(mCoffFile + Offset);+ NameOffset = sizeof(PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER) + sizeof(EFI_GUID);++ for (HandlerNum = 0; HandlerNum < PrmExport->NumberPrmHandlers; HandlerNum++) {+ for (Index = 0; Index < PRM_HANDLER_NAME_MAXIMUM_LENGTH; Index++) {+ SymName[Index] = *((UINT8 *)PrmExport + NameOffset + Index);+ if (SymName[Index] == 0) {+ break;+ }+ }++ strcpy(mExportSymName[mExportSymNum], (CHAR8*)SymName);+ NameOffset += PRM_HANDLER_NAME_MAXIMUM_LENGTH + sizeof(EFI_GUID);+ mExportSymNum ++;+ }+}+ // // Find the ELF section hosting the GOT from an ELF Rva // of a single GOT entry. Normally, GOT is placed in@@ -717,6 +784,7 @@ ScanSections64 (
UINT32 CoffEntry; UINT32 SectionCount; BOOLEAN FoundSection;+ UINT32 Offset; CoffEntry = 0; mCoffOffset = 0;@@ -750,7 +818,7 @@ ScanSections64 (
if (shdr->sh_addralign <= mCoffAlignment) { continue; }- if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr)) {+ if (IsTextShdr(shdr) || IsDataShdr(shdr) || IsHiiRsrcShdr(shdr) || IsSymbolShdr(shdr)) { mCoffAlignment = (UINT32)shdr->sh_addralign; } }@@ -880,6 +948,16 @@ ScanSections64 (
Warning (NULL, 0, 0, NULL, "Multiple sections in %s are merged into 1 data section. Source level debug might not work correctly.", mInImageName); } + //+ // The Symbol sections.+ //+ if (mExportFlag) {+ mExportOffset = mCoffOffset;+ mExportSize = sizeof(EFI_IMAGE_EXPORT_DIRECTORY) + strlen(mInImageName) + 1;+ mCoffOffset += mExportSize;+ mCoffOffset = CoffAlign(mCoffOffset);+ }+ // // The HII resource sections. //@@ -962,7 +1040,11 @@ ScanSections64 (
| EFI_IMAGE_FILE_LARGE_ADDRESS_AWARE; NtHdr->Pe32Plus.OptionalHeader.SizeOfCode = mDataOffset - mTextOffset;- NtHdr->Pe32Plus.OptionalHeader.SizeOfInitializedData = mRelocOffset - mDataOffset;+ if(mExportFlag) {+ NtHdr->Pe32Plus.OptionalHeader.SizeOfInitializedData = mRelocOffset - mExportOffset;+ } else {+ NtHdr->Pe32Plus.OptionalHeader.SizeOfInitializedData = mRelocOffset - mDataOffset;+ } NtHdr->Pe32Plus.OptionalHeader.SizeOfUninitializedData = 0; NtHdr->Pe32Plus.OptionalHeader.AddressOfEntryPoint = CoffEntry; @@ -989,8 +1071,17 @@ ScanSections64 (
NtHdr->Pe32Plus.FileHeader.NumberOfSections--; } + //+ // If found symbol, add edata section between data and rsrc section+ //+ if(mExportFlag) {+ Offset = mExportOffset;+ } else {+ Offset = mHiiRsrcOffset;+ }+ if ((mHiiRsrcOffset - mDataOffset) > 0) {- CreateSectionHeader (".data", mDataOffset, mHiiRsrcOffset - mDataOffset,+ CreateSectionHeader (".data", mDataOffset, Offset - mDataOffset, EFI_IMAGE_SCN_CNT_INITIALIZED_DATA | EFI_IMAGE_SCN_MEM_WRITE | EFI_IMAGE_SCN_MEM_READ);@@ -999,6 +1090,20 @@ ScanSections64 (
NtHdr->Pe32Plus.FileHeader.NumberOfSections--; } + if(mExportFlag) {+ if ((mHiiRsrcOffset - mExportOffset) > 0) {+ CreateSectionHeader (".edata", mExportOffset, mHiiRsrcOffset - mExportOffset,+ EFI_IMAGE_SCN_CNT_INITIALIZED_DATA+ | EFI_IMAGE_SCN_MEM_READ);+ NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXPORT].Size = mHiiRsrcOffset - mExportOffset;+ NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress = mExportOffset;+ NtHdr->Pe32Plus.FileHeader.NumberOfSections++;+ } else {+ // Don't make a section of size 0.+ NtHdr->Pe32Plus.FileHeader.NumberOfSections--;+ }+ }+ if ((mRelocOffset - mHiiRsrcOffset) > 0) { CreateSectionHeader (".rsrc", mHiiRsrcOffset, mRelocOffset - mHiiRsrcOffset, EFI_IMAGE_SCN_CNT_INITIALIZED_DATA@@ -1757,4 +1862,145 @@ CleanUp64 (
} } +STATIC+VOID+ScanSymbol64 (+ VOID+ )+{+ UINT32 shIndex;+ UINT32 SymIndex;+ Elf_Sym *Sym;+ UINT64 SymNum;+ const UINT8 *SymName;++ for (shIndex = 0; shIndex < mEhdr->e_shnum; shIndex++) {+ //+ // Determine if this is a symbol section.+ //+ Elf_Shdr *shdr = GetShdrByIndex(shIndex);+ if (!IsSymbolShdr(shdr)) {+ continue;+ }++ UINT8 *Symtab = (UINT8*)mEhdr + shdr->sh_offset;+ SymNum = (shdr->sh_size) / (shdr->sh_entsize);++ //+ // First Get PrmModuleExportDescriptor+ //+ for (SymIndex = 0; SymIndex < SymNum; SymIndex++) {+ Sym = (Elf_Sym *)(Symtab + SymIndex * shdr->sh_entsize);+ SymName = GetSymName(Sym);+ if (SymName == NULL) {+ continue;+ }++ if (strcmp((CHAR8*)SymName, PRM_MODULE_EXPORT_DESCRIPTOR_NAME) == 0) {+ //+ // Find PrmHandler Number and Name+ //+ FindPrmHandler(Sym->st_value);++ strcpy(mExportSymName[mExportSymNum], (CHAR8*)SymName);+ mExportRVA[mExportSymNum] = (UINT32)(Sym->st_value);+ mExportSize += 2 * EFI_IMAGE_EXPORT_ADDR_SIZE + EFI_IMAGE_EXPORT_ORDINAL_SIZE + strlen((CHAR8 *)SymName) + 1;+ mExportSymNum ++;+ break;+ }+ }++ //+ // Second Get PrmHandler+ //+ for (SymIndex = 0; SymIndex < SymNum; SymIndex++) {+ UINT32 ExpIndex;+ Sym = (Elf_Sym *)(Symtab + SymIndex * shdr->sh_entsize);+ SymName = GetSymName(Sym);+ if (SymName == NULL) {+ continue;+ }++ for (ExpIndex = 0; ExpIndex < (mExportSymNum -1); ExpIndex++) {+ if (strcmp((CHAR8*)SymName, mExportSymName[ExpIndex]) != 0) {+ continue;+ }+ mExportRVA[ExpIndex] = (UINT32)(Sym->st_value);+ mExportSize += 2 * EFI_IMAGE_EXPORT_ADDR_SIZE + EFI_IMAGE_EXPORT_ORDINAL_SIZE + strlen((CHAR8 *)SymName) + 1;+ }+ }++ break;+ }+}++STATIC+VOID+WriteExport64 (+ VOID+ )+{+ EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;+ EFI_IMAGE_EXPORT_DIRECTORY *ExportDir;+ EFI_IMAGE_DATA_DIRECTORY *DataDir;+ UINT32 FileNameOffset;+ UINT32 FuncOffset;+ UINT16 Index;+ UINT8 *Tdata = NULL;++ ExportDir = (EFI_IMAGE_EXPORT_DIRECTORY*)(mCoffFile + mExportOffset);+ ExportDir->Characteristics = 0;+ ExportDir->TimeDateStamp = 0;+ ExportDir->MajorVersion = 0;+ ExportDir->MinorVersion =0;+ ExportDir->Name = 0;+ ExportDir->NumberOfFunctions = mExportSymNum;+ ExportDir->NumberOfNames = mExportSymNum;+ ExportDir->Base = EFI_IMAGE_EXPORT_ORDINAL_BASE;+ ExportDir->AddressOfFunctions = mExportOffset + sizeof(EFI_IMAGE_EXPORT_DIRECTORY);+ ExportDir->AddressOfNames = ExportDir->AddressOfFunctions + EFI_IMAGE_EXPORT_ADDR_SIZE * mExportSymNum;+ ExportDir->AddressOfNameOrdinals = ExportDir->AddressOfNames + EFI_IMAGE_EXPORT_ADDR_SIZE * mExportSymNum;++ FileNameOffset = ExportDir->AddressOfNameOrdinals + EFI_IMAGE_EXPORT_ORDINAL_SIZE * mExportSymNum;+ FuncOffset = FileNameOffset + strlen(mInImageName) + 1;++ // Write Input image Name RVA+ Tdata = mCoffFile + 12;+ *(UINT32 *)Tdata = FileNameOffset;++ // Write Input image Name+ strcpy((char *)(mCoffFile + FileNameOffset), mInImageName);++ for (Index = 0; Index < mExportSymNum; Index++) {+ //+ // Write Export Address Table+ //+ Tdata = mCoffFile + ExportDir->AddressOfFunctions + Index * EFI_IMAGE_EXPORT_ADDR_SIZE;+ *(UINT32 *)Tdata = mExportRVA[Index];++ //+ // Write Export Name Pointer Table+ //+ Tdata = mCoffFile + ExportDir->AddressOfNames + Index * EFI_IMAGE_EXPORT_ADDR_SIZE;+ *(UINT32 *)Tdata = FuncOffset;++ //+ // Write Export Ordinal table+ //+ Tdata = mCoffFile + ExportDir->AddressOfNameOrdinals + Index * EFI_IMAGE_EXPORT_ORDINAL_SIZE;+ *(UINT16 *)Tdata = Index;++ //+ // Write Export Name Table+ //+ strcpy((char *)(mCoffFile + FuncOffset), mExportSymName[Index]);+ FuncOffset += strlen(mExportSymName[Index]) + 1;+ }++ NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);+ DataDir = &NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_EXPORT];+ DataDir->VirtualAddress = mExportOffset;+ DataDir->Size = mExportSize;++} diff --git a/BaseTools/Source/C/GenFw/ElfConvert.c b/BaseTools/Source/C/GenFw/ElfConvert.c
index 7db8721167..795cdbd743 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.c
+++ b/BaseTools/Source/C/GenFw/ElfConvert.c
@@ -223,6 +223,16 @@ ConvertElf (
VerboseMsg ("Write debug info."); ElfFunctions.WriteDebug (); + //+ // For PRM Driver to Write export info.+ //+ if (mExportFlag) {+ VerboseMsg ("Scan symbol info.");+ ElfFunctions.ScanSymbol ();+ VerboseMsg ("Write export info.");+ ElfFunctions.WriteExport ();+ }+ // // Make sure image size is correct before returning the new image. //diff --git a/BaseTools/Source/C/GenFw/ElfConvert.h b/BaseTools/Source/C/GenFw/ElfConvert.h
index 801e8de4a2..7920765fbb 100644
--- a/BaseTools/Source/C/GenFw/ElfConvert.h
+++ b/BaseTools/Source/C/GenFw/ElfConvert.h
@@ -24,6 +24,7 @@ extern UINT8 *mCoffFile; extern UINT32 mTableOffset; extern UINT32 mOutImageType; extern UINT32 mFileBufferSize;+extern BOOLEAN mExportFlag; // // Common EFI specific data.@@ -31,6 +32,42 @@ extern UINT32 mFileBufferSize;
#define ELF_HII_SECTION_NAME ".hii" #define ELF_STRTAB_SECTION_NAME ".strtab" #define MAX_COFF_ALIGNMENT 0x10000+#define ELF_SYMBOL_SECTION_NAME ".symtab"++//+// Platform Runtime Mechanism (PRM) specific data.+//+#define PRM_MODULE_EXPORT_SYMBOL_NUM 10+#define PRM_HANDLER_NAME_MAXIMUM_LENGTH 128++#define PRM_MODULE_EXPORT_DESCRIPTOR_NAME "PrmModuleExportDescriptor"+#define PRM_MODULE_EXPORT_DESCRIPTOR_SIGNATURE SIGNATURE_64 ('P', 'R', 'M', '_', 'M', 'E', 'D', 'T')+#define PRM_MODULE_EXPORT_REVISION 0x0++//+// Platform Runtime Mechanism (PRM) Export Descriptor Structures+//+#pragma pack(push, 1)++typedef struct {+ EFI_GUID PrmHandlerGuid;+ CHAR8 PrmHandlerName[PRM_HANDLER_NAME_MAXIMUM_LENGTH];+} PRM_HANDLER_EXPORT_DESCRIPTOR_STRUCT;++typedef struct {+ UINT64 Signature;+ UINT16 Revision;+ UINT16 NumberPrmHandlers;+ EFI_GUID PlatformGuid;+ EFI_GUID ModuleGuid;+} PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER;++typedef struct {+ PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT_HEADER Header;+ PRM_HANDLER_EXPORT_DESCRIPTOR_STRUCT PrmHandlerExportDescriptors[1];+} PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT;++#pragma pack(pop) // // Filter Types@@ -38,7 +75,8 @@ extern UINT32 mFileBufferSize;
typedef enum { SECTION_TEXT, SECTION_HII,- SECTION_DATA+ SECTION_DATA,+ SECTION_SYMBOL } SECTION_FILTER_TYPES; @@ -50,6 +88,8 @@ typedef struct {
BOOLEAN (*WriteSections) (SECTION_FILTER_TYPES FilterType); VOID (*WriteRelocations) (); VOID (*WriteDebug) ();+ VOID (*ScanSymbol) ();+ VOID (*WriteExport) (); VOID (*SetImageSize) (); VOID (*CleanUp) (); diff --git a/BaseTools/Source/C/GenFw/GenFw.c b/BaseTools/Source/C/GenFw/GenFw.c
index 8cab70ba4d..c7de5b89d8 100644
--- a/BaseTools/Source/C/GenFw/GenFw.c
+++ b/BaseTools/Source/C/GenFw/GenFw.c
@@ -87,7 +87,7 @@ UINT32 mImageTimeStamp = 0;
UINT32 mImageSize = 0; UINT32 mOutImageType = FW_DUMMY_IMAGE; BOOLEAN mIsConvertXip = FALSE;-+BOOLEAN mExportFlag = FALSE; STATIC EFI_STATUS@@ -1436,6 +1436,15 @@ Returns:
continue; } + if (stricmp (argv[0], "--PRM") == 0) {+ if (!mExportFlag) {+ mExportFlag = TRUE;+ }+ argc --;+ argv ++;+ continue;+ }+ if (argv[0][0] == '-') { Error (NULL, 0, 1000, "Unknown option", argv[0]); goto Finish;diff --git a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
index f17b8ee19b..21c968e650 100644
--- a/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
+++ b/BaseTools/Source/C/Include/IndustryStandard/PeImage.h
@@ -571,6 +571,13 @@ typedef struct {
UINT32 AddressOfNameOrdinals; } EFI_IMAGE_EXPORT_DIRECTORY; +//+// Based export types.+//+#define EFI_IMAGE_EXPORT_ORDINAL_BASE 1+#define EFI_IMAGE_EXPORT_ADDR_SIZE 4+#define EFI_IMAGE_EXPORT_ORDINAL_SIZE 2+ /// /// DLL support. /// Import Format--
2.26.2.windows.1


Re: [edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg: Use MinPlatform build include files

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 20/27] SpcrFeaturePkg: Use MinPlatform build include files

Also added feature enable flag

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h | 2 +-
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf | 13 ++++
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf | 11 ++++
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc | 62 --------------------
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md | 12 ++--
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec | 6 ++
Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc | 18 ++++++
7 files changed, 55 insertions(+), 69 deletions(-)

diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h
index 947813815e..2e50270ee6 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/SpcrDeviceLib.h
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/Library/
+++ SpcrDeviceLib.h
@@ -12,7 +12,7 @@

/**
Get a Serial Port device used for SPCR.
- The caller should call FreePool() to free the memory if return value is not NULL.
+ The caller should call FreePool () to free the memory if return value is not NULL.

@retval NULL Can not get device.
@retval Others A serial port device path.
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemory.fdf
new file mode 100644
index 0000000000..f963f567c2
--- /dev/null
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PostMemo
+++ ry.fdf
@@ -0,0 +1,13 @@
+## @file
+# FDF file for post-memory SpcrFeature advanced feature.
+#
+# This file is intended to be included into another package so
+advanced features # can be conditionally included in the flash image
+by enabling the respective # feature via its FeaturePCD.
+#
+# Copyright (C) 2022 Intel Corporation.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent ##
+
+INF SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemory.fdf
new file mode 100644
index 0000000000..3c461e7fbc
--- /dev/null
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/PreMemor
+++ y.fdf
@@ -0,0 +1,11 @@
+## @file
+# FDF file for pre-memory SpcrFeature advanced feature.
+#
+# This file is intended to be included into another package so
+advanced features # can be conditionally included in the flash image
+by enabling the respective # feature via its FeaturePCD.
+#
+# Copyright (C) 2022 Intel Corporation.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent ##
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc
index c51e552df5..b06ddf4fe6 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeature.dsc
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Include/SpcrFeat
+++ ure.dsc
@@ -25,40 +25,9 @@
!error "DXE_ARCH must be specified to build this feature!"
!endif

-################################################################################
-#
-# Library Class section - list of all Library Classes needed by this feature.
-#
-################################################################################
-
-!include MdePkg/MdeLibs.dsc.inc
-
[LibraryClasses]
- #######################################
- # Edk2 Packages
- #######################################
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
- #######################################
- # SpcrFeaturePkg Packages
- #######################################
SpcrDeviceLib|SpcrFeaturePkg/Library/SpcrDeviceLibNull/SpcrDeviceLibNull.inf

-[LibraryClasses.common.DXE_DRIVER]
- #######################################
- # Edk2 Packages
- #######################################
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
-
################################################################################
#
# Component section - list of all components that need built for this feature.
@@ -74,38 +43,7 @@
#
################################################################################

-#
-# Feature DXE Components
-#
-
# @todo: Change below line to [Components.$(DXE_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308
# is completed.
[Components.X64]
- #####################################
- # Spcr Feature Package
- #####################################
-
- # Add library instances here that are not included in package components and should be tested
- # in the package build.
-
- # Add components here that should be included in the package build.
SpcrFeaturePkg/SpcrAcpiDxe/SpcrAcpiDxe.inf
- #{
-# <LibraryClasses>
-# SpcrDeviceLib|SpcrFeaturePkg/Library/SpcrDeviceLibNull/SpcrDeviceLibNull.inf
-# }
-
-###################################################################################################
-#
-# BuildOptions Section - Define the module specific tool chain flags that should be used as
-# the default flags for a module. These flags are appended to any
-# standard flags that are defined by the build process. They can be
-# applied for any modules or only those modules with the specific
-# module style (EDK or EDKII) specified in [Components] section.
-#
-# For advanced features, it is recommended to enable [BuildOptions] in
-# the applicable INF file so it does not affect the whole board package
-# build when this DSC file is active.
-#
-###################################################################################################
-[BuildOptions]
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md
index 0a5d48876d..66138ee0f6 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/Readme.md
@@ -22,10 +22,10 @@ Platform can implement its own library to select the serial port device.
* SpcrDeviceLibNull

## SpcrAcpiDxe
-The main driver of convert the serial port device info to ACPI table.
-It will call the function GetSpcrDevice() in the library SpcrDeviceLib to get the serial port device path.
+The main driver of convert the serial port device info into an ACPI table.
+It will call the function GetSpcrDevice () in the library SpcrDeviceLib to get the serial port device path.
If the serial port device path is not NULL, then use gEfiPciIoProtocolGuid to get the PCI info, and use the gEfiSerialIoProtocolGuid to get the serial port info, such as the baud rate etc.
-If the serial port device is PCI device 00:16:03 (AMT serial over lan PCI device), then will set the BaseAddress.
+If the serial port device is PCI device 00:16:03 (AMT serial over LAN PCI device), then will set the BaseAddress.
At last fill the ACPI table as Windows required.

## SpcrDeviceLibNull
@@ -37,19 +37,19 @@ Fill the serial port device info used for SPCR to ACPI table.

## Configuration
There is not special configuration.
-But the platform maybe implemente its own SpcrDeviceLib.
+But the platform may implement its own SpcrDeviceLib.

## Data Flows
GetSpcrDevice() -> serial port device path -> get PCI info and serial port info -> ACPI table.

## Control Flows
-GetSpcrDevice() in SpcrDeviceLib -> SpcrAcpiDxe.
+GetSpcrDevice () in SpcrDeviceLib -> SpcrAcpiDxe.

## Build Flows
There is not special build flow.

## Test Point Results
-* Check the output ACPI table.
+There are not test points implemented.

## Functional Exit Criteria
* Check the output ACPI table.
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
index 03776abf06..b084fad892 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dec
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
+++ ec
@@ -21,6 +21,12 @@
[Includes]
Include

+[Guids]
+ gSpcrFeaturePkgTokenSpaceGuid = { 0xe978c988, 0xeeba, 0x4671, { 0xb8,
+0x0d, 0xcc, 0x8b, 0x89, 0xb5, 0xd1, 0xef }}
+
+[PcdsFeatureFlag]
+
+gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable|FALSE|BOOLEAN|0x0000
+0001
+
[LibraryClasses]
## @libraryclass Provides an API for get SPCR device.
#
diff --git a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc
index 82d2d3ac73..2ee874a58e 100644
--- a/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.dsc
+++ b/Features/Intel/OutOfBandManagement/SpcrFeaturePkg/SpcrFeaturePkg.d
+++ sc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 21/27] TemplateFeaturePkg: Use MinPlatform build include files

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 21/27] TemplateFeaturePkg: Use MinPlatform build include files

Extend the template to leverage common library build files.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc | 2 +-
Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc b/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
index 6742eddcf9..dd6d033aca 100644
--- a/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
+++ b/Features/Intel/TemplateFeaturePkg/Include/TemplateFeature.dsc
@@ -73,7 +73,7 @@
# is completed.
[Components.IA32]
#####################################
- # <TEMPALTE> Feature Package
+ # <TEMPLATE> Feature Package
#####################################

# Add library instances here that are not included in package components and should be tested diff --git a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
index 0ce8debee0..03657047dc 100644
--- a/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
+++ b/Features/Intel/TemplateFeaturePkg/TemplateFeaturePkg.dsc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 24/27] MinPlatformPkg/Build: Add an include file for the common SPI FV info

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 24/27] MinPlatformPkg/Build: Add an include file for the common SPI FV info

This include file allows for elimination of a lot of duplicate code and makes FDF files more readable.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf | 24 ++++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf b/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fdf
new file mode 100644
index 0000000000..fdda085a41
--- /dev/null
+++ b/Platform/Intel/MinPlatformPkg/Include/Fdf/CommonSpiFvHeaderInfo.fd
+++ f
@@ -0,0 +1,24 @@
+## @file CommonSpiFvHeaderInfo.fdf
+#
+# @copyright
+# Copyright (C) 2020 - 2021 Intel Corporation # #
+SPDX-License-Identifier: BSD-2-Clause-Patent ##
+
+FvAlignment = 16 #FV alignment and FV attributes setting.
+ERASE_POLARITY = 1
+MEMORY_MAPPED = TRUE
+STICKY_WRITE = TRUE
+LOCK_CAP = TRUE
+LOCK_STATUS = TRUE
+WRITE_DISABLED_CAP = TRUE
+WRITE_ENABLED_CAP = TRUE
+WRITE_STATUS = TRUE
+WRITE_LOCK_CAP = TRUE
+WRITE_LOCK_STATUS = TRUE
+READ_DISABLED_CAP = TRUE
+READ_ENABLED_CAP = TRUE
+READ_STATUS = TRUE
+READ_LOCK_CAP = TRUE
+READ_LOCK_STATUS = TRUE
--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 15/27] NetworkFeaturePkg: Use MinPlatformPkg build include files

Standalong build was not working due to missing libraries.
Leverage MinPlatformPkg common includes for core libraries.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc | 89 ++------------------
Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc | 18 ++++
2 files changed, 24 insertions(+), 83 deletions(-)

diff --git a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
index bbc91ecbb1..ca151b4e33 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
@@ -18,12 +18,12 @@
#
################################################################################
[Defines]
-!ifndef $(PEI_ARCH)
- !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
- !error "DXE_ARCH must be specified to build this feature!"
-!endif
+ !ifndef $(PEI_ARCH)
+ !error "PEI_ARCH must be specified to build this feature!"
+ !endif
+ !ifndef $(DXE_ARCH)
+ !error "DXE_ARCH must be specified to build this feature!"
+ !endif

!include NetworkPkg/NetworkDefines.dsc.inc

@@ -41,56 +41,9 @@
#
################################################################################

-!include MdePkg/MdeLibs.dsc.inc
-
[LibraryClasses]
!include NetworkPkg/NetworkLibs.dsc.inc
-
- #######################################
- # Edk2 Packages
- #######################################
- BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
- FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf
- HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
- IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
- OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
- PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
- PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
- PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf
- SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
- SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
- TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
- UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
- UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
- UefiDriverEntryPoint|MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint.inf
- UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
- UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
- UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
-
-[LibraryClasses.common.SEC,LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
-
-[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER,LibraryClasses.common.UEFI_APPLICATION]
- #######################################
- # Edk2 Packages
- #######################################
- DxeServicesLib|MdePkg/Library/DxeServicesLib/DxeServicesLib.inf
- DxeServicesTableLib|MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.inf
- HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
- MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf

################################################################################
#
@@ -106,21 +59,6 @@
# generated for it, but the binary will not be put into any firmware volume.
#
################################################################################
-#
-# Feature PEI Components
-#
-
-# @todo: Change below line to [Components.$(PEI_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308
-# is completed.
-[Components.IA32]
- #####################################
- # Network Feature Package
- #####################################
-
- # Add library instances here that are not included in package components and should be tested
- # in the package build.
-
- # Add components here that should be included in the package build.

#
# Feature DXE Components
@@ -138,18 +76,3 @@

# Add components here that should be included in the package build.
!include NetworkPkg/NetworkComponents.dsc.inc
-
-###################################################################################################
-#
-# BuildOptions Section - Define the module specific tool chain flags that should be used as
-# the default flags for a module. These flags are appended to any
-# standard flags that are defined by the build process. They can be
-# applied for any modules or only those modules with the specific
-# module style (EDK or EDKII) specified in [Components] section.
-#
-# For advanced features, it is recommended to enable [BuildOptions] in
-# the applicable INF file so it does not affect the whole board package
-# build when this DSC file is active.
-#
-###################################################################################################
-[BuildOptions]
diff --git a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
index 199686fa09..cdc5dc851d 100644
--- a/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
+++ b/Features/Intel/Network/NetworkFeaturePkg/NetworkFeaturePkg.dsc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 22/27] AdvancedFeaturePkg: Fix all relative package paths

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 22/27] AdvancedFeaturePkg: Fix all relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc | 15 ++++++++-------
Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf | 15 ++++++++-------
Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf | 15 ++++++++-------
3 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index ac9ab80e8e..874b8ce7db 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -14,45 +14,46 @@
# Debug Advanced Features
#
!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
- !include Debugging/AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
+ !include AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
!endif
+
!if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
- !include Debugging/Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
+ !include Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
!endif

#
# Network Advanced Features
#
!if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
- !include Network/NetworkFeaturePkg/Include/NetworkFeature.dsc
+ !include NetworkFeaturePkg/Include/NetworkFeature.dsc
!endif

#
# Out-of-Band Management Advanced Features # !if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
- !include OutOfBandManagement/IpmiFeaturePkg/Include/IpmiFeature.dsc
+ !include IpmiFeaturePkg/Include/IpmiFeature.dsc
!endif

#
# Power Management Advanced Features
#
!if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
- !include PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
+ !include S3FeaturePkg/Include/S3Feature.dsc
!endif

#
# System Information Advanced Features
#
!if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
- !include SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
+ !include SmbiosFeaturePkg/Include/SmbiosFeature.dsc
!endif

#
# User Interface Advanced Features
#
!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == TRUE
- !include UserInterface/UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+ !include UserAuthFeaturePkg/Include/UserAuthFeature.dsc
!endif

!if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index c49a0fd875..e710fe7f01 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -15,45 +15,46 @@
# Debug Advanced Features
#
!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
- !include Debugging/AcpiDebugFeaturePkg/Include/PostMemory.fdf
+ !include AcpiDebugFeaturePkg/Include/PostMemory.fdf
!endif
+
!if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
- !include Debugging/Usb3DebugFeaturePkg/Include/PostMemory.fdf
+ !include Usb3DebugFeaturePkg/Include/PostMemory.fdf
!endif

#
# Network Advanced Features
#
!if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
- !include Network/NetworkFeaturePkg/Include/PostMemory.fdf
+ !include NetworkFeaturePkg/Include/PostMemory.fdf
!endif

#
# Out-of-Band Management Advanced Features # !if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
- !include OutOfBandManagement/IpmiFeaturePkg/Include/PostMemory.fdf
+ !include IpmiFeaturePkg/Include/PostMemory.fdf
!endif

#
# Power Management Advanced Features
#
!if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
- !include PowerManagement/S3FeaturePkg/Include/PostMemory.fdf
+ !include S3FeaturePkg/Include/PostMemory.fdf
!endif

#
# System Information Advanced Features
#
!if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
- !include SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf
+ !include SmbiosFeaturePkg/Include/PostMemory.fdf
!endif

#
# User Interface Advanced Features
#
!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == TRUE
- !include UserInterface/UserAuthFeaturePkg/Include/PostMemory.fdf
+ !include UserAuthFeaturePkg/Include/PostMemory.fdf
!endif

!if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index 1b21e96a5f..177aafc1ec 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -15,45 +15,46 @@
# Debug Advanced Features
#
!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
- !include Debugging/AcpiDebugFeaturePkg/Include/PreMemory.fdf
+ !include AcpiDebugFeaturePkg/Include/PreMemory.fdf
!endif
+
!if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
- !include Debugging/Usb3DebugFeaturePkg/Include/PreMemory.fdf
+ !include Usb3DebugFeaturePkg/Include/PreMemory.fdf
!endif

#
# Network Advanced Features
#
!if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
- !include Network/NetworkFeaturePkg/Include/PreMemory.fdf
+ !include NetworkFeaturePkg/Include/PreMemory.fdf
!endif

#
# Out-of-Band Management Advanced Features # !if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
- !include OutOfBandManagement/IpmiFeaturePkg/Include/PreMemory.fdf
+ !include IpmiFeaturePkg/Include/PreMemory.fdf
!endif

#
# Power Management Advanced Features
#
!if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
- !include PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
+ !include S3FeaturePkg/Include/PreMemory.fdf
!endif

#
# System Information Advanced Features
#
!if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
- !include SystemInformation/SmbiosFeaturePkg/Include/PreMemory.fdf
+ !include SmbiosFeaturePkg/Include/PreMemory.fdf
!endif

#
# User Interface Advanced Features
#
!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == TRUE
- !include UserInterface/UserAuthFeaturePkg/Include/PreMemory.fdf
+ !include UserAuthFeaturePkg/Include/PreMemory.fdf
!endif

!if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE
--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 23/27] AdvancedFeaturePkg: Add missing features

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 23/27] AdvancedFeaturePkg: Add missing features

The AdvancedFeaturePkg is supposed to include all features.
Add Beep Debug feature to include DSC and FDF.

Order features based on their domains.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc | 66 ++++++++++++++++----
Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc | 36 ++++++++---
Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc | 64 +++++++++++++++----
Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf | 36 ++++++++---
Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf | 36 ++++++++---
Features/Intel/Readme.md | 49 ++++++++++-----
6 files changed, 219 insertions(+), 68 deletions(-)

diff --git a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index 0c7a29cc75..02636da916 100644
--- a/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -36,7 +36,6 @@

!include AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc

-
################################################################################
#
# Advanced Feature Enable section - all advanced features are enabling for the @@ -44,26 +43,71 @@ # ################################################################################
[PcdsFeatureFlag]
- gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable |TRUE
- gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable |TRUE
- gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable |TRUE
- gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable |TRUE
- gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable |TRUE
- gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |TRUE
- gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable |TRUE
- gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable |TRUE
- gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable |FALSE
+ #
+ # Debugging features
+ #
+ gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable |TRUE
+ gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable |TRUE
+ gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable |TRUE
+ gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |TRUE
+
+ #
+ # Network features
+ #
+ gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable |TRUE
+
+ #
+ # OutOfBandManagement features
+ #
+ gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable |TRUE
+ gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable |TRUE
+
+ #
+ # PowerManagement features
+ #
+ gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable |TRUE
+
+ #
+ # SystemInformation features
+ #
+ gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable |TRUE
+
+ #
+ # UserInterface features
+ #
+ gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable |TRUE
+ gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable |TRUE
+
+ gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnab
+ le |TRUE
+
+#
+# PCD that are required to be set by the build target should be
+configured here for test purposes # These settings are only for the purposes of buildings, boards should follow instructions in Readme files.
+#
+
+[PcdsFixedAtBuild]
+ gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugPortLibInstance|1
+
+[PcdsFeatureFlag]
+ #
+ # MinPlatform common include currently required PCD
+ #
gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE

#
-# Include common library
+# Include common libraries
#
!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc

+#
+# Libraries required to be specified by the build target #
+[LibraryClasses.Common]
+
+PlatformHookLib|MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatfo
+rmHookLibNull.inf # Required by BeepDebugFeature
+
#
# This package builds all advanced features.
#
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
index 874b8ce7db..2b36938df6 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeatures.dsc
@@ -11,51 +11,67 @@
##

#
-# Debug Advanced Features
+# Debugging features
#
!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
!include AcpiDebugFeaturePkg/Include/AcpiDebugFeature.dsc
!endif

+!if gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable ==
+TRUE
+ !include BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
+!endif
+
+!if
+gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable ==
+TRUE
+ !include PostCodeDebugFeaturePkg/Include/PostCodeDebugFeature.dsc
+!endif
+
!if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
!include Usb3DebugFeaturePkg/Include/Usb3DebugFeature.dsc
!endif

#
-# Network Advanced Features
+# Network features
#
!if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
!include NetworkFeaturePkg/Include/NetworkFeature.dsc
!endif

#
-# Out-of-Band Management Advanced Features
+# OutOfBandManagement features
#
!if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
!include IpmiFeaturePkg/Include/IpmiFeature.dsc
!endif

+!if gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable == TRUE
+ !include SpcrFeaturePkg/Include/SpcrFeature.dsc
+!endif
+
#
-# Power Management Advanced Features
+# PowerManagement features
#
!if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
!include S3FeaturePkg/Include/S3Feature.dsc
!endif

#
-# System Information Advanced Features
+# SystemInformation features
#
!if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
!include SmbiosFeaturePkg/Include/SmbiosFeature.dsc
!endif

#
-# User Interface Advanced Features
+# UserInterface features
#
-!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == TRUE
- !include UserAuthFeaturePkg/Include/UserAuthFeature.dsc
-!endif
-
!if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE
!include LogoFeaturePkg/Include/LogoFeature.dsc
!endif
+
+!if
+gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable ==
+TRUE
+ !include UserAuthFeaturePkg/Include/UserAuthFeature.dsc
+!endif
+
+!if
+gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnabl
+e == TRUE
+ !include VirtualKeyboardFeaturePkg/Include/VirtualKeyboardFeature.dsc
+!endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
index ad248de800..e214175eda 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
+++ b/Features/Intel/AdvancedFeaturePkg/Include/AdvancedFeaturesPcd.dsc
@@ -16,28 +16,70 @@
#
[Packages]
MdePkg/MdePkg.dec
+
+ #
+ # Debugging features
+ #
AcpiDebugFeaturePkg/AcpiDebugFeaturePkg.dec
+ BeepDebugFeaturePkg/BeepDebugFeaturePkg.dec
+ PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dec
Usb3DebugFeaturePkg/Usb3DebugFeaturePkg.dec
+
+ #
+ # Networking features
+ #
NetworkFeaturePkg/NetworkFeaturePkg.dec
+
+ #
+ # OutOfBandManagement features
+ #
IpmiFeaturePkg/IpmiFeaturePkg.dec
+ SpcrFeaturePkg/SpcrFeaturePkg.dec
+
+ #
+ # PowerManagement features
+ #
S3FeaturePkg/S3FeaturePkg.dec
+
+ #
+ # SystemInformation features
+ #
SmbiosFeaturePkg/SmbiosFeaturePkg.dec
- UserAuthFeaturePkg/UserAuthFeaturePkg.dec
+
+ #
+ # UserInterface features
+ #
LogoFeaturePkg/LogoFeaturePkg.dec
- BeepDebugFeaturePkg/BeepDebugFeaturePkg.dec
- PostCodeDebugFeaturePkg/PostCodeDebugFeaturePkg.dec
+ UserAuthFeaturePkg/UserAuthFeaturePkg.dec
+ VirtualKeyboardFeaturePkg/VirtualKeyboardFeaturePkg.dec

#
# The section below sets all PCDs to FALSE in this DSC file so the feature is not enabled by default.
# Board can set PCDs to TRUE in its DSC file to enable a subset of advanced features # [PcdsFeatureFlag]
- gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable |FALSE
- gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable |FALSE
- gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable |FALSE
- gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable |FALSE
- gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable |FALSE
- gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |FALSE
- gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable |FALSE
- gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable |FALSE
+ gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable |FALSE
+ gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable |FALSE
+ gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable |FALSE
+ gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable |FALSE
+
+ gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable |FALSE
+
+ gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable |FALSE
+ gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable |FALSE
+
+ gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable |FALSE
+
+ gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable |FALSE
+
+ gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable |FALSE
+ gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable |FALSE
+
+ gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnab
+ le |FALSE
+
+#
+# There seems to be some build parsing odd behavior that requires this
+PCD to be specified even though # the *.fdf that consumes it is dependent on the feature flag.
+# This section is to ensure that boards have these PCD instantiated.
+#
+[PcdsFeatureFlag]
gLogoFeaturePkgTokenSpaceGuid.PcdJpgEnable |FALSE
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
index e710fe7f01..99089f9a7b 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PostMemory.fdf
@@ -12,51 +12,67 @@
##

#
-# Debug Advanced Features
+# Debugging features
#
!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
!include AcpiDebugFeaturePkg/Include/PostMemory.fdf
!endif

+!if gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable ==
+TRUE
+ !include BeepDebugFeaturePkg/Include/PostMemory.fdf
+!endif
+
+!if
+gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable ==
+TRUE
+ !include PostCodeDebugFeaturePkg/Include/PostMemory.fdf
+!endif
+
!if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
!include Usb3DebugFeaturePkg/Include/PostMemory.fdf
!endif

#
-# Network Advanced Features
+# Network features
#
!if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
!include NetworkFeaturePkg/Include/PostMemory.fdf
!endif

#
-# Out-of-Band Management Advanced Features
+# OutOfBandManagement features
#
!if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
!include IpmiFeaturePkg/Include/PostMemory.fdf
!endif

+!if gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable == TRUE
+ !include SpcrFeaturePkg/Include/PostMemory.fdf
+!endif
+
#
-# Power Management Advanced Features
+# PowerManagement features
#
!if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
!include S3FeaturePkg/Include/PostMemory.fdf
!endif

#
-# System Information Advanced Features
+# SystemInformation features
#
!if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
!include SmbiosFeaturePkg/Include/PostMemory.fdf
!endif

#
-# User Interface Advanced Features
+# UserInterface features
#
-!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == TRUE
- !include UserAuthFeaturePkg/Include/PostMemory.fdf
-!endif
-
!if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE
!include LogoFeaturePkg/Include/PostMemory.fdf
!endif
+
+!if
+gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable ==
+TRUE
+ !include UserAuthFeaturePkg/Include/PostMemory.fdf
+!endif
+
+!if
+gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnabl
+e == TRUE
+ !include VirtualKeyboardFeaturePkg/Include/PostMemory.fdf
+!endif
diff --git a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
index 177aafc1ec..1db258446a 100644
--- a/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/AdvancedFeaturePkg/Include/PreMemory.fdf
@@ -12,51 +12,67 @@
##

#
-# Debug Advanced Features
+# Debugging features
#
!if gAcpiDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugFeatureEnable == TRUE
!include AcpiDebugFeaturePkg/Include/PreMemory.fdf
!endif

+!if gBeepDebugFeaturePkgTokenSpaceGuid.PcdBeepDebugFeatureEnable ==
+TRUE
+ !include BeepDebugFeaturePkg/Include/PreMemory.fdf
+!endif
+
+!if
+gPostCodeDebugFeaturePkgTokenSpaceGuid.PcdPostCodeDebugFeatureEnable ==
+TRUE
+ !include PostCodeDebugFeaturePkg/Include/PreMemory.fdf
+!endif
+
!if gUsb3DebugFeaturePkgTokenSpaceGuid.PcdUsb3DebugFeatureEnable == TRUE
!include Usb3DebugFeaturePkg/Include/PreMemory.fdf
!endif

#
-# Network Advanced Features
+# Network features
#
!if gNetworkFeaturePkgTokenSpaceGuid.PcdNetworkFeatureEnable == TRUE
!include NetworkFeaturePkg/Include/PreMemory.fdf
!endif

#
-# Out-of-Band Management Advanced Features
+# OutOfBandManagement features
#
!if gIpmiFeaturePkgTokenSpaceGuid.PcdIpmiFeatureEnable == TRUE
!include IpmiFeaturePkg/Include/PreMemory.fdf
!endif

+!if gSpcrFeaturePkgTokenSpaceGuid.PcdSpcrFeatureEnable == TRUE
+ !include SpcrFeaturePkg/Include/PreMemory.fdf
+!endif
+
#
-# Power Management Advanced Features
+# PowerManagement features
#
!if gS3FeaturePkgTokenSpaceGuid.PcdS3FeatureEnable == TRUE
!include S3FeaturePkg/Include/PreMemory.fdf
!endif

#
-# System Information Advanced Features
+# SystemInformation features
#
!if gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosFeatureEnable == TRUE
!include SmbiosFeaturePkg/Include/PreMemory.fdf
!endif

#
-# User Interface Advanced Features
+# UserInterface features
#
-!if gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable == TRUE
- !include UserAuthFeaturePkg/Include/PreMemory.fdf
-!endif
-
!if gLogoFeaturePkgTokenSpaceGuid.PcdLogoFeatureEnable == TRUE
!include LogoFeaturePkg/Include/PreMemory.fdf
!endif
+
+!if
+gUserAuthFeaturePkgTokenSpaceGuid.PcdUserAuthenticationFeatureEnable ==
+TRUE
+ !include UserAuthFeaturePkg/Include/PreMemory.fdf
+!endif
+
+!if
+gVirtualKeyboardFeaturePkgTokenSpaceGuid.PcdVirtualKeyboardFeatureEnabl
+e == TRUE
+ !include VirtualKeyboardFeaturePkg/Include/PreMemory.fdf
+!endif
diff --git a/Features/Intel/Readme.md b/Features/Intel/Readme.md index 1a03a4c0d2..cf5ef7b260 100644
--- a/Features/Intel/Readme.md
+++ b/Features/Intel/Readme.md
@@ -195,32 +195,47 @@ At a minimum, an advanced feature must consist of the following elements:
6. Add the source code for the advanced feature.
* If the feature is large it is recommended to add libraries in one patch and then modules in a following patch.

-7. Update the feature DSC file. This file is in `XxxFeaturePkg/Include/XxxFeature.dsc`.
+7. Update the feature DSC include file. This file is in `XxxFeaturePkg/Include/XxxFeature.dsc`.
* In most cases, `XxxFeaturePkg/XxxFeaturePkg.dsc` should just `!include XxxFeaturePkg/Include/XxxFeature.dsc`.
+ * This file should not duplicate core content from `MinPlatformPkg/Include/Dsc` except where a change is required by
+ the feature.

-8. Update the feature FDF files. These files are `XxxFeaturePkg/Include/PreMemory.fdf` and
+8. Update the feature FDF include files. These files are
+`XxxFeaturePkg/Include/PreMemory.fdf` and
`XxxFeaturePkg/Include/PostMemory.fdf`.
* Each file should contain the feature pre-memory modules and post-memory modules respectively.

9. Build the advanced feature package to ensure the build is successful:
-
From the workspace root:
- 1. cd edk2-platforms/edk2
- 2. Execute edksetup.bat (Windows) or edksetup.sh (Linux).
- 3. Verify the "WORKSPACE" environment variable is set to the edk2 directory in your workspace.
- 4. Set the "PACKAGES_PATH" environment variable to include the edk2-platforms/Platform/Intel, edk2-platforms/Silicon/Intel,
- and edk2-platforms/Features/Intel directories.
+ 1. Verify the "WORKSPACE" environment variable is set to the parent of edk2 and edk2-platforms directory in your
+ workspace.
+ 2. Set the "PACKAGES_PATH" environment variable to include the edk2, edk2-platforms/Platform/Intel,
+ edk2-platforms/Silicon/Intel, and edk2-platforms/Features/Intel directories.
* Windows example:
- * set PACKAGES_PATH=c:\Edk2Workspace\edk2-platforms\Platform\Intel;
- c:\Edk2Workspace\edk2-platforms\Silicon\Intel;
- c:\Edk2Workspace\edk2-platforms\Features\Intel
+ * set PACKAGES_PATH=%WORKSPACE%\edk2;
+ %WORKSPACE%\edk2-platforms\Platform\Intel;
+ %WORKSPACE%\edk2-platforms\Silicon\Intel;
+ %WORKSPACE%\edk2-platforms\Features\Intel;
+ %WORKSPACE%\edk2-platforms\Features\Intel\Debugging;
+ %WORKSPACE%\edk2-platforms\Features\Intel\Network;
+ %WORKSPACE%\edk2-platforms\Features\Intel\OutOfBandManagement;
+ %WORKSPACE%\edk2-platforms\Features\Intel\PowerManagement;
+ %WORKSPACE%\edk2-platforms\Features\Intel\SystemInformation;
+
+ %WORKSPACE%\edk2-platforms\Features\Intel\UserInterface
* Linux example:
- * export PACKAGES_PATH=~/Edk2Workspace/edk2-platforms/Platform/Intel:
+ * export PACKAGES_PATH=~Edk2Workspace/edk2:
+ ~/Edk2Workspace/edk2-platforms/Platform/Intel:
~/Edk2Workspace/edk2-platforms/Silicon/Intel:
- ~/Edk2Workspace/edk2-platforms/Features/Intel
+ ~/Edk2Workspace/edk2-platforms/Features/Intel:
+ ~/Edk2Workspace/edk2-platforms/Features/Intel/Debugging:
+ ~/Edk2Workspace/edk2-platforms/Features/Intel/Network:
+ ~/Edk2Workspace/edk2-platforms/Features/Intel/OutOfBandManagement:
+ ~/Edk2Workspace/edk2-platforms/Features/Intel/PowerManagement:
+ ~/Edk2Workspace/edk2-platforms/Features/Intel/SystemInformation:
+ ~/Edk2Workspace/edk2-platforms/Features/Intel/UserInterface
+ 3. cd edk2
+ 4. Execute edksetup.bat (Windows) or edksetup.sh (Linux).
5. cd edk2-platforms/Features/Intel
- 6. <pre>build -p FeatureDomainDirectory/XxxFeaturePkg/XxxFeaturePkg.dsc -a IA32 -a X64</pre>
-
+ 6. <pre>build -a IA32 -a X64 -p
+ FeatureDomainDirectory/XxxFeaturePkg/XxxFeaturePkg.dsc</pre>
*Note:* -a specifies the architecture. Typically IA32 and X64 modules are built for 32-bit PEI and 64-bit
DXE though build for your specific requirements.

@@ -228,11 +243,13 @@ At a minimum, an advanced feature must consist of the following elements:
1. Add `XxxFeaturePkg/Include/XxxFeature.dsc` to `AdvancedFeatures.dsc`
2. Add `XxxFeaturePkg/Include/PreMemory.fdf` to `AdvancedFeaturePkg/Include/PreMemory.fdf`
3. Add `XxxFeaturePkg/Include/PostMemory.fdf` to `AdvancedFeaturePkg/Include/PostMemory.fdf`
+ 4. Add the `PcdFeatureEnable` to `AdvancedFeaturesPcd.dsc` set to FALSE
+ 5. Add the `PcdFeatureEnable` to `AdvancedFeaturePkg.dsc` set to
+ TRUE

11. Build `AdvancedFeaturePkg` to ensure the build is successful.
1. Follow the steps in step #9 but change the build command to:

- <pre>build -p AdvancedFeaturePkg/AdvancedFeaturePkg.dsc -a IA32 -a X64</pre>
+ <pre>build -a IA32 -a X64 -p
+ AdvancedFeaturePkg/AdvancedFeaturePkg.dsc</pre>

12. Before sending your patch series, ensure the `Readme.md` file in `XxxFeaturePkg` is completed so others can use it
during the feature review.
--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 08/27] SmbiosFeaturePkg: Fix all relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf | 2 +-
Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc | 2 +-
Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf | 2 +-
Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec | 10 +++++-----
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf
index 3ed23bd937..c3a3e81503 100644
--- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemory.fdf
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/PostMemo
+++ ry.fdf
@@ -7,4 +7,4 @@
#
##

- INF SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
+ INF SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
index 31d44b68b3..094dd957b8 100644
--- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFeature.dsc
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/Include/SmbiosFe
+++ ature.dsc
@@ -100,7 +100,7 @@
# in the package build.

# Add components here that should be included in the package build.
- SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
+ SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf

###################################################################################################
#
diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
index bd8736b621..8e530c4945 100644
--- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/SmbiosBasicDxe.inf
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosBasicDxe/S
+++ mbiosBasicDxe.inf
@@ -33,7 +33,7 @@
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
- SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+ SmbiosFeaturePkg/SmbiosFeaturePkg.dec

[LibraryClasses]
BaseLib
diff --git a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
index 6170f37969..db3cdbb0d0 100644
--- a/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+++ b/Features/Intel/SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg
+++ .dec
@@ -38,7 +38,7 @@
IndustryStandard/SmBios.h
<Packages>
MdePkg/MdePkg.dec
- SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+ SmbiosFeaturePkg/SmbiosFeaturePkg.dec
}
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.Vendor|0x1
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType0BiosInformation.BiosVersion|0x2
@@ -71,7 +71,7 @@
IndustryStandard/SmBios.h
<Packages>
MdePkg/MdePkg.dec
- SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+ SmbiosFeaturePkg/SmbiosFeaturePkg.dec
}
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.Manufacturer|0x1
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType1SystemInformation.ProductName|0x2
@@ -87,7 +87,7 @@
IndustryStandard/SmBios.h
<Packages>
MdePkg/MdePkg.dec
- SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+ SmbiosFeaturePkg/SmbiosFeaturePkg.dec
}

#
@@ -111,7 +111,7 @@
IndustryStandard/SmBios.h
<Packages>
MdePkg/MdePkg.dec
- SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+ SmbiosFeaturePkg/SmbiosFeaturePkg.dec
}
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Manufacturer|0x1
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType3SystemEnclosureChassis.Type|MiscChassisTypeRackMountChassis
@@ -131,7 +131,7 @@
IndustryStandard/SmBios.h
<Packages>
MdePkg/MdePkg.dec
- SystemInformation/SmbiosFeaturePkg/SmbiosFeaturePkg.dec
+ SmbiosFeaturePkg/SmbiosFeaturePkg.dec
}
gSmbiosFeaturePkgTokenSpaceGuid.PcdSmbiosType32SystemBootInformation.BootStatus|BootInformationStatusNoError

--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>
Subject: [edk2-devel][edk2-platforms][PATCH V1 07/27] S3FeaturePkg: Use MinPlatformPkg build include files

Use the MinPlatformPkg common core build files to build libraries needed by this feature.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf | 2 +- Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc | 72 ++------------------
Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc | 18 +++++
3 files changed, 26 insertions(+), 66 deletions(-)

diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
index 34caf3dacc..fdd16a4e03 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/PreMemory.fdf
@@ -7,4 +7,4 @@
#
##

- INF S3FeaturePkg/S3Pei/S3Pei.inf
+INF S3FeaturePkg/S3Pei/S3Pei.inf
diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
index f94bd2b431..cc34e78507 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/Include/S3Feature.dsc
@@ -18,12 +18,12 @@
#
################################################################################
[Defines]
-!ifndef $(PEI_ARCH)
- !error "PEI_ARCH must be specified to build this feature!"
-!endif
-!ifndef $(DXE_ARCH)
- !error "DXE_ARCH must be specified to build this feature!"
-!endif
+ !ifndef $(PEI_ARCH)
+ !error "PEI_ARCH must be specified to build this feature!"
+ !endif
+ !ifndef $(DXE_ARCH)
+ !error "DXE_ARCH must be specified to build this feature!"
+ !endif

################################################################################
#
@@ -31,34 +31,7 @@
#
################################################################################

-!include MdePkg/MdeLibs.dsc.inc
-
-[LibraryClasses]
- #######################################
- # Edk2 Packages
- #######################################
- BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
- BaseMemoryLib|MdePkg/Library/BaseMemoryLibRepStr/BaseMemoryLibRepStr.inf
- DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf
- IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
- PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
- PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
- PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
-
-[LibraryClasses.common.PEI_CORE,LibraryClasses.common.PEIM]
- #######################################
- # Edk2 Packages
- #######################################
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
- PcdLib|MdePkg/Library/PeiPcdLib/PeiPcdLib.inf
- PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
- PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
- PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLibIdt/PeiServicesTablePointerLibIdt.inf
-
- #######################################
- # Silicon Initialization Package
- #######################################
+[LibraryClasses.common.PEIM]
SmmAccessLib|IntelSiliconPkg/Feature/SmmAccess/Library/PeiSmmAccessLib/PeiSmmAccessLib.inf

################################################################################
@@ -92,34 +65,3 @@

# Add components here that should be included in the package build.
S3FeaturePkg/S3Pei/S3Pei.inf
-
-#
-# Feature DXE Components
-#
-
-# @todo: Change below line to [Components.$(DXE_ARCH)] after https://bugzilla.tianocore.org/show_bug.cgi?id=2308
-# is completed.
-[Components.X64]
- #####################################
- # S3 Feature Package
- #####################################
-
- # Add library instances here that are not included in package components and should be tested
- # in the package build.
-
- # Add components here that should be included in the package build.
-
-###################################################################################################
-#
-# BuildOptions Section - Define the module specific tool chain flags that should be used as
-# the default flags for a module. These flags are appended to any
-# standard flags that are defined by the build process. They can be
-# applied for any modules or only those modules with the specific
-# module style (EDK or EDKII) specified in [Components] section.
-#
-# For advanced features, it is recommended to enable [BuildOptions] in
-# the applicable INF file so it does not affect the whole board package
-# build when this DSC file is active.
-#
-###################################################################################################
-[BuildOptions]
diff --git a/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc b/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc
index 28ee49d429..e16a1f8d00 100644
--- a/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc
+++ b/Features/Intel/PowerManagement/S3FeaturePkg/S3FeaturePkg.dsc
@@ -24,6 +24,24 @@
PEI_ARCH = IA32
DXE_ARCH = X64

+[Packages]
+ MinPlatformPkg/MinPlatformPkg.dec
+
+[PcdsFeatureFlag]
+ #
+ # PCD needed for MinPlatform build includes
+ #
+ gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable |FALSE
+ gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable |FALSE
+
+#
+# Include common libraries
+#
+!include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+!include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+!include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
+
#
# This package always builds the feature.
#
--
2.27.0.windows.1


Re: [edk2-platforms][PATCH V1 02/27] BeepDebugFeaturePkg: Fix all relative package paths

Chaganty, Rangasai V
 

Reviewed-by: Sai Chaganty <rangasai.v.chaganty@intel.com>

-----Original Message-----
From: Oram, Isaac W <isaac.w.oram@intel.com>
Sent: Tuesday, January 11, 2022 6:20 PM
To: devel@edk2.groups.io
Cc: Oram, Isaac W <isaac.w.oram@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Dong, Eric <eric.dong@intel.com>
Subject: [edk2-devel][edk2-platforms][PATCH V1 02/27] BeepDebugFeaturePkg: Fix all relative package paths

Packages should be at the root of a PACKAGES_PATH entry.
At some point, paths were relative to edk2-platforms/Features/Intel which was functional, but interferes with the proper functioning of packaging tools.

Cc: Sai Chaganty <rangasai.v.chaganty@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>

Signed-off-by: Isaac Oram <isaac.w.oram@intel.com>
---
Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
index 251de6932b..00ef022657 100644
--- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeature.dsc
+++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Include/BeepDebugFeat
+++ ure.dsc
@@ -54,17 +54,17 @@
gBeepDebugFeaturePkgTokenSpaceGuid.PcdStatusCodeUseBeep

[LibraryClasses.Common]
- BeepLib|Debugging/BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf
- BeepMapLib|Debugging/BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf
+ BeepLib|BeepDebugFeaturePkg/Library/BeepLib/BeepLibNull.inf
+ BeepMapLib|BeepDebugFeaturePkg/Library/BeepMapLib/BeepMapLib.inf

[LibraryClasses.PEIM, LibraryClasses.PEI_CORE]
- StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatusCodeHandlerLib.inf
+
+ StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHandler
+ Lib/PeiBeepStatusCodeHandlerLib.inf

[LibraryClasses.DXE_RUNTIME_DRIVER]
- StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf
+
+ StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHandler
+ Lib/RuntimeDxeBeepStatusCodeHandlerLib.inf

[LibraryClasses.DXE_SMM_DRIVER]
- StatusCodeHandlerLib|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatusCodeHandlerLib.inf
+
+ StatusCodeHandlerLib|BeepDebugFeaturePkg/Library/BeepStatusCodeHandler
+ Lib/SmmBeepStatusCodeHandlerLib.inf

[Components.IA32]

@@ -77,7 +77,7 @@
#
FILE_GUID = $(BEEP_PEIM_FILENAME)
<LibraryClasses>
- NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatusCodeHandlerLib.inf
+
+ NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/PeiBeepStatu
+ sCodeHandlerLib.inf
}

[Components.X64]
@@ -90,7 +90,7 @@
#
FILE_GUID = $(BEEP_DXE_FILENAME)
<LibraryClasses>
- NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.inf
+
+ NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBe
+ epStatusCodeHandlerLib.inf
}

MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf { @@ -102,5 +102,5 @@
#
FILE_GUID = $(BEEP_SMM_FILENAME)
<LibraryClasses>
- NULL|Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatusCodeHandlerLib.inf
+
+ NULL|BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/SmmBeepStatu
+ sCodeHandlerLib.inf
}
--
2.27.0.windows.1

4221 - 4240 of 89854