[edk2-devel] [edk2-platforms][PATCH V2 02/16] Platform/Loongson: Support SEC And Add Readme.md

2022-03-24 Thread xianglai
Add SEC Code And Readme.md for LoongArchQemu Signed-off-by: xianglai li Signed-off-by: xianglai li --- .../Include/LoongArchAsmMacro.h | 23 + .../Loongson/LoongArchQemuPkg/Loongson.dec| 38 ++ .../Loongson/LoongArchQemuPkg/Loongson.dsc| 133 + .../Loongson/LoongArc

[edk2-devel] JunoPkg: RELEASE boot hangs at "Press ESCAPE for boot options" (SiI3132AtaPassThruCommand)

2022-03-24 Thread Rebecca Cran
I've noticed a problem that only appears to affect RELEASE builds of JunoPkg: the boot hangs at "Press ESCAPE for boot options ...". Breaking into the code, I see it in SiI3132AtaPassThruCommand running the loop around line 236: while (Timeout && !(Value32 & IrqMask)) {   gBS->Stall (

[edk2-devel] [edk2-platforms][PATCH V2 16/16] Platform/Loongson: Support for saving variables to flash.

2022-03-24 Thread xianglai
Added the function of saving non-volatile variables. Signed-off-by: xianglai li --- Platform/Loongson/LoongArchQemuPkg/Loongson.dec | 6 ++ Platform/Loongson/LoongArchQemuPkg/Loongson.dsc | 2 +- Platform/Loongson/LoongArchQemuPkg/Loongson.fdf | 16 +++- .../Loongson/LoongAr

Re: [edk2-devel] [PATCH v6 0/2] ShellPkg/AcpiView: Adds ACPI_PARSER bitfield parser

2022-03-24 Thread Gao, Zhichao
Patch set: Reviewed-by: Zhichao Gao Thanks, Zhichao > -Original Message- > From: Abdul Lateef Attar > Sent: Friday, March 18, 2022 8:59 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Gao, Zhichao ; Sami > Mujawar > Subject: [PATCH v6 0/2] ShellPkg/AcpiView: Adds ACPI_PARSER bitfield > p

[edk2-devel] [edk2-platforms][PATCH V2 14/16] Platform/Loongson: Support Dxe

2022-03-24 Thread xianglai
Support Dxe for LoogArch. Signed-off-by: xianglai li --- .../Loongson/LoongArchQemuPkg/Loongson.dec| 14 +- .../Loongson/LoongArchQemuPkg/Loongson.dsc| 399 +- .../Loongson/LoongArchQemuPkg/Loongson.fdf| 240 +++ .../LoongArchQemuPkg/Loongson.fdf.inc

[edk2-devel] [edk2-platforms][PATCH V2 15/16] Platform/Loongson: Add QemuFlashFvbServicesRuntimeDxe driver.

2022-03-24 Thread xianglai
This library provides flash read and write functionality and supports writing variables to flash. Signed-off-by: xianglai li --- .../QemuFlashFvbServicesRuntimeDxe/FvbInfo.c | 115 ++ .../FvbServicesRuntimeDxe.inf | 76 ++ .../FvbServicesSmm.inf| 70

[edk2-devel] [edk2-platforms][PATCH V2 09/16] Platform/Loongson: Add PciCpuIoDxe driver.

2022-03-24 Thread xianglai
Add PCI CpuIo protocol.there is no fix translation offset between I/O port accesses and MMIO accesses. Add PciCpuIo2Dxe driver to implement EFI_CPU_IO2_PROTOCOL to add the translation for IO access. Signed-off-by: xianglai li --- .../Drivers/PciCpuIo2Dxe/PciCpuIo2Dxe.c | 548 ++

[edk2-devel] [edk2-platforms][PATCH V2 13/16] Platform/Loongson: Add Reset System Lib.

