Re: [bug report] mmu not working anymore on mcf54415
Hi Mike, On Sun, Aug 19, 2018 at 06:42:36PM +0300, Mike Rapoport wrote: > On Sun, Aug 19, 2018 at 04:51:22PM +0200, angelo wrote: > > Hi Mike, > > > > On 19/08/2018 12:03, Mike Rapoport wrote: > > > On Sat, Aug 18, 2018 at 11:51:41PM +0200, Angelo Dureghello wrote: > > >> Hi, > > >> > > >> On Sat, Aug 18, 2018 at 11:45:51AM +0200, Angelo Dureghello wrote: > > >>> Hi all, > > >>> > > >>> i am testing kernel version 4.18.0 on mcf54415 with mmu > > >>> enabled, just noticed the boot stops silently at: > > >>> > > >>> [9.04] Freeing unused kernel memory: 336K > > >>> [9.04] This architecture does not have kernel memory protection. > > > Can you please send your kernel config and the entire boot log? > > > > > > > Thanks for looking into this. Files attached. > > > > As you can see from the config, my ramfs is embedded in the kernel. > > Actually not :) > > I've expected to see INITRAMFS_SOURCE there... > > > The kernel boot process seems to complete, but boot hangs at the moment the > > ramfs (in my case embedded in the kernel binary) should be loaded. > > Apparently, I've broken some early memory reservations. > > Can you test with this patch: > > > diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c > index 70dde04..dae0a41 100644 > --- a/arch/m68k/mm/mcfmmu.c > +++ b/arch/m68k/mm/mcfmmu.c > @@ -172,7 +172,7 @@ void __init cf_bootmem_alloc(void) > high_memory = (void *)_ramend; > > /* Reserve kernel text/data/bss */ > - memblock_reserve(memstart, memstart - _rambase); > + memblock_reserve(_rambase, memstart - _rambase); > > m68k_virt_to_node_shift = fls(_ramend - 1) - 6; > module_fixup(NULL, __start_fixup, __stop_fixup); > Many thanks, the patch fixes the things. In the mcf5441x family memory starts at 0x4000 and not at 0 as in some other mmu Coldfire models. This probably made the issue visible in my board. Tested-by: Angelo Dureghello Regards, Angelo > > I am trying to understand something more. > > > > Regards, > > Angelo > > >>> Just after generally there is the initramfs load and the console prompt, > > >>> while actually nothing happen. > > >>> > > >>> Trying to collect more informations, > > >>> > > >> The commit that breaks mmu on mcf54415 is > > >> > > >> commit 1008a11590b966b469e60dc3756c9226a685ce12 (HEAD) > > >> Author: Mike Rapoport > > >> Date: Wed Jul 4 09:28:16 2018 +0300 > > >> > > >> m68k: switch to MEMBLOCK + NO_BOOTMEM > > >> > > >> Regards, > > >> Angelo Dureghello > > >> > > >>> Regards, > > >>> Angelo Dureghello > > >>> > > > > > U-Boot 2018.07-rc2-00041-g7b920e5579-dirty (Aug 12 2018 - 23:06:24 +0200) > > > > CPU: Freescale MCF54415 (Mask:a0 Version:2) > >CPU CLK 240 MHz BUS CLK 120 MHz FLB CLK 60 MHz > >INP CLK 30 MHz VCO CLK 480 MHz > > SPI: ready > > DRAM: 128 MiB > > MMC: fsl_esdhc_init > > FSL_SDHC: 0 > > Loading Environment from SPI Flash... SF: Detected is25lp128 with page size > > 256 Bytes, erase size 64 KiB, total 16 MiB > > OK > > In:serial > > Out: serial > > Err: serial > > Hit any key to stop autoboot: 0 > > SF: Detected is25lp128 with page size 256 Bytes, erase size 64 KiB, total > > 16 MiB > > device 0 offset 0x10, size 0x1ff6d0 > > SF: 2094800 bytes @ 0x10 Read: OK > > ## Booting kernel from Legacy Image at 40001000 ... > >Image Name: mainline kernel > >Created: 2018-08-19 8:55:20 UTC > >Image Type: M68K Linux Kernel Image (uncompressed) > >Data Size:2094736 Bytes = 2 MiB > >Load Address: 40001000 > >Entry Point: 40001000 > >Verifying Checksum ... OK > >Loading Kernel Image ... OK > > [0.00] Linux version > > 4.18.0-rc6stmark2-001-00013-g1008a11590b9-dirty (angelo@jerusalem) (gcc > > version 5.2.0 (crosstools-sysam-2016.04.16)) #58 Sun Aug 19 10:55:19 CEST > > 2018 > > [0.00] Built 1 zonelists, mobility grouping on. Total pages: 16312 > > [0.00] Kernel command line: console=ttyS0,115200 root=/dev/ram0 rw > > rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1 > > [0.00] Dentry cache hash table entries: 16384 (order: 3, 65536 > > bytes) > > [0.00] Inode-cache hash table entries: 8192 (order: 2, 32768 bytes) > > [0.00] Sorting __ex_table... > > [0.00] Memory: 128016K/131072K available (1299K kernel code, 102K > > rwdata, 304K rodata, 328K init, 208K bss, 3056K reserved, 0K cma-reserved) > > [0.00] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=8 > > [0.00] NR_IRQS: 256 > > [0.00] clocksource: pit: mask: 0x max_cycles: 0x, > > max_idle_ns: 1019338904850 ns > > [0.00] Console: colour dummy device 80x25 > > [0.07] Calibrating delay loop... 238.38 BogoMIPS (lpj=1191936) > > [0.07] pid_max: default: 32768 minimum: 301 > > [0.07] Mount-cache hash table entries: 2048 (order: 0, 8192 bytes) > > [0.07] Mountpoint-cache hash table entries:
Re: [bug report] mmu not working anymore on mcf54415
On Sun, Aug 19, 2018 at 04:51:22PM +0200, angelo wrote: > Hi Mike, > > On 19/08/2018 12:03, Mike Rapoport wrote: > > On Sat, Aug 18, 2018 at 11:51:41PM +0200, Angelo Dureghello wrote: > >> Hi, > >> > >> On Sat, Aug 18, 2018 at 11:45:51AM +0200, Angelo Dureghello wrote: > >>> Hi all, > >>> > >>> i am testing kernel version 4.18.0 on mcf54415 with mmu > >>> enabled, just noticed the boot stops silently at: > >>> > >>> [9.04] Freeing unused kernel memory: 336K > >>> [9.04] This architecture does not have kernel memory protection. > > Can you please send your kernel config and the entire boot log? > > > > Thanks for looking into this. Files attached. > > As you can see from the config, my ramfs is embedded in the kernel. Actually not :) I've expected to see INITRAMFS_SOURCE there... > The kernel boot process seems to complete, but boot hangs at the moment the > ramfs (in my case embedded in the kernel binary) should be loaded. Apparently, I've broken some early memory reservations. Can you test with this patch: diff --git a/arch/m68k/mm/mcfmmu.c b/arch/m68k/mm/mcfmmu.c index 70dde04..dae0a41 100644 --- a/arch/m68k/mm/mcfmmu.c +++ b/arch/m68k/mm/mcfmmu.c @@ -172,7 +172,7 @@ void __init cf_bootmem_alloc(void) high_memory = (void *)_ramend; /* Reserve kernel text/data/bss */ - memblock_reserve(memstart, memstart - _rambase); + memblock_reserve(_rambase, memstart - _rambase); m68k_virt_to_node_shift = fls(_ramend - 1) - 6; module_fixup(NULL, __start_fixup, __stop_fixup); > I am trying to understand something more. > > Regards, > Angelo > >>> Just after generally there is the initramfs load and the console prompt, > >>> while actually nothing happen. > >>> > >>> Trying to collect more informations, > >>> > >> The commit that breaks mmu on mcf54415 is > >> > >> commit 1008a11590b966b469e60dc3756c9226a685ce12 (HEAD) > >> Author: Mike Rapoport > >> Date: Wed Jul 4 09:28:16 2018 +0300 > >> > >> m68k: switch to MEMBLOCK + NO_BOOTMEM > >> > >> Regards, > >> Angelo Dureghello > >> > >>> Regards, > >>> Angelo Dureghello > >>> > > U-Boot 2018.07-rc2-00041-g7b920e5579-dirty (Aug 12 2018 - 23:06:24 +0200) > > CPU: Freescale MCF54415 (Mask:a0 Version:2) >CPU CLK 240 MHz BUS CLK 120 MHz FLB CLK 60 MHz >INP CLK 30 MHz VCO CLK 480 MHz > SPI: ready > DRAM: 128 MiB > MMC: fsl_esdhc_init > FSL_SDHC: 0 > Loading Environment from SPI Flash... SF: Detected is25lp128 with page size > 256 Bytes, erase size 64 KiB, total 16 MiB > OK > In:serial > Out: serial > Err: serial > Hit any key to stop autoboot: 0 > SF: Detected is25lp128 with page size 256 Bytes, erase size 64 KiB, total 16 > MiB > device 0 offset 0x10, size 0x1ff6d0 > SF: 2094800 bytes @ 0x10 Read: OK > ## Booting kernel from Legacy Image at 40001000 ... >Image Name: mainline kernel >Created: 2018-08-19 8:55:20 UTC >Image Type: M68K Linux Kernel Image (uncompressed) >Data Size:2094736 Bytes = 2 MiB >Load Address: 40001000 >Entry Point: 40001000 >Verifying Checksum ... OK >Loading Kernel Image ... OK > [0.00] Linux version 4.18.0-rc6stmark2-001-00013-g1008a11590b9-dirty > (angelo@jerusalem) (gcc version 5.2.0 (crosstools-sysam-2016.04.16)) #58 Sun > Aug 19 10:55:19 CEST 2018 > [0.00] Built 1 zonelists, mobility grouping on. Total pages: 16312 > [0.00] Kernel command line: console=ttyS0,115200 root=/dev/ram0 rw > rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1 > [0.00] Dentry cache hash table entries: 16384 (order: 3, 65536 bytes) > [0.00] Inode-cache hash table entries: 8192 (order: 2, 32768 bytes) > [0.00] Sorting __ex_table... > [0.00] Memory: 128016K/131072K available (1299K kernel code, 102K > rwdata, 304K rodata, 328K init, 208K bss, 3056K reserved, 0K cma-reserved) > [0.00] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=8 > [0.00] NR_IRQS: 256 > [0.00] clocksource: pit: mask: 0x max_cycles: 0x, > max_idle_ns: 1019338904850 ns > [0.00] Console: colour dummy device 80x25 > [0.07] Calibrating delay loop... 238.38 BogoMIPS (lpj=1191936) > [0.07] pid_max: default: 32768 minimum: 301 > [0.07] Mount-cache hash table entries: 2048 (order: 0, 8192 bytes) > [0.07] Mountpoint-cache hash table entries: 2048 (order: 0, 8192 > bytes) > [0.09] devtmpfs: initialized > [0.13] random: get_random_u32 called from > bucket_table_alloc+0x174/0x1a6 with crng_init=0 > [0.13] clocksource: jiffies: mask: 0x max_cycles: 0x, > max_idle_ns: 1911260446275 ns > [0.13] futex hash table entries: 256 (order: -2, 3072 bytes) > [0.20] clocksource: Switched to clocksource pit > [0.20] FS-Cache: Loaded > [0.93] workingset: timestamp_bits=27 max_order=14 bucket_order=0 > [1.10] io scheduler noop
Re: [bug report] mmu not working anymore on mcf54415
Hi Mike, On 19/08/2018 12:03, Mike Rapoport wrote: > On Sat, Aug 18, 2018 at 11:51:41PM +0200, Angelo Dureghello wrote: >> Hi, >> >> On Sat, Aug 18, 2018 at 11:45:51AM +0200, Angelo Dureghello wrote: >>> Hi all, >>> >>> i am testing kernel version 4.18.0 on mcf54415 with mmu >>> enabled, just noticed the boot stops silently at: >>> >>> [9.04] Freeing unused kernel memory: 336K >>> [9.04] This architecture does not have kernel memory protection. > Can you please send your kernel config and the entire boot log? > Thanks for looking into this. Files attached. As you can see from the config, my ramfs is embedded in the kernel. The kernel boot process seems to complete, but boot hangs at the moment the ramfs (in my case embedded in the kernel binary) should be loaded. I am trying to understand something more. Regards, Angelo >>> Just after generally there is the initramfs load and the console prompt, >>> while actually nothing happen. >>> >>> Trying to collect more informations, >>> >> The commit that breaks mmu on mcf54415 is >> >> commit 1008a11590b966b469e60dc3756c9226a685ce12 (HEAD) >> Author: Mike Rapoport >> Date: Wed Jul 4 09:28:16 2018 +0300 >> >> m68k: switch to MEMBLOCK + NO_BOOTMEM >> >> Regards, >> Angelo Dureghello >> >>> Regards, >>> Angelo Dureghello >>> U-Boot 2018.07-rc2-00041-g7b920e5579-dirty (Aug 12 2018 - 23:06:24 +0200) CPU: Freescale MCF54415 (Mask:a0 Version:2) CPU CLK 240 MHz BUS CLK 120 MHz FLB CLK 60 MHz INP CLK 30 MHz VCO CLK 480 MHz SPI: ready DRAM: 128 MiB MMC: fsl_esdhc_init FSL_SDHC: 0 Loading Environment from SPI Flash... SF: Detected is25lp128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB OK In:serial Out: serial Err: serial Hit any key to stop autoboot: 0 SF: Detected is25lp128 with page size 256 Bytes, erase size 64 KiB, total 16 MiB device 0 offset 0x10, size 0x1ff6d0 SF: 2094800 bytes @ 0x10 Read: OK ## Booting kernel from Legacy Image at 40001000 ... Image Name: mainline kernel Created: 2018-08-19 8:55:20 UTC Image Type: M68K Linux Kernel Image (uncompressed) Data Size:2094736 Bytes = 2 MiB Load Address: 40001000 Entry Point: 40001000 Verifying Checksum ... OK Loading Kernel Image ... OK [0.00] Linux version 4.18.0-rc6stmark2-001-00013-g1008a11590b9-dirty (angelo@jerusalem) (gcc version 5.2.0 (crosstools-sysam-2016.04.16)) #58 Sun Aug 19 10:55:19 CEST 2018 [0.00] Built 1 zonelists, mobility grouping on. Total pages: 16312 [0.00] Kernel command line: console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1 [0.00] Dentry cache hash table entries: 16384 (order: 3, 65536 bytes) [0.00] Inode-cache hash table entries: 8192 (order: 2, 32768 bytes) [0.00] Sorting __ex_table... [0.00] Memory: 128016K/131072K available (1299K kernel code, 102K rwdata, 304K rodata, 328K init, 208K bss, 3056K reserved, 0K cma-reserved) [0.00] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=8 [0.00] NR_IRQS: 256 [0.00] clocksource: pit: mask: 0x max_cycles: 0x, max_idle_ns: 1019338904850 ns [0.00] Console: colour dummy device 80x25 [0.07] Calibrating delay loop... 238.38 BogoMIPS (lpj=1191936) [0.07] pid_max: default: 32768 minimum: 301 [0.07] Mount-cache hash table entries: 2048 (order: 0, 8192 bytes) [0.07] Mountpoint-cache hash table entries: 2048 (order: 0, 8192 bytes) [0.09] devtmpfs: initialized [0.13] random: get_random_u32 called from bucket_table_alloc+0x174/0x1a6 with crng_init=0 [0.13] clocksource: jiffies: mask: 0x max_cycles: 0x, max_idle_ns: 1911260446275 ns [0.13] futex hash table entries: 256 (order: -2, 3072 bytes) [0.20] clocksource: Switched to clocksource pit [0.20] FS-Cache: Loaded [0.93] workingset: timestamp_bits=27 max_order=14 bucket_order=0 [1.10] io scheduler noop registered [1.10] io scheduler deadline registered [1.10] io scheduler cfq registered (default) [1.10] io scheduler mq-deadline registered [1.10] io scheduler kyber registered [2.30] ColdFire internal UART serial driver [2.30] mcfuart.0: ttyS0 at MMIO 0xfc06 (irq = 90, base_baud = 750) is a ColdFire UART [2.50] console [ttyS0] enabled [2.51] mcfuart.0: ttyS1 at MMIO 0xfc064000 (irq = 91, base_baud = 750) is a ColdFire UART [2.52] mcfuart.0: ttyS2 at MMIO 0xfc068000 (irq = 92, base_baud = 750) is a ColdFire UART [2.53] mcfuart.0: ttyS3 at MMIO 0xfc06c000 (irq = 93, base_baud = 750) is a ColdFire UART [2.56] random: fast init done [2.57] m25p80 spi0.1: is25lp128 (16384 Kbytes) [2.58] Creating 3 MTD partitions on "is25lp128": [2.58] 0x-0x0010 : "U-Boot (1024K)" [2.61]
Re: [bug report] mmu not working anymore on mcf54415
On Sat, Aug 18, 2018 at 11:51:41PM +0200, Angelo Dureghello wrote: > Hi, > > On Sat, Aug 18, 2018 at 11:45:51AM +0200, Angelo Dureghello wrote: > > Hi all, > > > > i am testing kernel version 4.18.0 on mcf54415 with mmu > > enabled, just noticed the boot stops silently at: > > > > [9.04] Freeing unused kernel memory: 336K > > [9.04] This architecture does not have kernel memory protection. Can you please send your kernel config and the entire boot log? > > Just after generally there is the initramfs load and the console prompt, > > while actually nothing happen. > > > > Trying to collect more informations, > > > The commit that breaks mmu on mcf54415 is > > commit 1008a11590b966b469e60dc3756c9226a685ce12 (HEAD) > Author: Mike Rapoport > Date: Wed Jul 4 09:28:16 2018 +0300 > > m68k: switch to MEMBLOCK + NO_BOOTMEM > > Regards, > Angelo Dureghello > > > Regards, > > Angelo Dureghello > > > -- Sincerely yours, Mike.
Re: [bug report] mmu not working anymore on mcf54415
Hi, On Sat, Aug 18, 2018 at 11:45:51AM +0200, Angelo Dureghello wrote: > Hi all, > > i am testing kernel version 4.18.0 on mcf54415 with mmu > enabled, just noticed the boot stops silently at: > > [9.04] Freeing unused kernel memory: 336K > [9.04] This architecture does not have kernel memory protection. > > Just after generally there is the initramfs load and the console prompt, > while actually nothing happen. > > Trying to collect more informations, > The commit that breaks mmu on mcf54415 is commit 1008a11590b966b469e60dc3756c9226a685ce12 (HEAD) Author: Mike Rapoport Date: Wed Jul 4 09:28:16 2018 +0300 m68k: switch to MEMBLOCK + NO_BOOTMEM Regards, Angelo Dureghello > Regards, > Angelo Dureghello >