Crc16 is used in some cases, so add it to BaseLib.
Ming Huang (1):
MdePkg BaseLib: Add new API CalculateCrc16()
MdePkg/Include/Library/BaseLib.h | 20 ++++++
MdePkg/Library/BaseLib/CheckSum.c | 73 ++++++++++++++++++++
2 files changed, 93 insertions(+)
--
2.9.5
This is RFC for UEFI implementation for new machine based on Qemu Virt which is
faithful as possible to real hardware. In opposition to existing Qemu Virt
machine which is suited for performing workloads, the purpose of this machine
is development of firmware and OS for AARCH64 server alike platforms (like in
situation where real HW is not available yet or the debugging is easier to
control under emulation). The SBSAQemu name, was chosen because the modeled HW
is aimed to follow way that server-style armv8 machines are recommended to be
set up.
Implementation does not use fw-cfg nor DT provided by Qemu.
This patch is provided as presentation for progress, not functional UEFI
implementation. You cannot boot system at current state.
To mention just few missing features:
- Qemu <-> ATF <-> UEFI communication channel for dynamic parameters like DRAM size
- Related dynamic initialization in UEFI is for now with static PCD's
- ACPI platform driver
- SMBIOS Support
Implementation support sbsa-ref machine which is also work in progress.
The provided patch is compatible with V3 of Qemu patches:
"[PATCH v3] hw/arm: Add arm SBSA reference machine" by Hongbo Zhang:
Compatible Qemu code can be also found in repo:
https://git.linaro.org/people/hongbo.zhang/qemu-enterprise.git/
branch sbsa-v3.0.0 1e47e69c69
The most recent v5 patches contains memory map change which is not compatible
with provided UEFI code at this momment.
The compatible ATF code can be downloaded from:
ssh://git@git.linaro.org/people/radoslaw.biernacki/atf.git
branch wip_rad_sbsa_continue 05b8dfb7
For compilation of ATF code please follow atf/docs/plat/sbsa.rst
The compilation of edk2-platforms follows usual way described in
edk2-platform/Readme.md. The only change is that SBSAQemu requires
that ATF images (bl1.bin and fip.bin) need to be copied to workspace directory.
To compile issue following command seqence from workspace dir:
$ export WORKSPACE=$PWD
$ export PACKAGES_PATH=$PWD/edk2:$PWD/edk2-platforms
$ make -C edk2/BaseTools
$ export GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
$ . edk2/edksetup.sh
$ build -n 4 -b DEBUG -a AARCH64 -t GCC5 -p edk2-platforms/Platform/SBSAQemu/SBSAQemu.dsc
The resulting SBSA_FLASH0.fd file will contain secure flash0 image (ATF code).
The SBSA_FLASH1.fd will contain non-secure UEFI code and UEFI variables.
As Qemu expects both files to be specific size those files need a trim by:
truncate -s 67108864 SBSA_FLASH0.fd (this issue will be fixed in following patches)
Similar instruction how to build ATF and EDK2 for SBSAQemu can be
found in atf/docs/plat/sbsa.rst
For testing author used following command sequence issued from workspace dir:
$ cp Build/SBSAQemu-AARCH64/DEBUG_GCC5/FV/SBSA_FLASH[01].fd .
$ truncate -s 67108864 SBSA_FLASH0.fd
$ truncate -s 67108864 SBSA_FLASH1.fd
$ qemu_inst/bin/qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M sbsa-ref,secure=on -pflash SBSA_FLASH0.fd -pflash SBSA_FLASH1.fd -serial stdio -hda disk1.img
Where disk1.img is disk image with EFI compatible partition layout.
In case you provide Linux with GRUB you should be able to see working Qemu
emulated VGA with list of boot options. The proper boot requires future work on
mentioned missing features.
Please provide feedback which might be helpfull for future development.
Radoslaw Biernacki (1):
SBSAQemu: Initial implementation for QemuSBSA
Silicon/Qemu/SBSAQemuPkg.dec | 45 ++
Platform/SBSAQemu/SBSAQemu.dsc | 807 ++++++++++++++++++++
Platform/SBSAQemu/SBSAQemu.fdf | 368 +++++++++
Silicon/Qemu/Drivers/SBSAQemuPlatformDxe/SBSAQemuPlatformDxe.inf | 47 ++
Silicon/Qemu/Library/SBSANorFlashQemuLib/SBSANorFlashQemuLib.inf | 35 +
Silicon/Qemu/Library/SBSAPciHostBridgeLib/SBSAPciHostBridgeLib.inf | 44 ++
Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuLib.inf | 54 ++
Silicon/Qemu/Drivers/SBSAQemuPlatformDxe/SBSAQemuPlatformDxe.c | 61 ++
Silicon/Qemu/Library/SBSANorFlashQemuLib/SBSANorFlashQemuLib.c | 45 ++
Silicon/Qemu/Library/SBSAPciHostBridgeLib/SBSAPciHostBridgeLib.c | 201 +++++
Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuLib.c | 148 ++++
Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuMem.c | 109 +++
Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuHelper.S | 63 ++
13 files changed, 2027 insertions(+)
create mode 100644 Silicon/Qemu/SBSAQemuPkg.dec
create mode 100644 Platform/SBSAQemu/SBSAQemu.dsc
create mode 100644 Platform/SBSAQemu/SBSAQemu.fdf
create mode 100644 Silicon/Qemu/Drivers/SBSAQemuPlatformDxe/SBSAQemuPlatformDxe.inf
create mode 100644 Silicon/Qemu/Library/SBSANorFlashQemuLib/SBSANorFlashQemuLib.inf
create mode 100644 Silicon/Qemu/Library/SBSAPciHostBridgeLib/SBSAPciHostBridgeLib.inf
create mode 100644 Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuLib.inf
create mode 100644 Silicon/Qemu/Drivers/SBSAQemuPlatformDxe/SBSAQemuPlatformDxe.c
create mode 100644 Silicon/Qemu/Library/SBSANorFlashQemuLib/SBSANorFlashQemuLib.c
create mode 100644 Silicon/Qemu/Library/SBSAPciHostBridgeLib/SBSAPciHostBridgeLib.c
create mode 100644 Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuLib.c
create mode 100644 Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuMem.c
create mode 100644 Silicon/Qemu/Library/SBSAQemuLib/SBSAQemuHelper.S
--
2.14.1
Main Change since v1:
1 Modify comments;
Code can also be found in github:
https://github.com/hisilicon/OpenPlatformPkg.git
branch: d06-acs-non-osi-v2
Ming Huang (4):
Hisilicon/D06: Add cpu on/off feature in TrustedFirmware
Hisilicon/D06: Fix SBSA test case 42 failed issues
Hisilicon/D06: Fix set usb reg failed issue
Hisilicon/D06: Fix SBSA PE-15 failed issue
Platform/Hisilicon/D06/Drivers/IoInitDxe/IoInitDxe.efi | Bin 229216 -> 232832 bytes
Platform/Hisilicon/D06/bl1.bin | Bin 12432 -> 12432 bytes
Platform/Hisilicon/D06/fip.bin | Bin 113578 -> 113450 bytes
3 files changed, 0 insertions(+), 0 deletions(-)
--
2.9.5
The major features of this patchset include:
1. Modify acpi table for ACS test;
2. Enable secure boot for SBBR-SCT;
3. Other change for ACS test;
For this SCT issue:
RT.SetVariable - Create one Time Base Auth Variable, the expect return status
should be EFI_SUCCESS – FAILURE
The resule of fail is effected by the edk2 commit(67943427).
If Modify Variable.c as below, this case will pass.
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -3188,7 +3188,7 @@ VariableServiceSetVariable (
// Maybe it's the delete operation of common authenticated variable at
// user physical presence.
//
if (DataSize != AUTHINFO_SIZE) {
- return EFI_UNSUPPORTED;
+ return EFI_SECURITY_VIOLATION;
I supect ACS SCT compatible with UEFI 2.7 spec. We will analyze this issue
continue.
Code can also be found in github:
https://github.com/hisilicon/OpenPlatformPkg.git
branch: d06-acs-platforms
Ming Huang (12):
Silicon/Hisilicon/D06: Add watchdog to GTDT
Silicon/Hisilicon/D06: Drop _CID for fwts issue
Silicon/Hisilicon/D06: Fix fwts issue in Dbg2
Silicon/Hisilicon/D06: Fix fwts issue in FADT
Hisilicon/D06: Move some functions to OemMiscLib
Silicon/Hisilicon: Modify for SBBR fwts SetTime_Func test case
Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe
Hisilicon/D06: Fix SBBR-SCT AuthVar issue
Silicon/Hisilicon/D06: Reserve ECAM resource in DSDT
Silicon/Hisilicon/D06: Modify GTDT timer flag
Hisilicon/D06: Modify Gic base
Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot
Silicon/Hisilicon/HisiPkg.dec | 1 +
Silicon/Hisilicon/Hisilicon.dsc.inc | 16 ++
Platform/Hisilicon/D03/D03.dsc | 5 +
Platform/Hisilicon/D05/D05.dsc | 5 +
Platform/Hisilicon/D06/D06.dsc | 9 +-
.../Drivers/FlashFvbDxe/FlashFvbDxe.inf | 2 +
.../M41T83RealTimeClockLib.inf | 3 +-
.../Hi1620/Hi1620AcpiTables/Hi1620Platform.h | 2 +-
.../Hisilicon/Include/Library/OemMiscLib.h | 9 +
.../M41T83RealTimeClock.h | 8 +-
.../D06/Library/OemMiscLibD06/OemMiscLibD06.c | 82 ++++++
.../Drivers/FlashFvbDxe/FlashFvbDxe.c | 14 +-
.../M41T83RealTimeClockLib.c | 263 ++++++++++++------
.../Hi1620/Hi1620AcpiTables/Dsdt/Com.asl | 1 -
.../Hi1620AcpiTables/Dsdt/Hi1620Mbig.asl | 48 ----
.../Hi1620AcpiTables/Dsdt/Hi1620Pci.asl | 36 ++-
.../Hi1620/Hi1620AcpiTables/Fadt.aslc | 2 +-
.../Hi1620/Hi1620AcpiTables/Gtdt.aslc | 35 +--
.../Hi1620/Hi1620AcpiTables/Hi1620Dbg2.aslc | 4 +-
.../Hi1620/Hi1620AcpiTables/Hi1620Iort.asl | 18 +-
.../Hi1620/Hi1620AcpiTables/Hi1620Srat.aslc | 194 ++++++-------
.../Hi1620/Hi1620AcpiTables/MadtHi1620.aslc | 2 +-
22 files changed, 475 insertions(+), 284 deletions(-)
--
2.18.0