All of lore.kernel.org
 help / color / mirror / Atom feed
* Failure to boot G4: dt_headr_start=0x01501000
@ 2019-05-22 12:15 Mathieu Malaterre
  2019-05-22 12:20 ` Christophe Leroy
  0 siblings, 1 reply; 14+ messages in thread
From: Mathieu Malaterre @ 2019-05-22 12:15 UTC (permalink / raw)
  To: linuxppc-dev

Hi all,

I have not boot my G4 in a while, today using master here is what I see:

done
Setting btext !
W=640 H=488 LB=768 addr=0x9c008000
copying OF device tree...
starting device tree allocs at 01401000
otloc_up(00100000, 0013d948)
  trying: 0x01401000
  trying: 0x01501000
 -› 01501000
  alloc_bottom : 01601000
  alloc_top    : 20000000
  alloc_top_hi : 20000000
  nmo_top      : 20000000
  ram_top      : 20000000
Building dt strings...
Building dt structure...
reserved memory map:
  00d40000 - 006c1000
Device tree strings 0x01502000 -> 0x00000007
Device tree struct 0x01503000 -> 0x00000007
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x001400000
->dt_headr_start=0x01501000

Any suggestions before I start a bisect ?

Thanks

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-22 12:15 Failure to boot G4: dt_headr_start=0x01501000 Mathieu Malaterre
@ 2019-05-22 12:20 ` Christophe Leroy
  2019-05-23  6:24   ` Mathieu Malaterre
  0 siblings, 1 reply; 14+ messages in thread
From: Christophe Leroy @ 2019-05-22 12:20 UTC (permalink / raw)
  To: Mathieu Malaterre, linuxppc-dev



Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
> Hi all,
> 
> I have not boot my G4 in a while, today using master here is what I see:
> 
> done
> Setting btext !
> W=640 H=488 LB=768 addr=0x9c008000
> copying OF device tree...
> starting device tree allocs at 01401000
> otloc_up(00100000, 0013d948)
>    trying: 0x01401000
>    trying: 0x01501000
>   -› 01501000
>    alloc_bottom : 01601000
>    alloc_top    : 20000000
>    alloc_top_hi : 20000000
>    nmo_top      : 20000000
>    ram_top      : 20000000
> Building dt strings...
> Building dt structure...
> reserved memory map:
>    00d40000 - 006c1000
> Device tree strings 0x01502000 -> 0x00000007
> Device tree struct 0x01503000 -> 0x00000007
> Quiescing Open Firmware ...
> Booting Linux via __start() @ 0x001400000
> ->dt_headr_start=0x01501000
> 
> Any suggestions before I start a bisect ?
> 

Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?

Christophe

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-22 12:20 ` Christophe Leroy
@ 2019-05-23  6:24   ` Mathieu Malaterre
  2019-05-23  6:39     ` Christophe Leroy
  0 siblings, 1 reply; 14+ messages in thread
From: Mathieu Malaterre @ 2019-05-23  6:24 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev

Salut Christophe,

On Wed, May 22, 2019 at 2:20 PM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
>
>
>
> Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
> > Hi all,
> >
> > I have not boot my G4 in a while, today using master here is what I see:
> >
> > done
> > Setting btext !
> > W=640 H=488 LB=768 addr=0x9c008000
> > copying OF device tree...
> > starting device tree allocs at 01401000
> > otloc_up(00100000, 0013d948)
> >    trying: 0x01401000
> >    trying: 0x01501000
> >   -› 01501000
> >    alloc_bottom : 01601000
> >    alloc_top    : 20000000
> >    alloc_top_hi : 20000000
> >    nmo_top      : 20000000
> >    ram_top      : 20000000
> > Building dt strings...
> > Building dt structure...
> > reserved memory map:
> >    00d40000 - 006c1000
> > Device tree strings 0x01502000 -> 0x00000007
> > Device tree struct 0x01503000 -> 0x00000007
> > Quiescing Open Firmware ...
> > Booting Linux via __start() @ 0x001400000
> > ->dt_headr_start=0x01501000
> >
> > Any suggestions before I start a bisect ?
> >
>
> Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?

Using locally:

diff --git a/arch/powerpc/configs/g4_defconfig
b/arch/powerpc/configs/g4_defconfig
index 14d0376f637d..916bce8ce9c3 100644
--- a/arch/powerpc/configs/g4_defconfig
+++ b/arch/powerpc/configs/g4_defconfig
@@ -32,6 +32,8 @@ CONFIG_USERFAULTFD=y
 # CONFIG_COMPAT_BRK is not set
 CONFIG_PROFILING=y
 CONFIG_G4_CPU=y
+# CONFIG_PPC_KUEP is not set
+# CONFIG_PPC_KUAP is not set
 CONFIG_PANIC_TIMEOUT=0
 # CONFIG_PPC_CHRP is not set
 CONFIG_CPU_FREQ=y


Leads to almost the same error (some values have changed):

done
Setting btext !
W=640 H=488 LB=768 addr=0x9c008000
copying OF device tree...
starting device tree allocs at 01300000
alloc_up(00100000, 0013d948)
  trying: 0x01300000
  trying: 0x01400000
 -› 01400000
  alloc_bottom : 01500000
  alloc_top    : 20000000
  alloc_top_hi : 20000000
  nmo_top      : 20000000
  ram_top      : 20000000
Building dt strings...
Building dt structure...
reserved memory map:
  00c40000 - 006c0000
Device tree strings 0x01401000 -> 0x00000007
Device tree struct 0x01402000 -> 0x00000007
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x001400000
->dt_headr_start=0x01400000

