I'm not sure about the exact issue you're seeing, but one thing that could be helpful for debugging is to increase the log verbosity level, by changing the log_level in build/BUILDCONFIG.gn to LOG_LEVEL_VERBOSE and rebuilding.
Can you also share the command you are using to make the ramdisk? Changing the order of files in it (e.g. putting the manifest file first) might work around the issue if it is caused by alignment.
On Mon, 8 Jun 2020 at 04:26, 王华 via Hafnium < hafnium@lists.trustedfirmware.org> wrote:
Hi, David : Thanks very much for your help. I check the firmware version as following command , It seems that it is the newest stable FW. But still failed. pi@raspberrypi:~$ vcgencmd bootloader_version Apr 16 2020 18:11:26 version a5e1b95f320810c69441557c5f5f0a7f2460dfb8 (release)
timestamp 1587057086
I share my config.txt in attchment and hafnium.elf in https://drive.google.com/file/d/12M-qqTQTF7BampvLOZLhMDZDNuQpoiEB/view?usp=s...
在 2020-06-07 22:05:15,"David Brazdil" dbrazdil@google.com 写道:
Hi Wanghua,
Happy to help, the RPi4 port should still be working. Though we do not continuously test it, so there is a possibility that the code has rotted a bit.
I can share my notes on how I got it working, but you seem to have figured out pretty much all of it.
You're seeing the hypervisor abort when accessing address 0x19536ee (FAR)
- that's inside the radisk as reported above the error. The value of ESR
suggests that this is an alignment error (the address is indeed unaligned). So Hafnium probably crashed trying to parse something in the ramdisk.
Before we try anything else, could you try to update your RPi4 firmware? I remember that I had issues with the 'initramfs' option in config.txt - it would load random data from the SD card. The error that you're seeing could be a result of that. Instructions on how to update your firmware: https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md
If that doesn't help, could you please attach your out/reference/rpi4_clang/hafnium.elf? It would be good to know which function is at the crashing PC 0x8b0dc.
David
On Sun, Jun 7, 2020 at 2:08 PM 王华 via Hafnium < hafnium@lists.trustedfirmware.org> wrote:
Hi all :
Has anyone brought up Hafnium on Raspberry Pi 4 board ? I tried but failed by the following steps:
1.Make the Hafnium RAM disk with aarch64 build Pi4 kernel , RAM disk for Linux , manifest.dtb.
The manifest.dtb buildt by :
/dts-v1/;
/ {
│ hypervisor {
│ │ compatible = "hafnium,hafnium";
│ │ vm1 {
│ │ │ debug_name = "Linux VM";
│ │ │ kernel_filename = "vmlinuz";
│ │ │ ramdisk_filename = "initrd.img";
│ │ };
│ };
};
2.Copy bl31.bin hafnium.bin initrd.img to fat32 boot direction and configure config.txt . Power up my unit and got the uart error log :
NOTICE: BL31: v2.3(debug):v2.3-109-g771c676b1 NOTICE: BL31: Built : 15:49:37, Jun 1 2020 INFO: Changed device tree to advertise PSCI. INFO: ARM GICv2 driver initialized INFO: BL31: Initializing runtime services INFO: BL31: cortex_a72: CPU workaround for 859971 was applied INFO: BL31: cortex_a72: CPU workaround for cve_2017_5715 was applied INFO: BL31: cortex_a72: CPU workaround for cve_2018_3639 was applied INFO: BL31: Preparing for EL3 exit to normal world INFO: Entry point address = 0x80000 INFO: SPSR = 0x3c9 NOTICE: Initialising hafnium
INFO: text: 0x80000 - 0x97000
INFO: rodata: 0x97000 - 0x9a000
INFO: data: 0x9a000 - 0x117000
INFO: Supported bits in physical address: 44
INFO: Stage 2 has 4 page table levels with 1 pages at the root.
INFO: Found PSCI version: 0x10001
INFO: Memory range: 0x0 - 0x3b3fffff
INFO: Memory range: 0x40000000 - 0xfbffffff
INFO: Ramdisk range: 0x1800000 - 0x353dbff
ERROR: Data abort: pc=0x8b0dc, esr=0x96000021, ec=0x25, far=0x19536ee
Panic: EL2 exception
Is there anyone can help me with this issue or share me the way to bring up Hafnium on pi4 ? Thanks very much !
By Wanghua
Best Regards!
-- Hafnium mailing list Hafnium@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/hafnium
-- Hafnium mailing list Hafnium@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/hafnium