Recently I changed my assignment at Linaro. From Cloud to Server Architecture. Which means less time spent on Kolla things, more on server related things. And at start I got some project I managed to forget about :D
SBSA reference platform in QEMU
In 2017 someone got an idea to make a new machine for QEMU. Pure hardware emulation of SBSA compliant reference platform. Without using of virtio components.
Hongbo Zhang wrote code and got it merged into QEMU, Radosław Biernacki wrote basic support for EDK2 (also merged upstream). Out of box it can boot to UEFI shell. Linux is not bootable due to lack of ACPI tables (DeviceTree is not an option here).
ACPI tables in firmware
Tanmay Jagdale works on adding ACPI tables in his fork of edk2-platforms. With this firmware Linux boots and can be used.
Testing tools
But what the point of just having reference platform if there is no testing? So I took a look and found two interesting tools:
- Server Base System Architecture — Architecture Compliance Suite (SBSA ACS) from ARM
- ACPI Table View EFI app (also from ARM) — part of EDK2 now
Server Base System Architecture — Architecture Compliance Suite
SBSA ACS tool requires ACPI tables to be present to work. And once started it nicely checks how compliant your system is:
FS0:\> Sbsa.efi -p SBSA Architecture Compliance Suite Version 2.4 Starting tests for level 4 (Print level is 3) Creating Platform Information Tables PE_INFO: Number of PE detected : 3 GIC_INFO: Number of GICD : 1 GIC_INFO: Number of ITS : 1 TIMER_INFO: Number of system timers : 0 WATCHDOG_INFO: Number of Watchdogs : 0 PCIE_INFO: Number of ECAM regions : 2 SMMU_INFO: Number of SMMU CTRL : 0 Peripheral: Num of USB controllers : 1 Peripheral: Num of SATA controllers : 1 Peripheral: Num of UART controllers : 1 *** Starting PE tests *** 1 : Check for number of PE : Result: PASS 2 : Check for SIMD extensions PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 3 : Check for 16-bit ASID support PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 4 : Check MMU Granule sizes PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 5 : Check Cache Architecture PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 6 : Check HW Coherence support PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 7 : Check Cryptographic extensions PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 8 : Check Little Endian support PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 9 : Check EL2 implementation PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 10 : Check AARCH64 implementation PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 11 : Check PMU Overflow signal : Result: PASS 12 : Check number of PMU counters PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 13 : Check Synchronous Watchpoints PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 14 : Check number of Breakpoints PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 15 : Check Arch symmetry across PE PSCI_CPU_ON: failure Reg compare failed for PE index=1 for Register: CCSIDR_EL1 Current PE value = 0x0 Other PE value = 0x100FBDB30E8 Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 16 : Check EL3 implementation PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 17 : Check CRC32 instruction support PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 1 for Level= 4 : Result: --FAIL-- 129 18 : Check for PMBIRQ signal SPE not supported on this PE : Result: -SKIPPED- 1 19 : Check for RAS extension PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 20 : Check for 16-Bit VMID PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 21 : Check for Virtual host extensions PSCI_CPU_ON: failure PSCI_CPU_ON: failure Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 22 : Stage 2 control of mem and cache PSCI_CPU_ON: failure PSCI_CPU_ON: failure : Result: -SKIPPED- 1 23 : Check for nested virtualization PSCI_CPU_ON: failure PSCI_CPU_ON: failure : Result: -SKIPPED- 1 24 : Support Page table map size change PSCI_CPU_ON: failure PSCI_CPU_ON: failure : Result: -SKIPPED- 1 25 : Check for pointer signing PSCI_CPU_ON: failure 25 : Check for pointer signing PSCI_CPU_ON: failure PSCI_CPU_ON: failure : Result: -SKIPPED- 1 26 : Check Activity monitors extension PSCI_CPU_ON: failure PSCI_CPU_ON: failure : Result: -SKIPPED- 1 27 : Check for SHA3 and SHA512 support PSCI_CPU_ON: failure PSCI_CPU_ON: failure : Result: -SKIPPED- 1 *** One or more PE tests have failed... *** *** Starting GIC tests *** 101 : Check GIC version : Result: PASS 102 : If PCIe, then GIC implements ITS : Result: PASS 103 : GIC number of Security states(2) : Result: PASS 104 : GIC Maintenance Interrupt Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 One or more GIC tests failed. Check Log *** Starting Timer tests *** 201 : Check Counter Frequency : Result: PASS 202 : Check EL0-Phy timer interrupt : Result: PASS 203 : Check EL0-Virtual timer interrupt : Result: PASS 204 : Check EL2-phy timer interrupt : Result: PASS 205 : Check EL2-Virtual timer interrupt v8.1 VHE not supported on this PE : Result: -SKIPPED- 1 206 : SYS Timer if PE Timer not ON PE Timers are not always-on. Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 207 : CNTCTLBase & CNTBaseN access No System timers are defined : Result: -SKIPPED- 1 *** Skipping remaining System timer tests *** *** One or more tests have Failed/Skipped.*** *** Starting Watchdog tests *** 301 : Check NS Watchdog Accessibility No Watchdogs reported 0 Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 302 : Check Watchdog WS0 interrupt No Watchdogs reported 0 Failed on PE - 0 for Level= 4 : Result: --FAIL-- 1 ***One or more tests have failed... *** *** Starting PCIe tests *** 401 : Check ECAM Presence : Result: PASS 402 : Check ECAM value in MCFG table : Result: PASS Unexpected exception occured FAR reported = 0xEBDAB180 ESR reported = 0x97800010 ------------------------------------------------------- Total Tests run = 42; Tests Passed = 11 Tests Failed = 22 --------------------------------------------------------- *** SBSA tests complete. Reset the system. ***
As you can see there is still a lot of work to do.
ACPI Tables View
This tool displays content of ACPI tables in hex/ascii format and then with information interpreted field by field.
What makes it more useful is “-r 2” argument as it enables checking tables against Server Base Boot Requirements (SBBR) v1.2 specification. On SBSA reference platform with Tanmay’s firmware it lists two errors:
ERROR: SBBR v1.2: Mandatory DBG2 table is missing ERROR: SBBR v1.2: Mandatory PPTT table is missing Table Statistics: 2 Error(s) 0 Warning(s)
So situation looks good as those can be easily added.
CI
So we have code to check and tools to do that. Add one to another and you have a clean need for CI job. So I wrote one for Linaro CI infrastructure: “LDCG SBSA firmware“. It builds top of QEMU and EDK2, then boot it and run above tools. Results are sent to mailing list.
ServerReady?
The Arm ServerReady compliance program provides a solution for servers that “just works”, allowing partners to deploy Arm servers with confidence. The program is based on industry standards and the Server Base System Architecture (SBSA) and Server Base Boot Requirement (SBBR) specifications, alongside Arm’s Server Architectural Compliance Suite (ACS). Arm ServerReady ensures that Arm-based servers work out-of-the-box, offering seamless interoperability with standard operating systems, hypervisors, and software.
In other words: if your hardware is SBSA compliant then you can go with SBBR compliance tests and then go and ask for certification sticker or sth like that.
But if your hardware is not SBSA compliant then EBBR is all you can get. Far from being ServerReady. Never mind what people tries to say — ServerReady requires SBBR which requires SBSA.
Future work
More tests to integrate. ARM Enterprise ACS is next on my list.