Thanks anyway,

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  6:24   ` Mathieu Malaterre
@ 2019-05-23  6:39     ` Christophe Leroy
  2019-05-23  8:29       ` Mathieu Malaterre
  0 siblings, 1 reply; 14+ messages in thread
From: Christophe Leroy @ 2019-05-23  6:39 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: linuxppc-dev

Salut Mathieu,

Le 23/05/2019 à 08:24, Mathieu Malaterre a écrit :
> Salut Christophe,
> 
> On Wed, May 22, 2019 at 2:20 PM Christophe Leroy
> <christophe.leroy@c-s.fr> wrote:
>>
>>
>>
>> Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
>>> Hi all,
>>>
>>> I have not boot my G4 in a while, today using master here is what I see:
>>>
>>> done
>>> Setting btext !
>>> W=640 H=488 LB=768 addr=0x9c008000
>>> copying OF device tree...
>>> starting device tree allocs at 01401000
>>> otloc_up(00100000, 0013d948)
>>>     trying: 0x01401000
>>>     trying: 0x01501000
>>>    -› 01501000
>>>     alloc_bottom : 01601000
>>>     alloc_top    : 20000000
>>>     alloc_top_hi : 20000000
>>>     nmo_top      : 20000000
>>>     ram_top      : 20000000
>>> Building dt strings...
>>> Building dt structure...
>>> reserved memory map:
>>>     00d40000 - 006c1000
>>> Device tree strings 0x01502000 -> 0x00000007
>>> Device tree struct 0x01503000 -> 0x00000007
>>> Quiescing Open Firmware ...
>>> Booting Linux via __start() @ 0x001400000
>>> ->dt_headr_start=0x01501000
>>>
>>> Any suggestions before I start a bisect ?
>>>
>>
>> Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?
> 
> Using locally:
> 
> diff --git a/arch/powerpc/configs/g4_defconfig
> b/arch/powerpc/configs/g4_defconfig
> index 14d0376f637d..916bce8ce9c3 100644
> --- a/arch/powerpc/configs/g4_defconfig
> +++ b/arch/powerpc/configs/g4_defconfig
> @@ -32,6 +32,8 @@ CONFIG_USERFAULTFD=y
>   # CONFIG_COMPAT_BRK is not set
>   CONFIG_PROFILING=y
>   CONFIG_G4_CPU=y
> +# CONFIG_PPC_KUEP is not set
> +# CONFIG_PPC_KUAP is not set
>   CONFIG_PANIC_TIMEOUT=0
>   # CONFIG_PPC_CHRP is not set
>   CONFIG_CPU_FREQ=y
> 
> 
> Leads to almost the same error (some values have changed):

Ok.

When you say you are using 'master', what do you mean ? Can you give the 
commit Id ?

Does it boots with Kernel 5.1.4 ?

Did you try latest powerpc/merge branch ?

Can you send your full .config ?

Christophe

> 
> done
> Setting btext !
> W=640 H=488 LB=768 addr=0x9c008000
> copying OF device tree...
> starting device tree allocs at 01300000
> alloc_up(00100000, 0013d948)
>    trying: 0x01300000
>    trying: 0x01400000
>   -› 01400000
>    alloc_bottom : 01500000
>    alloc_top    : 20000000
>    alloc_top_hi : 20000000
>    nmo_top      : 20000000
>    ram_top      : 20000000
> Building dt strings...
> Building dt structure...
> reserved memory map:
>    00c40000 - 006c0000
> Device tree strings 0x01401000 -> 0x00000007
> Device tree struct 0x01402000 -> 0x00000007
> Quiescing Open Firmware ...
> Booting Linux via __start() @ 0x001400000
> ->dt_headr_start=0x01400000
> 
> Thanks anyway,
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  6:39     ` Christophe Leroy
@ 2019-05-23  8:29       ` Mathieu Malaterre
  2019-05-23  8:46         ` Mathieu Malaterre
  2019-05-23  8:53         ` Mathieu Malaterre
  0 siblings, 2 replies; 14+ messages in thread
From: Mathieu Malaterre @ 2019-05-23  8:29 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 3464 bytes --]

On Thu, May 23, 2019 at 8:39 AM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
>
> Salut Mathieu,
>
> Le 23/05/2019 à 08:24, Mathieu Malaterre a écrit :
> > Salut Christophe,
> >
> > On Wed, May 22, 2019 at 2:20 PM Christophe Leroy
> > <christophe.leroy@c-s.fr> wrote:
> >>
> >>
> >>
> >> Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
> >>> Hi all,
> >>>
> >>> I have not boot my G4 in a while, today using master here is what I see:
> >>>
> >>> done
> >>> Setting btext !
> >>> W=640 H=488 LB=768 addr=0x9c008000
> >>> copying OF device tree...
> >>> starting device tree allocs at 01401000
> >>> otloc_up(00100000, 0013d948)
> >>>     trying: 0x01401000
> >>>     trying: 0x01501000
> >>>    -› 01501000
> >>>     alloc_bottom : 01601000
> >>>     alloc_top    : 20000000
> >>>     alloc_top_hi : 20000000
> >>>     nmo_top      : 20000000
> >>>     ram_top      : 20000000
> >>> Building dt strings...
> >>> Building dt structure...
> >>> reserved memory map:
> >>>     00d40000 - 006c1000
> >>> Device tree strings 0x01502000 -> 0x00000007
> >>> Device tree struct 0x01503000 -> 0x00000007
> >>> Quiescing Open Firmware ...
> >>> Booting Linux via __start() @ 0x001400000
> >>> ->dt_headr_start=0x01501000
> >>>
> >>> Any suggestions before I start a bisect ?
> >>>
> >>
> >> Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?
> >
> > Using locally:
> >
> > diff --git a/arch/powerpc/configs/g4_defconfig
> > b/arch/powerpc/configs/g4_defconfig
> > index 14d0376f637d..916bce8ce9c3 100644
> > --- a/arch/powerpc/configs/g4_defconfig
> > +++ b/arch/powerpc/configs/g4_defconfig
> > @@ -32,6 +32,8 @@ CONFIG_USERFAULTFD=y
> >   # CONFIG_COMPAT_BRK is not set
> >   CONFIG_PROFILING=y
> >   CONFIG_G4_CPU=y
> > +# CONFIG_PPC_KUEP is not set
> > +# CONFIG_PPC_KUAP is not set
> >   CONFIG_PANIC_TIMEOUT=0
> >   # CONFIG_PPC_CHRP is not set
> >   CONFIG_CPU_FREQ=y
> >
> >
> > Leads to almost the same error (some values have changed):
>
> Ok.
>
> When you say you are using 'master', what do you mean ? Can you give the
> commit Id ?
>
> Does it boots with Kernel 5.1.4 ?

I was able to boot v5.1:

$ dmesg | head
[    0.000000] printk: bootconsole [udbg0] enabled
[    0.000000] Total memory = 512MB; using 1024kB for hash table (at (ptrval))
[    0.000000] Linux version 5.1.0+ (malat@debian.org) (gcc version
8.3.0 (Debian 8.3.0-7)) #8 Thu May 23 06:26:38 UTC 2019

Commit id is:

e93c9c99a629 (tag: v5.1) Linux 5.1

> Did you try latest powerpc/merge branch ?

Will try that next.

> Can you send your full .config ?

Config is attached.

Thanks,

> Christophe
>
> >
> > done
> > Setting btext !
> > W=640 H=488 LB=768 addr=0x9c008000
> > copying OF device tree...
> > starting device tree allocs at 01300000
> > alloc_up(00100000, 0013d948)
> >    trying: 0x01300000
> >    trying: 0x01400000
> >   -› 01400000
> >    alloc_bottom : 01500000
> >    alloc_top    : 20000000
> >    alloc_top_hi : 20000000
> >    nmo_top      : 20000000
> >    ram_top      : 20000000
> > Building dt strings...
> > Building dt structure...
> > reserved memory map:
> >    00c40000 - 006c0000
> > Device tree strings 0x01401000 -> 0x00000007
> > Device tree struct 0x01402000 -> 0x00000007
> > Quiescing Open Firmware ...
> > Booting Linux via __start() @ 0x001400000
> > ->dt_headr_start=0x01400000
> >
> > Thanks anyway,
> >

[-- Attachment #2: g4_defconfig --]
[-- Type: application/octet-stream, Size: 5122 bytes --]

# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_NO_HZ_IDLE=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_LOG_BUF_SHIFT=18
CONFIG_MEMCG=y
CONFIG_MEMCG_SWAP=y
# CONFIG_MEMCG_SWAP_ENABLED is not set
CONFIG_BLK_CGROUP=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_NAMESPACES=y
CONFIG_USER_NS=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_BLK_DEV_INITRD=y
# CONFIG_RD_BZIP2 is not set
# CONFIG_RD_LZMA is not set
# CONFIG_RD_XZ is not set
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is not set
CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y
CONFIG_EXPERT=y
CONFIG_BPF_SYSCALL=y
CONFIG_USERFAULTFD=y
# CONFIG_COMPAT_BRK is not set
CONFIG_PROFILING=y
CONFIG_G4_CPU=y
# CONFIG_PPC_KUEP is not set
# CONFIG_PPC_KUAP is not set
CONFIG_PANIC_TIMEOUT=0
# CONFIG_PPC_CHRP is not set
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_PMAC=y
CONFIG_TAU=y
CONFIG_HIGHMEM=y
CONFIG_KEXEC=y
CONFIG_HIBERNATION=y
CONFIG_PM_DEBUG=y
CONFIG_PM_ADVANCED_DEBUG=y
CONFIG_OPROFILE=m
CONFIG_KPROBES=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_PARTITION_ADVANCED=y
# CONFIG_MQ_IOSCHED_KYBER is not set
CONFIG_BINFMT_MISC=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_INET_DIAG is not set
# CONFIG_IPV6 is not set
CONFIG_NETFILTER=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_NET_SCHED=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_CGROUP_NET_CLASSID=y
CONFIG_CFG80211=m
CONFIG_MAC80211=m
CONFIG_PCI_MSI=y
CONFIG_DEVTMPFS=y
CONFIG_DEBUG_DRIVER=y
CONFIG_CONNECTOR=y
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=m
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_ATA=y
CONFIG_PATA_MACIO=y
CONFIG_MD=y
CONFIG_FIREWIRE=m
CONFIG_FIREWIRE_OHCI=m
CONFIG_ADB=y
CONFIG_ADB_PMU=y
CONFIG_ADB_PMU_LED=y
CONFIG_INPUT_ADBHID=y
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_ARC is not set
# CONFIG_NET_VENDOR_SEEQ is not set
CONFIG_SUNGEM=m
# CONFIG_USB_NET_DRIVERS is not set
CONFIG_B43=m
CONFIG_B43_DEBUG=y
# CONFIG_RTL_CARDS is not set
# CONFIG_WLAN_VENDOR_TI is not set
CONFIG_WAN=y
CONFIG_ISDN=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_EVDEV=m
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_MOUSE_PS2 is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=m
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_PMACZILOG=y
CONFIG_SERIAL_PMACZILOG_CONSOLE=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C_CHARDEV=m
CONFIG_SPI=y
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
CONFIG_WATCHDOG_SYSFS=y
CONFIG_AGP=y
CONFIG_AGP_UNINORTH=y
CONFIG_DRM=m
CONFIG_DRM_DEBUG_SELFTEST=m
CONFIG_DRM_LOAD_EDID_FIRMWARE=y
CONFIG_DRM_RADEON=m
CONFIG_FB=y
CONFIG_FIRMWARE_EDID=y
CONFIG_FB_OF=y
CONFIG_FB_RADEON=m
CONFIG_FB_RADEON_DEBUG=y
# CONFIG_LCD_CLASS_DEVICE is not set
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
CONFIG_SOUND=m
CONFIG_SND=m
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_DEBUG=y
CONFIG_SND_HDA_PREALLOC_SIZE=2048
CONFIG_SND_POWERMAC=m
CONFIG_SND_AOA=m
CONFIG_SND_AOA_FABRIC_LAYOUT=m
CONFIG_SND_AOA_TOONIE=m
CONFIG_HIDRAW=y
CONFIG_HID_APPLE=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
CONFIG_USB=m
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_OHCI_HCD=m
CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
CONFIG_USB_STORAGE=m
CONFIG_MMC=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DEBUG=y
CONFIG_RTC_DRV_GENERIC=y
CONFIG_DMADEVICES=y
CONFIG_PM_DEVFREQ=y
CONFIG_MEMORY=y
CONFIG_GENERIC_PHY=y
CONFIG_EXT4_FS=m
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXPORTFS_BLOCK_OPS=y
CONFIG_FANOTIFY=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_PROC_KCORE=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_NLS_DEFAULT="utf8"
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y
# CONFIG_CRYPTO_ECHAINIV is not set
CONFIG_CRYPTO_MD5_PPC=m
CONFIG_CRYPTO_SHA1_PPC=m
CONFIG_CRC32_SELFTEST=y
CONFIG_RANDOM32_SELFTEST=y
CONFIG_IRQ_POLL=y
CONFIG_STRING_SELFTEST=y
CONFIG_PRINTK_TIME=y
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DEBUG_INFO=y
CONFIG_STRIP_ASM_SYMS=y
CONFIG_HEADERS_CHECK=y
CONFIG_OPTIMIZE_INLINING=y
CONFIG_DEBUG_SECTION_MISMATCH=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x01b6
CONFIG_PAGE_EXTENSION=y
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=4000
CONFIG_DEBUG_KMEMLEAK_TEST=m
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_KASAN=y
CONFIG_SOFTLOCKUP_DETECTOR=y
CONFIG_SCHEDSTATS=y
CONFIG_SCHED_STACK_END_CHECK=y
CONFIG_FTRACE_SYSCALLS=y
CONFIG_TRACER_SNAPSHOT=y
CONFIG_STACK_TRACER=y
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_ATOMIC64_SELFTEST=y
CONFIG_BUG_ON_DATA_CORRUPTION=y
CONFIG_UBSAN=y
CONFIG_TEST_UBSAN=m
CONFIG_IO_STRICT_DEVMEM=y
CONFIG_XMON=y
CONFIG_BOOTX_TEXT=y
CONFIG_PPC_EARLY_DEBUG=y

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  8:29       ` Mathieu Malaterre
@ 2019-05-23  8:46         ` Mathieu Malaterre
  2019-05-23  8:53         ` Mathieu Malaterre
  1 sibling, 0 replies; 14+ messages in thread