2022-03-24 Thread xianglai
This library provides interfaces related to restart and shutdown. Signed-off-by: xianglai li --- .../Library/ResetSystemLib/ResetSystemLib.c | 155 ++ .../Library/ResetSystemLib/ResetSystemLib.inf | 40 + 2 files changed, 195 insertions(+) create mode 100644 Platform/Loo

[edk2-devel] [edk2-platforms][PATCH V2 11/16] Platform/Loongson: Add RealTime Clock lib.

2022-03-24 Thread xianglai
This library provides interfaces such as real-time clock initialization to get time and setting time. Signed-off-by: xianglai li --- .../LsRealTimeClockLib/LsRealTimeClock.h | 41 +++ .../LsRealTimeClockLib/LsRealTimeClockLib.c | 343 ++ .../LsRealTimeClockLib/LsRealTimeC

[edk2-devel] [edk2-platforms][PATCH V2 12/16] Platform/Loongson: Add Platform Boot Manager Lib.

2022-03-24 Thread xianglai
The Library provides Boot Manager interfaces. Signed-off-by: xianglai li --- .../PlatformBootManagerLib/PlatformBm.c | 760 ++ .../PlatformBootManagerLib/PlatformBm.h | 112 +++ .../PlatformBootManagerLib.inf| 77 ++ .../PlatformBootManagerLib/QemuKer

[edk2-devel] [edk2-platforms][PATCH V2 10/16] Platform/Loongson: Add timer Dxe driver.

2022-03-24 Thread xianglai
This driver produces Timer Architectural Protocol, Registers a timer interrupt and initializes the timer. Signed-off-by: xianglai li --- .../Drivers/StableTimerDxe/Timer.c| 405 ++ .../Drivers/StableTimerDxe/Timer.h| 166 +++ .../Drivers/StableTimerDxe

[edk2-devel] [edk2-platforms][PATCH V2 08/16] Platform/Loongson: Add CPU DXE driver.

2022-03-24 Thread xianglai
The driver produces EFI_CPU_ARCH_PROTOCOL, Initialize the exception entry address. Signed-off-by: xianglai li --- .../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.c | 382 ++ .../LoongArchQemuPkg/Drivers/CpuDxe/CpuDxe.h | 153 +++ .../Drivers/CpuDxe/CpuDxe.inf |

[edk2-devel] [edk2-platforms][PATCH V2 07/16] Platform/Loongson: Support PEI phase.

2022-03-24 Thread xianglai
Platform PEI module for LoongArch platform initialization. Signed-off-by: xianglai li --- .../Loongson/LoongArchQemuPkg/Loongson.dec| 22 ++ .../Loongson/LoongArchQemuPkg/Loongson.dsc| 66 - .../Loongson/LoongArchQemuPkg/Loongson.fdf| 51 .../LoongArchQemuPkg/PlatformPei/

[edk2-devel] [edk2-platforms][PATCH V2 06/16] Platform/Loongson: Add StableTimerLib.

2022-03-24 Thread xianglai
This library provides a delay interface and a timing interface. Signed-off-by: xianglai li --- .../Include/Library/StableTimer.h | 42 +++ .../Library/StableTimerLib/Count.S| 26 ++ .../Library/StableTimerLib/TimerLib.c | 262 ++ .../Library/Stab

[edk2-devel] [edk2-platforms][PATCH V2 05/16] Platform/Loongson: Add MmuLib.

2022-03-24 Thread xianglai
Read the memory map information through the QemuFwCfg interface, then build the page table through the memory map information, and finally enable Mmu. Signed-off-by: xianglai li --- .../LoongArchQemuPkg/Include/Library/Cpu.h| 29 + .../LoongArchQemuPkg/Include/Library/MmuLib.h | 85 ++ ...

[edk2-devel] [edk2-platforms][PATCH V2 03/16] Platform/Loongson: Add PeiServicesTablePointerLib.

