Have you looked to see what OS code does to access CSR registers?
Mike
From: 李超
Sent: Friday, August 18, 2023 7:18 PM
To: devel@edk2.groups.io; af...@apple.com
Cc: Kinney, Michael D ; pedro.falc...@gmail.com;
Gao, Liming ; Feng, Bob C ;
Chen, Christine
Subject: Re: Re: [edk2-devel] About EDK2
Oliver:
https://github.com/tianocore/edk2/pull/4751 is created to merge this patch.
Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io 代表 gaoliming via
> groups.io
> 发送时间: 2023年8月19日 10:45
> 收件人: 'Oliver Smith-Denny' ;
> devel@edk2.groups.io; quic_llind...@quicinc.com; 'Ard Biesheuvel'
Oliver:
This patch is not required to be updated. You can send another for this clean
up in Allocate after the stable tag.
Thanks
Liming
> -邮件原件-
> 发件人: Oliver Smith-Denny
> 发送时间: 2023年8月18日 1:05
> 收件人: gaoliming ; devel@edk2.groups.io;
> quic_llind...@quicinc.com; 'Ard Biesheuvel'
>
Hi Mike and Andrew,
The CSR instructions integer value width is 14 bits, use for to access the CSR
registers (Control And Status Registers).
Just like Andrew saying, the CSR registers include status registers, exception
registers, TLB registers, performance conters etc.
Now, there are a few nu
Now that the transition to use SetMemoryProtectionsLib and
GetMemoryProtectionsLib is complete, delete the memory protection PCDs
to avoid confusing the interface. All memory protection settings
will now be set and consumed via the libraries.
Signed-off-by: Taylor Beebe
Cc: Ard Biesheuvel
Cc: Le
Now that the transition to use SetMemoryProtectionsLib and
GetMemoryProtectionsLib is complete, delete the memory protection PCDs
to avoid confusing the interface. All memory protection settings
will now be set and consumed via the libraries.
Signed-off-by: Taylor Beebe
Cc: Jian J Wang
Cc: Limin
Now that the transition to use SetMemoryProtectionsLib and
GetMemoryProtectionsLib is complete, delete the memory protection PCDs
to avoid confusing the interface. All memory protection settings
will now be set and consumed via the libraries.
Signed-off-by: Taylor Beebe
Cc: Ard Biesheuvel
Cc: Ji
Now that the transition to use SetMemoryProtectionsLib and
GetMemoryProtectionsLib is complete, delete the PCD profile
to avoid confusing the interface. All memory protection settings
will now be set and consumed via the libraries.
Signed-off-by: Taylor Beebe
Cc: Jian J Wang
Cc: Liming Gao
---
Set the memory protections on Arm virtual platforms. Because
the QemuFg parser is not currently available in ArmVirtPkg, use
the RELEASE profile by default.
Signed-off-by: Taylor Beebe
Cc: Ard Biesheuvel
Cc: Leif Lindholm
Cc: Sami Mujawar
Cc: Gerd Hoffmann
---
ArmVirtPkg/MemoryInitPei/Memory
Now that the EDK2 tree uses GetMemoryProtectionsLib to query
the platform memory protection settings, OvmfPkg can be updated
to use QemuCfg to set the entire memory protection profile instead
of just SetNxForStack.
For example, the following will set the DXE memory protection to
the RELEASE preset
Replace references to the memory protection PCDs to instead
check the platform protections via GetMemoryProtectionsLib.
Because the protection profile is equivalent to the PCD settings,
this updated does not cause a torn state.
Signed-off-by: Taylor Beebe
Cc: Eric Dong
Cc: Ray Ni
Cc: Rahul Kum
Replace references to the memory protection PCDs to instead
check the platform protections via GetMemoryProtectionsLib.
Because the protection profile is equivalent to the PCD settings,
this updated does not cause a torn state.
Signed-off-by: Taylor Beebe
Cc: Jian J Wang
Cc: Liming Gao
Cc: Dan
Update the DXE handoff logic in MdeModulePkg to use
SetMemoryProtectionsLib to fetch the platform memory protection
settings and reference them when creating the page tables.
Because the protection profile is equivalent to the PCD settings
even when the platform does not explicitly set a profile,
Update the DXE handoff logic in UefiPayloadPkg to use
SetMemoryProtectionsLib to fetch the platform memory protection
settings and reference them when creating the page tables.
Because the protection profile is equivalent to the PCD settings
even when the platform does not explicitly set a profile
Now that the EDK2 tree uses GetMemoryProtectionsLib to query
the platform memory protection settings, we can add additional
profiles to SetMemoryProtectionsLib to give plaforms more options
for setting memory protections.
Signed-off-by: Taylor Beebe
Cc: Jian J Wang
Cc: Liming Gao
---
MdeModule
Replace references to the memory protection PCDs to instead
check the platform protections via GetMemoryProtectionsLib.
Because the protection profile is equivalent to the PCD settings,
this updated does not cause a torn state.
Signed-off-by: Taylor Beebe
Cc: Andrew Fish
Cc: Ray Ni
---
Emulat
Replace references to the memory protection PCDs to instead
check the platform protections via GetMemoryProtectionsLib.
Signed-off-by: Taylor Beebe
Cc: Leif Lindholm
Cc: Ard Biesheuvel
Cc: Sami Mujawar
---
ArmPkg/Drivers/CpuDxe/CpuDxe.c | 5 ++---
ArmPkg/ArmPkg.dsc| 1 +
Arm
Replace references to the memory protection PCDs to instead
check the platform protections via GetMemoryProtectionsLib.
Because the protection profile is equivalent to the PCD settings,
this updated does not cause a torn state.
Signed-off-by: Taylor Beebe
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc:
This patch updates the DXE Handoff in PEI-less Startup to use
SetMemoryProtectionsLib to get the platform memory protection settings
and build the page tables based on the applied protections.
Signed-off-by: Taylor Beebe
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Cc: Gerd Hoffmann
--
Use SetMemoryProtectionsLib to set the memory protections for
the platform in both normal and PEI-less boot. The protections
set are equivalent to the PCD settings and the ability to set
NxForStack via QemuCfg is preserved. Once the transition to use
SetMemoryProtectionsLib and GetMemoryProtections
Memory protection is not set in PEI and ingested during and
after DXE handoff. This paradigm means that the platform cannot
reliably query the stack guard setting during MpInit. Because the
execution path of PEI consistent and no third party
code is executed, setting the stack guard in MpInit on ev
Add library classes for SetMemoryProtectionsLib and
GetMemoryProtectionsLib to ArmVirtPkg.
Signed-off-by: Taylor Beebe
Cc: Ard Biesheuvel
Cc: Leif Lindholm
Cc: Sami Mujawar
Cc: Gerd Hoffmann
Cc: Julien Grall
---
ArmVirtPkg/ArmVirt.dsc.inc | 6 ++
1 file changed, 6 insertions(+)
diff --
Add library classes for SetMemoryProtectionsLib and
GetMemoryProtectionsLib to OvmfPkg platfomrs.
Signed-off-by: Taylor Beebe
Cc: Ard Biesheuvel
Cc: Jiewen Yao
Cc: Jordan Justen
Cc: Gerd Hoffmann
Cc: Rebecca Cran
Cc: Peter Grehan
Cc: Corvin Köhne
Cc: Jianyong Wu
Cc: Anatol Belski
Cc: An
The NULL instances for GetMemoryProtectionsLib and
SetMemoryProtectionsLib just zero out the memory protections
structure effectively disabling memory protections.
Signed-off-by: Taylor Beebe
Cc: Jian J Wang
Cc: Liming Gao
---
MdeModulePkg/Library/GetMemoryProtectionsLib/GetMemoryProtectionsLi
The SetMemoryProtectionsLib implementation has functionality for
setting protections based on a preset profile or a custom DXE/MM
profile passed in by the caller. The implementation also supports
locking the protections (tracked via an extra boolean stored
in the HOB entry) which prevents the prote
SetMemoryProtectionsLib is a PEIM which allows platforms to
apply memory protection settings to the current boot.
GetMemoryProtectionsLib has DXE and MM implementations to allow
platforms to query the current memory protection settings via a
global variable populated by the library Implementations
Because the platform memory protection settings will be stored
in the HOB, the HOB list should be marked read-only and non-executable
as soon as possible in boot.
This patch page-aligns the allocated HOB list in DXE and marks
it RO/NX during memory protection initialization.
Signed-off-by: Taylor
When page/pool protections are active, the GCD sync process takes
quite a bit longer than normal. This behavior is primarily due to
a function which dumps the GCD memory map to the console. This
dump function runs only on DEBUG builds but will iterate through
the GCD memory map dozens of times even
These headers provide settings definitions for memory protections,
settings profiles for easily enabling memory protections,
and the GUIDs used for producing the memory protection HOB entry.
The settings options are functionally 1:1 with the existing
PCD bitfield definitions. Instead of setting a
In the past, memory protection settings were configured via FixedAtBuild PCDs,
which resulted in a build-time configuration of memory mitigations. This
approach limited the flexibility of applying mitigations to the
system and made it difficult to update or adjust the settings post-build.
In a des
On Fri, 18 Aug 2023 at 20:17, Oliver Smith-Denny
wrote:
>
> Currently, unlike OVMF, ArmVirtQemu does not display any graphics,
> only the QEMU monitor. Graphics are helpful to confirm booting into
> an OS is successful, interacting with the EFI shell while getting
> separate logging messages, etc.
Is RegisterBlock a flexible array member?
If so, then [] is the compatible syntax.
Mike
> -Original Message-
> From: Chris Li OS
> Sent: Friday, August 18, 2023 2:29 AM
> To: devel@edk2.groups.io; Nong, Foster ; Gao,
> Liming
> Cc: Yao, Jiewen ; Ni, Ray ;
> Kinney, Michael D ; Open Sou
On Tue, 15 Aug 2023 at 10:10, Ard Biesheuvel wrote:
>
> On Mon, 14 Aug 2023 at 10:15, Corvin Köhne wrote:
> >
> > On Thu, 2023-08-10 at 15:54 -0400, Michael Kubacki wrote:
> > > I'm not sure why test results are not being reported that may be a
> > > larger issue.
> > >
> > > I pulled the branch
Add a parser for the MPAM (Memory system resource partitioning and
monitoring) ACPI table. This parser would parse all MPAM related
structures embedded as part of the ACPI table. Necessary validations are
also performed where and when required.
Signed-off-by: Rohit Mathew
Cc: James Morese
Cc: Sa
Certain ACPI tables like MPAM has fields which are 16 bytes long.
Routines similar to Dump12Chars but for 16 characters are required to
print such fields. Add Dump16Chars routine to satisfy this requirement.
Signed-off-by: Rohit Mathew
Cc: James Morese
Cc: Sami Mujawar
Cc: Thomas Abraham
Cc: Z
From: Rohit Mathew
Add definitions, macros and types for elements associated with MPAM
ACPI 2.0 specification.
Signed-off-by: Rohit Mathew
Cc: James Morese
Cc: Liming Gao
Cc: Michael D Kinney
Cc: Sami Mujawar
Cc: Thomas Abraham
Cc: Zhiguang Liu
Acked-by: Liming Gao
Reviewed-by: Pierre Go
This series adds the following
- definitions corresponding to MPAM ACPI 2.0 specification.
- MPAM parser
An MPAM ACPI table formulated using the newly added MPAM ACPI definitions were
validated on the linux kernel tree at [1]. The same table was parsed via
acpiview using the newly added parser
Got it, thanks Liming. So we need wait until 2023-08-25, then you can help
merge the patches. 😊
-Original Message-
From: gaoliming
Sent: Friday, August 18, 2023 3:03 PM
To: devel@edk2.groups.io; Zeng, Star ; Cuevas Farfan,
Eduardo
Cc: Kinney, Michael D ; Liu, Zhiguang
; Gao, Zhichao
Absorbed Foster's input with minor delta.
@Nong, Foster @Liming and all kindly help review/vote again.
One change compared with Intel's proposal is the below line, we prefer [1]
style to be safer to work across all compilers.
Let us know if you folks have different suggestions here.
- CXL_DV
This patch seems a new feature to add new definition from SMBIOS 3.7.0. It is
sent and reviewed after soft feature freeze.
Based on the release rule, it will not be merged for this stable tag 202308. It
can be merged after the stable tag is created.
Thanks
Liming
> -邮件原件-
> 发件人: devel
40 matches
Mail list logo