From: Mathieu Malaterre @ 2019-05-23  8:46 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev

On Thu, May 23, 2019 at 10:29 AM Mathieu Malaterre <malat@debian.org> wrote:
>
> On Thu, May 23, 2019 at 8:39 AM Christophe Leroy
> <christophe.leroy@c-s.fr> wrote:
> >
> > Salut Mathieu,
> >
> > Le 23/05/2019 à 08:24, Mathieu Malaterre a écrit :
> > > Salut Christophe,
> > >
> > > On Wed, May 22, 2019 at 2:20 PM Christophe Leroy
> > > <christophe.leroy@c-s.fr> wrote:
> > >>
> > >>
> > >>
> > >> Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
> > >>> Hi all,
> > >>>
> > >>> I have not boot my G4 in a while, today using master here is what I see:
> > >>>
> > >>> done
> > >>> Setting btext !
> > >>> W=640 H=488 LB=768 addr=0x9c008000
> > >>> copying OF device tree...
> > >>> starting device tree allocs at 01401000
> > >>> otloc_up(00100000, 0013d948)
> > >>>     trying: 0x01401000
> > >>>     trying: 0x01501000
> > >>>    -› 01501000
> > >>>     alloc_bottom : 01601000
> > >>>     alloc_top    : 20000000
> > >>>     alloc_top_hi : 20000000
> > >>>     nmo_top      : 20000000
> > >>>     ram_top      : 20000000
> > >>> Building dt strings...
> > >>> Building dt structure...
> > >>> reserved memory map:
> > >>>     00d40000 - 006c1000
> > >>> Device tree strings 0x01502000 -> 0x00000007
> > >>> Device tree struct 0x01503000 -> 0x00000007
> > >>> Quiescing Open Firmware ...
> > >>> Booting Linux via __start() @ 0x001400000
> > >>> ->dt_headr_start=0x01501000
> > >>>
> > >>> Any suggestions before I start a bisect ?
> > >>>
> > >>
> > >> Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?
> > >
> > > Using locally:
> > >
> > > diff --git a/arch/powerpc/configs/g4_defconfig
> > > b/arch/powerpc/configs/g4_defconfig
> > > index 14d0376f637d..916bce8ce9c3 100644
> > > --- a/arch/powerpc/configs/g4_defconfig
> > > +++ b/arch/powerpc/configs/g4_defconfig
> > > @@ -32,6 +32,8 @@ CONFIG_USERFAULTFD=y
> > >   # CONFIG_COMPAT_BRK is not set
> > >   CONFIG_PROFILING=y
> > >   CONFIG_G4_CPU=y
> > > +# CONFIG_PPC_KUEP is not set
> > > +# CONFIG_PPC_KUAP is not set
> > >   CONFIG_PANIC_TIMEOUT=0
> > >   # CONFIG_PPC_CHRP is not set
> > >   CONFIG_CPU_FREQ=y
> > >
> > >
> > > Leads to almost the same error (some values have changed):
> >
> > Ok.
> >
> > When you say you are using 'master', what do you mean ? Can you give the
> > commit Id ?

Sorry about that. The problematic commit for me is:

54dee406374c Merge tag 'arm64-fixes' of
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux


> >
> > Does it boots with Kernel 5.1.4 ?
>
> I was able to boot v5.1:
>
> $ dmesg | head
> [    0.000000] printk: bootconsole [udbg0] enabled
> [    0.000000] Total memory = 512MB; using 1024kB for hash table (at (ptrval))
> [    0.000000] Linux version 5.1.0+ (malat@debian.org) (gcc version
> 8.3.0 (Debian 8.3.0-7)) #8 Thu May 23 06:26:38 UTC 2019
>
> Commit id is:
>
> e93c9c99a629 (tag: v5.1) Linux 5.1
>
> > Did you try latest powerpc/merge branch ?
>
> Will try that next.
>
> > Can you send your full .config ?
>
> Config is attached.
>
> Thanks,
>
> > Christophe
> >
> > >
> > > done
> > > Setting btext !
> > > W=640 H=488 LB=768 addr=0x9c008000
> > > copying OF device tree...
> > > starting device tree allocs at 01300000
> > > alloc_up(00100000, 0013d948)
> > >    trying: 0x01300000
> > >    trying: 0x01400000
> > >   -› 01400000
> > >    alloc_bottom : 01500000
> > >    alloc_top    : 20000000
> > >    alloc_top_hi : 20000000
> > >    nmo_top      : 20000000
> > >    ram_top      : 20000000
> > > Building dt strings...
> > > Building dt structure...
> > > reserved memory map:
> > >    00c40000 - 006c0000
> > > Device tree strings 0x01401000 -> 0x00000007
> > > Device tree struct 0x01402000 -> 0x00000007
> > > Quiescing Open Firmware ...
> > > Booting Linux via __start() @ 0x001400000
> > > ->dt_headr_start=0x01400000
> > >
> > > Thanks anyway,
> > >

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  8:29       ` Mathieu Malaterre
  2019-05-23  8:46         ` Mathieu Malaterre
@ 2019-05-23  8:53         ` Mathieu Malaterre
  2019-05-23  9:45           ` Christophe Leroy
  1 sibling, 1 reply; 14+ messages in thread
From: Mathieu Malaterre @ 2019-05-23  8:53 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev

On Thu, May 23, 2019 at 10:29 AM Mathieu Malaterre <malat@debian.org> wrote:
>
> On Thu, May 23, 2019 at 8:39 AM Christophe Leroy
> <christophe.leroy@c-s.fr> wrote:
> >
> > Salut Mathieu,
> >
> > Le 23/05/2019 à 08:24, Mathieu Malaterre a écrit :
> > > Salut Christophe,
> > >
> > > On Wed, May 22, 2019 at 2:20 PM Christophe Leroy
> > > <christophe.leroy@c-s.fr> wrote:
> > >>
> > >>
> > >>
> > >> Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
> > >>> Hi all,
> > >>>
> > >>> I have not boot my G4 in a while, today using master here is what I see:
> > >>>
> > >>> done
> > >>> Setting btext !
> > >>> W=640 H=488 LB=768 addr=0x9c008000
> > >>> copying OF device tree...
> > >>> starting device tree allocs at 01401000
> > >>> otloc_up(00100000, 0013d948)
> > >>>     trying: 0x01401000
> > >>>     trying: 0x01501000
> > >>>    -› 01501000
> > >>>     alloc_bottom : 01601000
> > >>>     alloc_top    : 20000000
> > >>>     alloc_top_hi : 20000000
> > >>>     nmo_top      : 20000000
> > >>>     ram_top      : 20000000
> > >>> Building dt strings...
> > >>> Building dt structure...
> > >>> reserved memory map:
> > >>>     00d40000 - 006c1000
> > >>> Device tree strings 0x01502000 -> 0x00000007
> > >>> Device tree struct 0x01503000 -> 0x00000007
> > >>> Quiescing Open Firmware ...
> > >>> Booting Linux via __start() @ 0x001400000
> > >>> ->dt_headr_start=0x01501000
> > >>>
> > >>> Any suggestions before I start a bisect ?
> > >>>
> > >>
> > >> Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?
> > >
> > > Using locally:
> > >
> > > diff --git a/arch/powerpc/configs/g4_defconfig
> > > b/arch/powerpc/configs/g4_defconfig
> > > index 14d0376f637d..916bce8ce9c3 100644
> > > --- a/arch/powerpc/configs/g4_defconfig
> > > +++ b/arch/powerpc/configs/g4_defconfig
> > > @@ -32,6 +32,8 @@ CONFIG_USERFAULTFD=y
> > >   # CONFIG_COMPAT_BRK is not set
> > >   CONFIG_PROFILING=y
> > >   CONFIG_G4_CPU=y
> > > +# CONFIG_PPC_KUEP is not set
> > > +# CONFIG_PPC_KUAP is not set
> > >   CONFIG_PANIC_TIMEOUT=0
> > >   # CONFIG_PPC_CHRP is not set
> > >   CONFIG_CPU_FREQ=y
> > >
> > >
> > > Leads to almost the same error (some values have changed):
> >
> > Ok.
> >
> > When you say you are using 'master', what do you mean ? Can you give the
> > commit Id ?
> >
> > Does it boots with Kernel 5.1.4 ?
>
> I was able to boot v5.1:
>
> $ dmesg | head
> [    0.000000] printk: bootconsole [udbg0] enabled
> [    0.000000] Total memory = 512MB; using 1024kB for hash table (at (ptrval))
> [    0.000000] Linux version 5.1.0+ (malat@debian.org) (gcc version
> 8.3.0 (Debian 8.3.0-7)) #8 Thu May 23 06:26:38 UTC 2019
>
> Commit id is:
>
> e93c9c99a629 (tag: v5.1) Linux 5.1
>
> > Did you try latest powerpc/merge branch ?
>
> Will try that next.

I confirm powerpc/merge does not boot for me (same config). Commit id:

a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
'next' and 'fixes' into merge


