Re: [bug report] mmu not working anymore on mcf54415

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.040000] Freeing unused kernel memory: 336K
[    9.040000] 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 0x40000000 and
not at 0 as in some other mmu Coldfire models.
This probably made the issue visible in my board.

Tested-by: Angelo Dureghello <angelo@xxxxxxxx>


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 <rppt@xxxxxxxxxxxxxxxxxx>
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 0x100000, size 0x1ff6d0
SF: 2094800 bytes @ 0x100000 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.000000] 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.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16312
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1
[    0.000000] Dentry cache hash table entries: 16384 (order: 3, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 2, 32768 bytes)
[    0.000000] Sorting __ex_table...
[    0.000000] Memory: 128016K/131072K available (1299K kernel code, 102K rwdata, 304K rodata, 328K init, 208K bss, 3056K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=8
[    0.000000] NR_IRQS: 256
[    0.000000] clocksource: pit: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1019338904850 ns
[    0.000000] Console: colour dummy device 80x25
[    0.070000] Calibrating delay loop... 238.38 BogoMIPS (lpj=1191936)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 2048 (order: 0, 8192 bytes)
[    0.070000] Mountpoint-cache hash table entries: 2048 (order: 0, 8192 bytes)
[    0.090000] devtmpfs: initialized
[    0.130000] random: get_random_u32 called from bucket_table_alloc+0x174/0x1a6 with crng_init=0
[    0.130000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.130000] futex hash table entries: 256 (order: -2, 3072 bytes)
[    0.200000] clocksource: Switched to clocksource pit
[    0.200000] FS-Cache: Loaded
[    0.930000] workingset: timestamp_bits=27 max_order=14 bucket_order=0
[    1.100000] io scheduler noop registered
[    1.100000] io scheduler deadline registered
[    1.100000] io scheduler cfq registered (default)
[    1.100000] io scheduler mq-deadline registered
[    1.100000] io scheduler kyber registered
[    2.300000] ColdFire internal UART serial driver
[    2.300000] mcfuart.0: ttyS0 at MMIO 0xfc060000 (irq = 90, base_baud = 7500000) is a ColdFire UART
[    2.500000] console [ttyS0] enabled
[    2.510000] mcfuart.0: ttyS1 at MMIO 0xfc064000 (irq = 91, base_baud = 7500000) is a ColdFire UART
[    2.520000] mcfuart.0: ttyS2 at MMIO 0xfc068000 (irq = 92, base_baud = 7500000) is a ColdFire UART
[    2.530000] mcfuart.0: ttyS3 at MMIO 0xfc06c000 (irq = 93, base_baud = 7500000) is a ColdFire UART
[    2.560000] random: fast init done
[    2.570000] m25p80 spi0.1: is25lp128 (16384 Kbytes)
[    2.580000] Creating 3 MTD partitions on "is25lp128":
[    2.580000] 0x000000000000-0x000000100000 : "U-Boot (1024K)"
[    2.610000] 0x000000100000-0x000000800000 : "Kernel+initramfs (7168K)"
[    2.630000] 0x000000800000-0x000001000000 : "Flash Free Space (8192K)"
[    2.660000] Freeing unused kernel memory: 328K
[    2.670000] This architecture does not have kernel memory protection.


CONFIG_LOCALVERSION="stmark2-001"
CONFIG_DEFAULT_HOSTNAME="stmark2"
CONFIG_SYSVIPC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_NAMESPACES=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_CC_OPTIMIZE_FOR_SIZE=y
# CONFIG_FHANDLE is not set
# CONFIG_AIO is not set
# CONFIG_ADVISE_SYSCALLS is not set
# CONFIG_MEMBARRIER is not set
CONFIG_EMBEDDED=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_COMPAT_BRK is not set
# CONFIG_LBDAF is not set
# CONFIG_BLK_DEV_BSG is not set
CONFIG_BLK_CMDLINE_PARSER=y
CONFIG_COLDFIRE=y
CONFIG_M5441x=y
CONFIG_CLOCK_FREQ=240000000
CONFIG_STMARK2=y
CONFIG_RAMBASE=0x40000000
CONFIG_RAMSIZE=0x8000000
CONFIG_VECTORBASE=0x40000000
CONFIG_KERNELBASE=0x40001000
CONFIG_BINFMT_FLAT=y
CONFIG_BINFMT_MISC=y
# CONFIG_UEVENT_HELPER is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_ALLOW_DEV_COREDUMP is not set
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_LE_BYTE_SWAP=y
CONFIG_MTD_CFI_GEOMETRY=y
# CONFIG_MTD_CFI_I2 is not set
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_ROM=y
CONFIG_MTD_COMPLEX_MAPPINGS=y
CONFIG_MTD_PLATRAM=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_SPI_NOR=y
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_UNIX98_PTYS is not set
# CONFIG_DEVMEM is not set
CONFIG_SERIAL_MCF=y
CONFIG_SERIAL_MCF_BAUDRATE=115200
CONFIG_SERIAL_MCF_CONSOLE=y
# CONFIG_HW_RANDOM is not set
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_FSL_DSPI=y
CONFIG_DEBUG_GPIO=y
CONFIG_GPIO_SYSFS=y
CONFIG_GPIO_GENERIC_PLATFORM=y
# CONFIG_HWMON is not set
# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
# CONFIG_FILE_LOCKING is not set
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set
CONFIG_FSCACHE=y
# CONFIG_PROC_SYSCTL is not set
CONFIG_PRINTK_TIME=y
# CONFIG_ENABLE_WARN_DEPRECATED is not set
# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set
CONFIG_SLUB_DEBUG_ON=y
CONFIG_PANIC_ON_OOPS=y
# CONFIG_SCHED_DEBUG is not set
# CONFIG_DEBUG_BUGVERBOSE is not set
CONFIG_BOOTPARAM=y
CONFIG_BOOTPARAM_STRING="console=ttyS0,115200 root=/dev/ram0 rw rootfstype=ramfs rdinit=/sbin/init devtmpfs.mount=1"
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_ECHAINIV is not set
CONFIG_CRYPTO_ANSI_CPRNG=y
# CONFIG_CRYPTO_HW is not set
CONFIG_CRC16=y


-- 
Sincerely yours,
Mike.




[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux