Bug 258467 - fails to boot on riscv: loader.efi Unhandled exception: Load access fault
Summary: fails to boot on riscv: loader.efi Unhandled exception: Load access fault
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: riscv (show other bugs)
Version: CURRENT
Hardware: riscv Any
: --- Affects Some People
Assignee: freebsd-riscv (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-13 01:22 UTC by Klaus Küchemann
Modified: 2021-09-13 14:41 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Küchemann 2021-09-13 01:22:51 UTC
U-Boot 2021.07 (Jul 26 2021 - 02:27:08 +0200)
....

root@:~ # uname -paKU
FreeBSD  14.0-CURRENT FreeBSD 14.0-CURRENT #5 main-n249326-b864b67a0d19: Mon Sep 13 00:22:12 UTC 2021     root@generic:/usr/obj/usr/src/riscv.riscv64/sys/GENERIC-NODEBUG  riscv riscv64 1400033 1400033
--
(cross-compiled on aarch64 into NFS-directory )
---------------------reset-loop with current loader.efi-----------------------------------
Consoles: EFI console  
    Reading loader env vars from /efi/freebsd/loader.env
FreeBSD/riscv EFI loader, Revision 1.1
(Tue Aug 17 02:06:19 UTC 2021 root@generic)

   Command line arguments: l
   Image base: 0xfe5dd000
   EFI version: 2.80
   EFI Firmware: Das U-Boot (rev 8225.1792)
   Console: comconsole (0)
   Load Path: /boot\loader.efi
   Load Device: /VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b)/MAC(70b3d592f1d5,1)
Setting currdev to net0:
ethernet@10090000: PHY present at 0
ethernet@10090000: Starting autonegotiation...
ethernet@10090000: Autonegotiation complete
ethernet@10090000: link up, 1000Mbps full-duplex (lpa: 0x3800)
net0: cannot set rx. filters (status=3)
Unhandled exception: Load access fault
EPC: 00000000fe62ce6a RA: 00000000fe62b8be TVAL: ffffffd200000000
EPC: 000000007e8b0e6a RA: 000000007e8af8be reloc adjusted
UEFI image [0x00000000fe5dd000:0x00000000fe7386bf] pc=0x4fe6a '/boot\loader.efi'

resetting ...     
----

when I overwrite loader.efi with a backup file of the previous loader.efi, the machine boots up again.
Comment 1 Mitchell Horne freebsd_committer 2021-09-13 13:57:30 UTC
What is the age of the previous loader.efi? I'd like to establish the time range so we might narrow down the list of suspect commits.
Comment 2 Klaus Küchemann 2021-09-13 14:15:54 UTC
(In reply to Mitchell Horne from comment #1)
Hi,
I did a few git pull/buildworld/buildkernel the last days and the breakage comes 
very close to  : https://reviews.freebsd.org/D30848  ( by guessing... seems to be a major change).
last "good" loader.efi approx. 3 day ago. So the new broken one is from a fresh build.
Comment 3 Leandro Lupori freebsd_committer 2021-09-13 14:41:15 UTC
I'm also experiencing boot failures, but on PowerPC64.

I can boot if I revert b4cb3fe0e39a/D30848.

Boot error messages:

>> FreeBSD/powerpc Open Firmware boot block
   Boot path:   /vdevice/v-scsi@71000002/disk@8100000000000000
   Boot loader: /boot/loader
   Boot volume:   /vdevice/v-scsi@71000002/disk@8100000000000000:2
Consoles: Open Firmware console  

FreeBSD/powerpc64 Open Firmware loader, Revision 0.1
(Mon Sep 13 10:45:57 -03 2021 luporl@p9c)
Memory: 16777216KB
Booted from: /vdevice/v-scsi@71000002/disk@8100000000000000

 

( 700 ) Program Exception [ 2c50f60 ]


    R0 .. R7           R8 .. R15         R16 .. R23         R24 .. R31
0000000002c38e88   0000000002c556f8   000000000003a407   0000000002c4f010   
0000000002c50f30   0000000000000000   00000000000433a9   0000000002c4f014   
0000000000000000   0000000000000000   000000000003a612   0000000003450000   
0000000002c50f40   0000000002c55680   0000000000040000   0000000000000000   
0000000002c55640   0000000000000380   0000000000000001   0000000002c55640   
0000000002c50f60   0000000000000000   0000000000000003   0000000000000000   
0000000000000000   000000000003a3fb   0000000000040000   0000000002c556c0   
0000000000000010   0000000000000008   0000000000000000   000000000003a62d   

    CR / XER           LR / CTR          SRR0 / SRR1        DAR / DSISR
        84000c00   0000000002c033ac   0000000000000000   0000000000000000   
0000000000000000   0000000000000000   0000000000083000           00000000   


2 >