> > Can you send your full .config ?
>
> Config is attached.
>
> Thanks,
>
> > Christophe
> >
> > >
> > > done
> > > Setting btext !
> > > W=640 H=488 LB=768 addr=0x9c008000
> > > copying OF device tree...
> > > starting device tree allocs at 01300000
> > > alloc_up(00100000, 0013d948)
> > >    trying: 0x01300000
> > >    trying: 0x01400000
> > >   -› 01400000
> > >    alloc_bottom : 01500000
> > >    alloc_top    : 20000000
> > >    alloc_top_hi : 20000000
> > >    nmo_top      : 20000000
> > >    ram_top      : 20000000
> > > Building dt strings...
> > > Building dt structure...
> > > reserved memory map:
> > >    00c40000 - 006c0000
> > > Device tree strings 0x01401000 -> 0x00000007
> > > Device tree struct 0x01402000 -> 0x00000007
> > > Quiescing Open Firmware ...
> > > Booting Linux via __start() @ 0x001400000
> > > ->dt_headr_start=0x01400000
> > >
> > > Thanks anyway,
> > >

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  8:53         ` Mathieu Malaterre
@ 2019-05-23  9:45           ` Christophe Leroy
  2019-05-23  9:59             ` Christophe Leroy
  2019-05-23 10:16             ` Mathieu Malaterre
  0 siblings, 2 replies; 14+ messages in thread
From: Christophe Leroy @ 2019-05-23  9:45 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: linuxppc-dev



Le 23/05/2019 à 10:53, Mathieu Malaterre a écrit :
> On Thu, May 23, 2019 at 10:29 AM Mathieu Malaterre <malat@debian.org> wrote:
>>
>> On Thu, May 23, 2019 at 8:39 AM Christophe Leroy
>> <christophe.leroy@c-s.fr> wrote:
>>>
>>> Salut Mathieu,
>>>
>>> Le 23/05/2019 à 08:24, Mathieu Malaterre a écrit :
>>>> Salut Christophe,
>>>>
>>>> On Wed, May 22, 2019 at 2:20 PM Christophe Leroy
>>>> <christophe.leroy@c-s.fr> wrote:
>>>>>
>>>>>
>>>>>
>>>>> Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
>>>>>> Hi all,
>>>>>>
>>>>>> I have not boot my G4 in a while, today using master here is what I see:
>>>>>>
>>>>>> done
>>>>>> Setting btext !
>>>>>> W=640 H=488 LB=768 addr=0x9c008000
>>>>>> copying OF device tree...
>>>>>> starting device tree allocs at 01401000
>>>>>> otloc_up(00100000, 0013d948)
>>>>>>      trying: 0x01401000
>>>>>>      trying: 0x01501000
>>>>>>     -› 01501000
>>>>>>      alloc_bottom : 01601000
>>>>>>      alloc_top    : 20000000
>>>>>>      alloc_top_hi : 20000000
>>>>>>      nmo_top      : 20000000
>>>>>>      ram_top      : 20000000
>>>>>> Building dt strings...
>>>>>> Building dt structure...
>>>>>> reserved memory map:
>>>>>>      00d40000 - 006c1000
>>>>>> Device tree strings 0x01502000 -> 0x00000007
>>>>>> Device tree struct 0x01503000 -> 0x00000007
>>>>>> Quiescing Open Firmware ...
>>>>>> Booting Linux via __start() @ 0x001400000
>>>>>> ->dt_headr_start=0x01501000
>>>>>>
>>>>>> Any suggestions before I start a bisect ?
>>>>>>
>>>>>
>>>>> Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?
>>>>
>>>> Using locally:
>>>>
>>>> diff --git a/arch/powerpc/configs/g4_defconfig
>>>> b/arch/powerpc/configs/g4_defconfig
>>>> index 14d0376f637d..916bce8ce9c3 100644
>>>> --- a/arch/powerpc/configs/g4_defconfig
>>>> +++ b/arch/powerpc/configs/g4_defconfig
>>>> @@ -32,6 +32,8 @@ CONFIG_USERFAULTFD=y
>>>>    # CONFIG_COMPAT_BRK is not set
>>>>    CONFIG_PROFILING=y
>>>>    CONFIG_G4_CPU=y
>>>> +# CONFIG_PPC_KUEP is not set
>>>> +# CONFIG_PPC_KUAP is not set
>>>>    CONFIG_PANIC_TIMEOUT=0
>>>>    # CONFIG_PPC_CHRP is not set
>>>>    CONFIG_CPU_FREQ=y
>>>>
>>>>
>>>> Leads to almost the same error (some values have changed):
>>>
>>> Ok.
>>>
>>> When you say you are using 'master', what do you mean ? Can you give the
>>> commit Id ?
>>>
>>> Does it boots with Kernel 5.1.4 ?
>>
>> I was able to boot v5.1:
>>
>> $ dmesg | head
>> [    0.000000] printk: bootconsole [udbg0] enabled
>> [    0.000000] Total memory = 512MB; using 1024kB for hash table (at (ptrval))
>> [    0.000000] Linux version 5.1.0+ (malat@debian.org) (gcc version
>> 8.3.0 (Debian 8.3.0-7)) #8 Thu May 23 06:26:38 UTC 2019
>>
>> Commit id is:
>>
>> e93c9c99a629 (tag: v5.1) Linux 5.1
>>
>>> Did you try latest powerpc/merge branch ?
>>
>> Will try that next.
> 
> I confirm powerpc/merge does not boot for me (same config). Commit id:
> 
> a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
> 'next' and 'fixes' into merge

I see in the config you sent me that you have selected CONFIG_KASAN, 
which is a big new stuff.

Can you try without it ?

Christophe

> 
> 
>>> Can you send your full .config ?
>>
>> Config is attached.
>>
>> Thanks,
>>
>>> Christophe
>>>
>>>>
>>>> done
>>>> Setting btext !
>>>> W=640 H=488 LB=768 addr=0x9c008000
>>>> copying OF device tree...
>>>> starting device tree allocs at 01300000
>>>> alloc_up(00100000, 0013d948)
>>>>     trying: 0x01300000
>>>>     trying: 0x01400000
>>>>    -› 01400000
>>>>     alloc_bottom : 01500000
>>>>     alloc_top    : 20000000
>>>>     alloc_top_hi : 20000000
>>>>     nmo_top      : 20000000
>>>>     ram_top      : 20000000
>>>> Building dt strings...
>>>> Building dt structure...
>>>> reserved memory map:
>>>>     00c40000 - 006c0000
>>>> Device tree strings 0x01401000 -> 0x00000007
>>>> Device tree struct 0x01402000 -> 0x00000007
>>>> Quiescing Open Firmware ...
>>>> Booting Linux via __start() @ 0x001400000
>>>> ->dt_headr_start=0x01400000
>>>>
>>>> Thanks anyway,
>>>>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  9:45           ` Christophe Leroy
@ 2019-05-23  9:59             ` Christophe Leroy
  2019-05-23 10:05               ` Christophe Leroy
  2019-05-23 10:16             ` Mathieu Malaterre
  1 sibling, 1 reply; 14+ messages in thread
From: Christophe Leroy @ 2019-05-23  9:59 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: linuxppc-dev



On 05/23/2019 09:45 AM, Christophe Leroy wrote:
> 
> 
> Le 23/05/2019 à 10:53, Mathieu Malaterre a écrit :
>>> Commit id is:
>>>
>>> e93c9c99a629 (tag: v5.1) Linux 5.1
>>>
>>>> Did you try latest powerpc/merge branch ?
>>>
>>> Will try that next.
>>
>> I confirm powerpc/merge does not boot for me (same config). Commit id:
>>
>> a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
>> 'next' and 'fixes' into merge
> 
> I see in the config you sent me that you have selected CONFIG_KASAN, 
> which is a big new stuff.
> 
> Can you try without it ?

While building with your config, I get a huge amount of:

