Mailinglist Archive: opensuse-bugs (6499 mails)

< Previous Next >
[Bug 1122614] armv7 efistub enablement missing in GRUB2
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Mon, 22 Jul 2019 03:31:01 +0000
  • Message-id: <bug-1122614-21960-V6VGrzreD9@http.bugzilla.suse.com/>
http://bugzilla.suse.com/show_bug.cgi?id=1122614
http://bugzilla.suse.com/show_bug.cgi?id=1122614#c40

--- Comment #40 from Chester Lin <clin@xxxxxxxx> ---
(In reply to Guillaume GARDET from comment #39)
There is no /sys/firmware/efi/ as, IIUC, it would require grub2.04 to be
installed and when I install it, it still has grub2.02. And grub2.04 fails
to boot properly on RPi2 atm, as reported in #c5.
If I remove the EFI test condition, it is working fine. \o/

So, it leaves the broken boot of kernel, even with patched kernel for #c28

@jlee, did you or Chester made some progress and/or have something to test
on RPi2?


Hi Guillaume,

Yes, I do have some findings of the broken boot as follows:

1. Confirmed that the U-Boot's exit_boot_services still works [ver:
uboot-2019-04]. Anyway, I found that this issue occurred in the early stage of
kernel booting.

2. The first page [0~0xfff] has been reserved by rpi2 firmware thus EFI memmap
always marks it as EFI_RESERVED_TYPE. Besides, this line could cause an
unexpected crash too:

arm32-stub.c:
dram_base = round_up(dram_base, SZ_128M);

When applying the patch of #c28, the raw value of dram_base is changed to
0x1000, which is the first available memblock marked as
EFI_CONVENTIONAL_MEMORY.
Then the dram_base rounds up to 0x8000000, so the region from 0x0 to 0x7ffffff
is totally ignored by early_init_dt_add_memory_arch() and has not been added
into the memblock list.

---
[ 0.000000] OF: fdt: Ignoring memory block 0x0 - 0x1000
[ 0.000000] OF: fdt: Ignoring memory block 0x1000 - 0x7cf6000
[ 0.000000] OF: fdt: Ignoring memory block 0x7cf6000 - 0x7ef6000
[ 0.000000] OF: fdt: Ignoring memory block 0x7ef6000 - 0x7f0a000
[ 0.000000] OF: fdt: Ignoring memory range 0x7f0a000 - 0x8000000
[ 0.000000] memblock_add: [0x0000000008000000-0x0000000007ffffff]
early_init_dt_add_memory_arch+0x174/0x17c
[ 0.000000] memblock_add: [0x0000000008000000-0x0000000009ffffff]
early_init_dt_add_memory_arch+0x174/0x17c
[ 0.000000] memblock_add: [0x000000000a000000-0x000000000a78ffff]
early_init_dt_add_memory_arch+0x174/0x17c
[ 0.000000] memblock_add: [0x000000000a790000-0x000000001f24ffff]
early_init_dt_add_memory_arch+0x174/0x17c
---

However the fdt is still allocated in [0x7cf6000 - 0x7ef6000] by EFI stub,
which could cause an unexpected error as below, and I think that's because the
first 128MB [0 - 0x8000000] has been ignored so there's no page entries for
translating the virtual addresses of FDT.

---
[ 0.000000] Unable to handle kernel paging request at virtual address
bfcf6000
[ 0.000000] pgd = (ptrval)
[ 0.000000] [bfcf6000] *pgd=80000008306003, *pmd=00000000
[ 0.000000] Internal error: Oops: 206 [#1] SMP ARM
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.2.0-10.g80522d2-lpae
#1 openSUSE Tumbleweed (unreleased)
[ 0.000000] Hardware name: BCM2835
[ 0.000000] PC is at fdt_check_header+0xc/0x13c
[ 0.000000] LR is at __unflatten_device_tree+0x50/0x27c
[ 0.000000] pc : [<c0e38f30>] lr : [<c0c6b750>] psr: a00000d3
[ 0.000000] sp : c1801ec0 ip : c1801ed0 fp : c1801ecc
[ 0.000000] r10: c1805d80 r9 : 00000000 r8 : c1ded98c
[ 0.000000] r7 : 00000000 r6 : bfcf6000 r5 : c167e2a4 r4 : c167e2a4
[ 0.000000] r3 : c167e2a4 r2 : c1ded98c r1 : 00000000 r0 : bfcf6000
[ 0.000000] Flags: NzCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment
user
[ 0.000000] Control: 30c5387d Table: 08303000 DAC: fffffffd
..........
..........
[ 0.000000] Backtrace:
[ 0.000000] [<c0e38f24>] (fdt_check_header) from [<c0c6b750>]
(__unflatten_device_tree+0x50/0x27c)
[ 0.000000] [<c0c6b700>] (__unflatten_device_tree) from [<c167f53c>]
(unflatten_device_tree+0x44/0x54)
[ 0.000000] r10:c1805d80 r9:410fc075 r8:07cf6000 r7:c1801fc0 r6:c19299c0
r5:c16a2a40
[ 0.000000] r4:c167e2a4
[ 0.000000] [<c167f4f8>] (unflatten_device_tree) from [<c16056cc>]
(setup_arch+0x190/0x658)
[ 0.000000] r4:c16915e8
[ 0.000000] [<c160553c>] (setup_arch) from [<c1600c68>]
(start_kernel+0x78/0x520)
[ 0.000000] r10:c1805d80 r9:410fc075 r8:07cf6000 r7:c1929700 r6:ffffffff
r5:00000000
[ 0.000000] r4:00000000
[ 0.000000] [<c1600bf0>] (start_kernel) from [<00000000>] (0x0)
[ 0.000000] r10:30c5387d r9:410fc075 r8:07cf6000 r7:ffffffff r6:30c0387d
r5:00000000
[ 0.000000] r4:c1600330
[ 0.000000] Code: e89da800 e1a0c00d e92dd800 e24cb004 (e5902000)
[ 0.000000] random: get_random_bytes called from
print_oops_end_marker+0x34/0x5c with crng_init=0
[ 0.000000] ---[ end trace 0000000000000000 ]---
[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[ 0.000000] Rebooting in 90 seconds..
[ 0.000000] Reboot failed -- System halted

--
You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >