Bug 203699 - Kernel 5.2-rc1 fails to boot on a Mac Mini G4: dt_headr_start=0x01501000
Summary: Kernel 5.2-rc1 fails to boot on a Mac Mini G4: dt_headr_start=0x01501000
Status: CLOSED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: PPC-32 (show other bugs)
Hardware: PPC-32 Linux
: P1 blocking
Assignee: platform_ppc-32
URL: https://lists.ozlabs.org/pipermail/li...
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-24 07:10 UTC by Mathieu Malaterre
Modified: 2022-06-14 03:20 UTC (History)
2 users (show)

See Also:
Kernel Version: Kernel 5.2
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Fix symptoms (1.97 KB, patch)
2019-05-24 07:36 UTC, Mathieu Malaterre
Details | Diff

Description Mathieu Malaterre 2019-05-24 07:10:50 UTC
From: Christophe Leroy <>

I found the issue. In order to be able to support KASAN, the setup of 
segments have moved earlier in the boot. Your problem is a side effect 
of this change.
Function setup_disp_bat() is supposed to setup BAT3 for btext data.
But setup_disp_bat() rely on someone setting in disp_BAT the values to 
be loaded into BATs. This is done by btext_prepare_BAT() which is called 
by bootx_init().
The problem is that bootx_init() is never called, so setup_disp_bat() 
does nothing and the access to btext data is possible because the 
bootloader has set an entry for it in the hash table.

But by setting up the segment earlier, we break the bootloader hash 
table, which shouldn't be an issue if the BATs had been set properly as 
expected.

The problematic commit is 215b823707ce ("powerpc/32s: set up an early 
static hash table for KASAN)"

Here is a dirty fix that works for me when CONFIG_KASAN is NOT set.
Of course, the real fix has to be to setup the BATs properly, but I 
won't have time to look at that before June. Maybe you can ?
Comment 1 Mathieu Malaterre 2019-05-24 07:36:24 UTC
Created attachment 282929 [details]
Fix symptoms
Comment 2 Michael Ellerman 2020-11-27 12:09:58 UTC
Did this get fixed along the way?
Comment 3 Michael Ellerman 2022-06-14 03:20:26 UTC
v5.19-rc2 is booting on my mac mini with KASAN enabled, so I'm going to close this as fixed.

Note You need to log in before you can comment on or make changes to this bug.