ppc-linux-ld: warning: orphan section `.data..LASANLOC10' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC10'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC11' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC11'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC12' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC12'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC13' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC13'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC14' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC14'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC15' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC15'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC16' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC16'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC1' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC1'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC2' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC2'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC3' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC3'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC4' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC4'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC5' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC5'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC6' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC6'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC7' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC7'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC8' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC8'.
ppc-linux-ld: warning: orphan section `.data..LASANLOC9' from 
`lib/vsprintf.o' being placed in section `.data..LASANLOC9'.
ppc-linux-ld: warning: orphan section `.data..LASAN0' from 
`lib/xarray.o' being placed in section `.data..LASAN0'.
   SORTEX  vmlinux



I see you have also selected CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y

I guess nobody have never tried both this and CONFIG_KASAN together on 
ppc32. I'll give it a try.

Christophe

> 
> Christophe
> 
>>
>>
>>>> Can you send your full .config ?
>>>
>>> Config is attached.
>>>
>>> Thanks,
>>>
>>>> Christophe
>>>>
>>>>>
>>>>> done
>>>>> Setting btext !
>>>>> W=640 H=488 LB=768 addr=0x9c008000
>>>>> copying OF device tree...
>>>>> starting device tree allocs at 01300000
>>>>> alloc_up(00100000, 0013d948)
>>>>>     trying: 0x01300000
>>>>>     trying: 0x01400000
>>>>>    -› 01400000
>>>>>     alloc_bottom : 01500000
>>>>>     alloc_top    : 20000000
>>>>>     alloc_top_hi : 20000000
>>>>>     nmo_top      : 20000000
>>>>>     ram_top      : 20000000
>>>>> Building dt strings...
>>>>> Building dt structure...
>>>>> reserved memory map:
>>>>>     00c40000 - 006c0000
>>>>> Device tree strings 0x01401000 -> 0x00000007
>>>>> Device tree struct 0x01402000 -> 0x00000007
>>>>> Quiescing Open Firmware ...
>>>>> Booting Linux via __start() @ 0x001400000
>>>>> ->dt_headr_start=0x01400000
>>>>>
>>>>> Thanks anyway,
>>>>>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  9:59             ` Christophe Leroy
@ 2019-05-23 10:05               ` Christophe Leroy
  2019-05-23 10:18                 ` Christophe Leroy
  0 siblings, 1 reply; 14+ messages in thread
From: Christophe Leroy @ 2019-05-23 10:05 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: linuxppc-dev, Daniel Axtens



On 05/23/2019 09:59 AM, Christophe Leroy wrote:
> 
> 
> On 05/23/2019 09:45 AM, Christophe Leroy wrote:
>>
>>
>> Le 23/05/2019 à 10:53, Mathieu Malaterre a écrit :
>>>> Commit id is:
>>>>
>>>> e93c9c99a629 (tag: v5.1) Linux 5.1
>>>>
>>>>> Did you try latest powerpc/merge branch ?
>>>>
>>>> Will try that next.
>>>
>>> I confirm powerpc/merge does not boot for me (same config). Commit id:
>>>
>>> a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
>>> 'next' and 'fixes' into merge
>>
>> I see in the config you sent me that you have selected CONFIG_KASAN, 
>> which is a big new stuff.
>>
>> Can you try without it ?
> 
> While building with your config, I get a huge amount of:
> 
> ppc-linux-ld: warning: orphan section `.data..LASAN0' from 
> `lib/xarray.o' being placed in section `.data..LASAN0'.
>    SORTEX  vmlinux
> 
> 
> 
> I see you have also selected CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y
> 
> I guess nobody have never tried both this and CONFIG_KASAN together on 
> ppc32. I'll give it a try.


And you also have CONFIG_FTRACE.