2022-03-24 Thread xianglai
Use a register to save PeiServicesTable pointer, This lib Provides PeiServicesTable pointer saving and retrieval services. Signed-off-by: xianglai li --- .../PeiServicesTablePointer.c | 78 +++ .../PeiServicesTablePointerLib.inf| 32 2 files c

[edk2-devel] [edk2-platforms][PATCH V2 04/16] Platform/Loongson: Add QemuFwCfgLib.

2022-03-24 Thread xianglai
QemuFwCfgLib for PEI phase. This library obtains the QemuFWCfg base address by directly parsing the fdt, and reads and writes the data in the QemuFWCfg by operating on the QemuFWCfg base address. Signed-off-by: xianglai li --- .../Include/IndustryStandard/QemuFwCfg.h | 95 .../Include

[edk2-devel] [edk2-platforms][PATCH V2 01/16] Platform/Loongson: Add Serial Port library

2022-03-24 Thread xianglai
Serial Port library for LoongarchQemuPkg Signed-off-by: xianglai li --- .../LoongArchQemuPkg/Include/Library/Cpu.h| 344 ++ .../Include/LoongArchQemuPlatform.h | 103 +++ .../Library/SerialPortLib/SerialPortLib.c | 612 ++ .../Library/SerialPortLib/Seria

[edk2-devel] [edk2-platforms][PATCH V2 00/16] Platform: Add Loongson support.

2022-03-24 Thread xianglai
The uploaded code generates firmware to support Linux launching on the LoongArch platform under qemu, So it will run in a virtual machine. LoongArch is the general processor architecture of Loongson. You can get the latest LoongArch documents or LoongArch tools at https://github.com/loongson/.

Re: [edk2-devel] [PATCH 1/2] UefiPayloadPkg: Add a new DebugPrintErrorLevelLib instance.

2022-03-24 Thread Ni, Ray
+++ b/UefiPayloadPkg/Library/DebugPrintErrorLevelLibCmos/DebugPrintErrorLevelLibCmos.c 1. Please change the folder and file names to "DebugPrintErrorLevelLibHob/DebugPrintErrorLevelLibHob.c". Please change the INF file name accordingly. +#include 2. PiHob.h is included by PiDxe.h. So you

Re: [edk2-devel] [PATCH v2 0/2] MdeModulePkg: fix checks for NVM command set

2022-03-24 Thread Wu, Hao A
Series pushed via: PR - https://github.com/tianocore/edk2/pull/2682 Commits - https://github.com/tianocore/edk2/commit/5d8d8b514832fcaa36c0b573b51442c2f53e2aaf https://github.com/tianocore/edk2/commit/69218d5d2854acaa7a11c777244de4a297d2fbb9 Best Regards, Hao Wu > -Original Message- > Fro

[edk2-devel] Question about UEFI, AddressSanitizer and MMU mappings

2022-03-24 Thread Pedro Falcato
Hi! I've been thinking about adding sanitizer support (UBSan and KASAN), like coreboot already has, to the wiki's Tasks for the upcoming GSoC, but I'm a bit confused by something. Is there anything in the UEFI spec that stops us from doing non-identity memory mappings? I know it specifies the need

Re: [edk2-devel] [PATCH v2 3/8] ArmPkg: Add Arm Firmware TRNG library

2022-03-24 Thread Leif Lindholm
On Thu, Mar 24, 2022 at 15:56:32 +0100, Pierre Gondois wrote: > > > > > +/** Invoke the monitor call using the appropriate conduit. > > > > > +If PcdMonitorConduitHvc is TRUE use the HVC conduit else use SMC > > > > > conduit. > > > > > + > > > > > + @param [in, out] ArgsArguments passed

Re: [edk2-devel] [PATCH v2 3/8] ArmPkg: Add Arm Firmware TRNG library

2022-03-24 Thread PierreGondois
(Replacing Leif's mail address to the @quicinc.com one) On 3/24/22 10:46, Pierre Gondois wrote: On 11/25/21 16:23, Sami Mujawar via groups.io wrote: Hi Leif, Thank you for the feedback. Please find my response inline marked [SAMI]. Regards, Sami Mujawar On 24/11/2021 01:01 PM, Leif Lind

Re: [edk2-devel] [PATCH edk2-platforms 1/3] Platform/Qemu: Update SbsaQemu Readme.md to change 'ATF' to 'TF-A'

2022-03-24 Thread Leif Lindholm
For the series: Reviewed-by: Leif Lindholm Pushed as 1b548f8e16a9..41628dcf3332. Thanks! On Sat, Mar 19, 2022 at 14:32:50 -0600, Rebecca Cran wrote: > Trusted Firmware is no longer called ATF (ARM Trusted Firmware) but is > now TF-A (Trusted Firmware for A-profile architecture). Update > Readme.

Re: [edk2-devel] [PATCH edk2-platforms 1/1] Maintainers.txt: update email for Leif Lindholm

2022-03-24 Thread Leif Lindholm
Thanks! Wow, I kicked this can quite far down the road. Sorry about that. Reviewed-by: Leif Lindholm Pushed as 1b548f8e16a9. On Mon, Feb 07, 2022 at 17:19:20 +, Kinney, Michael D wrote: > Reviewed-by: Michael D Kinney > > Mike > > > -Original Message- > > From: Leif Lindholm >

[edk2-devel] [PATCH 3/3] Basetools: turn off gcc12 warning

2022-03-24 Thread Gerd Hoffmann
In function ‘SetDevicePathEndNode’, inlined from ‘FileDevicePath’ at DevicePathUtilities.c:857:5: DevicePathUtilities.c:321:3: error: writing 4 bytes into a region of size 1 [-Werror=stringop-overflow=] 321 | memcpy (Node, &mUefiDevicePathLibEndDevicePath, sizeof (mUefiDevicePathLibEndDev

[edk2-devel] [PATCH 0/3] BaseTools: patches to build with gcc12

2022-03-24 Thread Gerd Hoffmann
Two bugfixes (patches 1+2), one workaround (#3). Gerd Hoffmann (3): BaseTools: fix gcc12 warning BaseTools: fix gcc12 warning Basetools: turn off gcc12 warning BaseTools/Source/C/GenFfs/GenFfs.c | 2 +- BaseTools/Source/C/GenSec/GenSec.c | 2 +- BaseTools/Source/C

[edk2-devel] [PATCH 2/3] BaseTools: fix gcc12 warning

2022-03-24 Thread Gerd Hoffmann
Sdk/C/LzmaEnc.c: In function ‘LzmaEnc_CodeOneMemBlock’: Sdk/C/LzmaEnc.c:2828:19: error: storing the address of local variable ‘outStream’ in ‘*p.rc.outStream’ [-Werror=dangling-pointer=] 2828 | p->rc.outStream = &outStream.vt; | ^~~ Sdk/C/LzmaEnc.c:2811:28: n

[edk2-devel] [PATCH 1/3] BaseTools: fix gcc12 warning

2022-03-24 Thread Gerd Hoffmann
GenFfs.c:545:5: error: pointer ‘InFileHandle’ used after ‘fclose’ [-Werror=use-after-free] 545 | Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); | ^~~ GenFfs.c:544

Re: [edk2-devel] [PATCH v2 3/8] ArmPkg: Add Arm Firmware TRNG library

2022-03-24 Thread PierreGondois
On 11/25/21 16:23, Sami Mujawar via groups.io wrote: Hi Leif, Thank you for the feedback. Please find my response inline marked [SAMI]. Regards, Sami Mujawar On 24/11/2021 01:01 PM, Leif Lindholm wrote: Hi Sami, On Tue, Nov 16, 2021 at 11:32:55 +, Sami Mujawar wrote: Bugzilla: 3668