In a recent patch implementing KASAN on PPC64, Daniel says that KASAN 
and FTRACE don't go together well 
(https://patchwork.ozlabs.org/patch/1103826/)

If you find out that it works without KASAN, can you then try with KASAN 
but without FTRACE ?

Christophe


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23  9:45           ` Christophe Leroy
  2019-05-23  9:59             ` Christophe Leroy
@ 2019-05-23 10:16             ` Mathieu Malaterre
  2019-05-23 18:08               ` Christophe Leroy
  1 sibling, 1 reply; 14+ messages in thread
From: Mathieu Malaterre @ 2019-05-23 10:16 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev

On Thu, May 23, 2019 at 11:45 AM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
>
>
>
> Le 23/05/2019 à 10:53, Mathieu Malaterre a écrit :
> > On Thu, May 23, 2019 at 10:29 AM Mathieu Malaterre <malat@debian.org> wrote:
> >>
> >> On Thu, May 23, 2019 at 8:39 AM Christophe Leroy
> >> <christophe.leroy@c-s.fr> wrote:
> >>>
> >>> Salut Mathieu,
> >>>
> >>> Le 23/05/2019 à 08:24, Mathieu Malaterre a écrit :
> >>>> Salut Christophe,
> >>>>
> >>>> On Wed, May 22, 2019 at 2:20 PM Christophe Leroy
> >>>> <christophe.leroy@c-s.fr> wrote:
> >>>>>
> >>>>>
> >>>>>
> >>>>> Le 22/05/2019 à 14:15, Mathieu Malaterre a écrit :
> >>>>>> Hi all,
> >>>>>>
> >>>>>> I have not boot my G4 in a while, today using master here is what I see:
> >>>>>>
> >>>>>> done
> >>>>>> Setting btext !
> >>>>>> W=640 H=488 LB=768 addr=0x9c008000
> >>>>>> copying OF device tree...
> >>>>>> starting device tree allocs at 01401000
> >>>>>> otloc_up(00100000, 0013d948)
> >>>>>>      trying: 0x01401000
> >>>>>>      trying: 0x01501000
> >>>>>>     -› 01501000
> >>>>>>      alloc_bottom : 01601000
> >>>>>>      alloc_top    : 20000000
> >>>>>>      alloc_top_hi : 20000000
> >>>>>>      nmo_top      : 20000000
> >>>>>>      ram_top      : 20000000
> >>>>>> Building dt strings...
> >>>>>> Building dt structure...
> >>>>>> reserved memory map:
> >>>>>>      00d40000 - 006c1000
> >>>>>> Device tree strings 0x01502000 -> 0x00000007
> >>>>>> Device tree struct 0x01503000 -> 0x00000007
> >>>>>> Quiescing Open Firmware ...
> >>>>>> Booting Linux via __start() @ 0x001400000
> >>>>>> ->dt_headr_start=0x01501000
> >>>>>>
> >>>>>> Any suggestions before I start a bisect ?
> >>>>>>
> >>>>>
> >>>>> Have you tried without CONFIG_PPC_KUEP and CONFIG_PPC_KUAP ?
> >>>>
> >>>> Using locally:
> >>>>
> >>>> diff --git a/arch/powerpc/configs/g4_defconfig
> >>>> b/arch/powerpc/configs/g4_defconfig
> >>>> index 14d0376f637d..916bce8ce9c3 100644
> >>>> --- a/arch/powerpc/configs/g4_defconfig
> >>>> +++ b/arch/powerpc/configs/g4_defconfig
> >>>> @@ -32,6 +32,8 @@ CONFIG_USERFAULTFD=y
> >>>>    # CONFIG_COMPAT_BRK is not set
> >>>>    CONFIG_PROFILING=y
> >>>>    CONFIG_G4_CPU=y
> >>>> +# CONFIG_PPC_KUEP is not set
> >>>> +# CONFIG_PPC_KUAP is not set
> >>>>    CONFIG_PANIC_TIMEOUT=0
> >>>>    # CONFIG_PPC_CHRP is not set
> >>>>    CONFIG_CPU_FREQ=y
> >>>>
> >>>>
> >>>> Leads to almost the same error (some values have changed):
> >>>
> >>> Ok.
> >>>
> >>> When you say you are using 'master', what do you mean ? Can you give the
> >>> commit Id ?
> >>>
> >>> Does it boots with Kernel 5.1.4 ?
> >>
> >> I was able to boot v5.1:
> >>
> >> $ dmesg | head
> >> [    0.000000] printk: bootconsole [udbg0] enabled
> >> [    0.000000] Total memory = 512MB; using 1024kB for hash table (at (ptrval))
> >> [    0.000000] Linux version 5.1.0+ (malat@debian.org) (gcc version
> >> 8.3.0 (Debian 8.3.0-7)) #8 Thu May 23 06:26:38 UTC 2019
> >>
> >> Commit id is:
> >>
> >> e93c9c99a629 (tag: v5.1) Linux 5.1
> >>
> >>> Did you try latest powerpc/merge branch ?
> >>
> >> Will try that next.
> >
> > I confirm powerpc/merge does not boot for me (same config). Commit id:
> >
> > a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
> > 'next' and 'fixes' into merge
>
> I see in the config you sent me that you have selected CONFIG_KASAN,
> which is a big new stuff.
>
> Can you try without it ?

With same config but CONFIG_KASAN=n (on top of a27eaa62326d), I can
reproduce the boot failure (no change).

Time for bisect ?

> Christophe
>
> >
> >
> >>> Can you send your full .config ?
> >>
> >> Config is attached.
> >>
> >> Thanks,
> >>
> >>> Christophe
> >>>
> >>>>
> >>>> done
> >>>> Setting btext !
> >>>> W=640 H=488 LB=768 addr=0x9c008000
> >>>> copying OF device tree...
> >>>> starting device tree allocs at 01300000
> >>>> alloc_up(00100000, 0013d948)
> >>>>     trying: 0x01300000
> >>>>     trying: 0x01400000
> >>>>    -› 01400000
> >>>>     alloc_bottom : 01500000
> >>>>     alloc_top    : 20000000
> >>>>     alloc_top_hi : 20000000
> >>>>     nmo_top      : 20000000
> >>>>     ram_top      : 20000000
> >>>> Building dt strings...
> >>>> Building dt structure...
> >>>> reserved memory map:
> >>>>     00c40000 - 006c0000
> >>>> Device tree strings 0x01401000 -> 0x00000007
> >>>> Device tree struct 0x01402000 -> 0x00000007
> >>>> Quiescing Open Firmware ...
> >>>> Booting Linux via __start() @ 0x001400000
> >>>> ->dt_headr_start=0x01400000
> >>>>
> >>>> Thanks anyway,
> >>>>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23 10:05               ` Christophe Leroy
@ 2019-05-23 10:18                 ` Christophe Leroy
  0 siblings, 0 replies; 14+ messages in thread
From: Christophe Leroy @ 2019-05-23 10:18 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: linuxppc-dev, Daniel Axtens



On 05/23/2019 10:05 AM, Christophe Leroy wrote:
> 
> 
> On 05/23/2019 09:59 AM, Christophe Leroy wrote:
>>
>>
>> On 05/23/2019 09:45 AM, Christophe Leroy wrote:
>>>
>>>
>>> Le 23/05/2019 à 10:53, Mathieu Malaterre a écrit :
>>>>> Commit id is:
>>>>>
>>>>> e93c9c99a629 (tag: v5.1) Linux 5.1
>>>>>
>>>>>> Did you try latest powerpc/merge branch ?
>>>>>
>>>>> Will try that next.
>>>>
>>>> I confirm powerpc/merge does not boot for me (same config). Commit id:
>>>>
>>>> a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
>>>> 'next' and 'fixes' into merge
>>>
>>> I see in the config you sent me that you have selected CONFIG_KASAN, 
>>> which is a big new stuff.
>>>
>>> Can you try without it ?
>>
>> While building with your config, I get a huge amount of:
>>
>> ppc-linux-ld: warning: orphan section `.data..LASAN0' from 
>> `lib/xarray.o' being placed in section `.data..LASAN0'.
>>    SORTEX  vmlinux
>>
>>
>>
>> I see you have also selected CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y
>>
>> I guess nobody have never tried both this and CONFIG_KASAN together on 
>> ppc32. I'll give it a try.
> 
> 
> And you also have CONFIG_FTRACE.
> 
> In a recent patch implementing KASAN on PPC64, Daniel says that KASAN 
> and FTRACE don't go together well 
> (https://patchwork.ozlabs.org/patch/1103826/)
> 
> If you find out that it works without KASAN, can you then try with KASAN 
> but without FTRACE ?
> 

I tried your config in Qemu, looks I'm getting a recursive Oops:

#50 0xc0066af0 in do_exit (code=0xb) at kernel/exit.c:787
#51 0xc0013984 in oops_end (flags=<optimized out>, regs=<optimized out>, 
signr=0xb) at arch/powerpc/kernel/traps.c:253
#52 0xc001c30c in handle_page_fault () at arch/powerpc/kernel/entry_32.S:637
#53 0x20302e30 in ?? ()
#54 0xc001cb60 in btext_drawchar (c=0x0) at arch/powerpc/kernel/btext.c:522
#55 0xc00167cc in udbg_write (s=0xc113ae22 <text+2> "   0.000000] CPU: 0 
PID: 0 Comm: swapper Not tainted 5.1.0+ #1647\n0\n", n=0x37) at 
arch/powerpc/kernel/udbg.c:114
#56 0xc00d43f0 in call_console_drivers (ext_text=<optimized out>, 
text=<optimized out>, len=<optimized out>, ext_len=<optimized out>) at 
kernel/printk/printk.c:1780
#57 console_unlock () at kernel/printk/printk.c:2462
#58 0xc00d6630 in console_flush_on_panic () at kernel/printk/printk.c:2552
#59 0xc00618a0 in panic (fmt=0xc10f459f <buf+31> "!") at kernel/panic.c:280
#60 0xc0066af0 in do_exit (code=0xb) at kernel/exit.c:787
#61 0xc0013984 in oops_end (flags=<optimized out>, regs=<optimized out>, 
signr=0xb) at arch/powerpc/kernel/traps.c:253
#62 0xc001c30c in handle_page_fault () at arch/powerpc/kernel/entry_32.S:637
#63 0x20302e30 in ?? ()
#64 0xc001cb60 in btext_drawchar (c=0x0) at arch/powerpc/kernel/btext.c:522
#65 0xc00167cc in udbg_write (s=0xc113ae22 <text+2> "   0.000000] CPU: 0 
PID: 0 Comm: swapper Not tainted 5.1.0+ #1647\n0\n", n=0x45) at 
arch/powerpc/kernel/udbg.c:114
#66 0xc00d43f0 in call_console_drivers (ext_text=<optimized out>, 
text=<optimized out>, len=<optimized out>, ext_len=<optimized out>) at 
kernel/printk/printk.c:1780
#67 console_unlock () at kernel/printk/printk.c:2462
#68 0xc00d6630 in console_flush_on_panic () at kernel/printk/printk.c:2552
#69 0xc00618a0 in panic (fmt=0xc10f459f <buf+31> "!") at kernel/panic.c:280
#70 0xc0066af0 in do_exit (code=0xb) at kernel/exit.c:787
#71 0xc0013984 in oops_end (flags=<optimized out>, regs=<optimized out>, 
signr=0xb) at arch/powerpc/kernel/traps.c:253
#72 0xc001c30c in handle_page_fault () at arch/powerpc/kernel/entry_32.S:637
#73 0x20302e30 in ?? ()
#74 0xc001cb60 in btext_drawchar (c=0x0) at arch/powerpc/kernel/btext.c:522
#75 0xc00167cc in udbg_write (s=0xc113ae22 <text+2> "   0.000000] CPU: 0 
PID: 0 Comm: swapper Not tainted 5.1.0+ #1647\n0\n", n=0x32) at 
arch/powerpc/kernel/udbg.c:114
#76 0xc00d43f0 in call_console_drivers (ext_text=<optimized out>, 
text=<optimized out>, len=<optimized out>, ext_len=<optimized out>) at 
kernel/printk/printk.c:1780
#77 console_unlock () at kernel/printk/printk.c:2462
#78 0xc00d68d8 in vprintk_emit (facility=<optimized out>, 
level=<optimized out>, dict=0x0, dictlen=0x0, fmt=0xc085e4c0 
"\001\066printk: %sconsole [%s%d] enabled\n",
     args=0xc10cff30) at kernel/printk/printk.c:1985
#79 0xc00d69d8 in vprintk_default (fmt=<optimized out>, args=<optimized 
out>) at kernel/printk/printk.c:2012
#80 0xc00d7a40 in vprintk_func (fmt=<optimized out>, args=<optimized 
out>) at kernel/printk/printk_safe.c:398
#81 0xc00d2638 in printk (fmt=<optimized out>) at 
kernel/printk/printk.c:2045
#82 0xc00d4ef8 in register_console (newcon=0xc0cb9a20 <udbg_console>) at 
kernel/printk/printk.c:2777
#83 0xc0b79ed0 in machine_init (dt_ptr=<optimized out>) at 
arch/powerpc/kernel/setup_32.c:83
#84 0xc000347c in start_here () at arch/powerpc/kernel/head_32.S:901

Christophe

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23 10:16             ` Mathieu Malaterre
@ 2019-05-23 18:08               ` Christophe Leroy
  2019-05-24  7:34                 ` Mathieu Malaterre
  0 siblings, 1 reply; 14+ messages in thread
From: Christophe Leroy @ 2019-05-23 18:08 UTC (permalink / raw)
  To: Mathieu Malaterre; +Cc: linuxppc-dev



On 05/23/2019 10:16 AM, Mathieu Malaterre wrote:
> On Thu, May 23, 2019 at 11:45 AM Christophe Leroy
> <christophe.leroy@c-s.fr> wrote:
>>
>>
>>
>> Le 23/05/2019 à 10:53, Mathieu Malaterre a écrit :
>>>
>>> I confirm powerpc/merge does not boot for me (same config). Commit id:
>>>
>>> a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
>>> 'next' and 'fixes' into merge
>>
>> I see in the config you sent me that you have selected CONFIG_KASAN,
>> which is a big new stuff.
>>
>> Can you try without it ?
> 
> With same config but CONFIG_KASAN=n (on top of a27eaa62326d), I can
> reproduce the boot failure (no change).
> 
> Time for bisect ?
> 

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 ?

diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index 755fab9641d6..fba16970c028 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -162,7 +162,6 @@ __after_mmu_off:
  	bl	flush_tlbs

  	bl	initial_bats
-	bl	load_segment_registers
  #ifdef CONFIG_KASAN
  	bl	early_hash_table
  #endif
@@ -920,6 +919,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE)
  	RFI
  /* Load up the kernel context */
  2:	bl	load_up_mmu
+	bl	load_segment_registers

  #ifdef CONFIG_BDI_SWITCH
  	/* Add helper information for the Abatron bdiGDB debugger.

Christophe

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: Failure to boot G4: dt_headr_start=0x01501000
  2019-05-23 18:08               ` Christophe Leroy
@ 2019-05-24  7:34                 ` Mathieu Malaterre
  0 siblings, 0 replies; 14+ messages in thread
From: Mathieu Malaterre @ 2019-05-24  7:34 UTC (permalink / raw)
  To: Christophe Leroy; +Cc: linuxppc-dev

On Thu, May 23, 2019 at 8:12 PM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
>
>
>
> On 05/23/2019 10:16 AM, Mathieu Malaterre wrote:
> > On Thu, May 23, 2019 at 11:45 AM Christophe Leroy
> > <christophe.leroy@c-s.fr> wrote:
> >>
> >>
> >>
> >> Le 23/05/2019 à 10:53, Mathieu Malaterre a écrit :
> >>>
> >>> I confirm powerpc/merge does not boot for me (same config). Commit id:
> >>>
> >>> a27eaa62326d (powerpc/merge) Automatic merge of branches 'master',
> >>> 'next' and 'fixes' into merge
> >>
> >> I see in the config you sent me that you have selected CONFIG_KASAN,
> >> which is a big new stuff.
> >>
> >> Can you try without it ?
> >
> > With same config but CONFIG_KASAN=n (on top of a27eaa62326d), I can
> > reproduce the boot failure (no change).
> >
> > Time for bisect ?
> >
>
> 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 ?
>
> diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
> index 755fab9641d6..fba16970c028 100644
> --- a/arch/powerpc/kernel/head_32.S
> +++ b/arch/powerpc/kernel/head_32.S
> @@ -162,7 +162,6 @@ __after_mmu_off:
>         bl      flush_tlbs
>
>         bl      initial_bats
> -       bl      load_segment_registers
>   #ifdef CONFIG_KASAN
>         bl      early_hash_table
>   #endif
> @@ -920,6 +919,7 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE)
>         RFI
>   /* Load up the kernel context */
>   2:    bl      load_up_mmu
> +       bl      load_segment_registers
>
>   #ifdef CONFIG_BDI_SWITCH
>         /* Add helper information for the Abatron bdiGDB debugger.

With above patch I can boot powerpc/merge just fine. Thanks Christophe !

$ dmesg | head
[    0.000000] printk: bootconsole [udbg0] enabled
[    0.000000] Total memory = 512MB; using 1024kB for hash table
[    0.000000] Linux version 5.1.0+ (malat@debian.org) (gcc version
8.3.0 (Debian 8.3.0-7)) #12 Thu May 23 11:56:33 UTC 2019


> Christophe

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-05-24  7:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22 12:15 Failure to boot G4: dt_headr_start=0x01501000 Mathieu Malaterre
2019-05-22 12:20 ` Christophe Leroy
2019-05-23  6:24   ` Mathieu Malaterre
2019-05-23  6:39     ` Christophe Leroy
2019-05-23  8:29       ` Mathieu Malaterre
2019-05-23  8:46         ` Mathieu Malaterre
2019-05-23  8:53         ` Mathieu Malaterre
2019-05-23  9:45           ` Christophe Leroy
2019-05-23  9:59             ` Christophe Leroy
2019-05-23 10:05               ` Christophe Leroy
2019-05-23 10:18                 ` Christophe Leroy
2019-05-23 10:16             ` Mathieu Malaterre
2019-05-23 18:08               ` Christophe Leroy
2019-05-24  7:34                 ` Mathieu Malaterre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.