In the stock M5208EVB uCLinux-dist (as shipped with the EVB) the
PAGE_OFFSET_RAW was set to 0x00000000, producing incorrect bootup memory
size messages. Also, /proc/meminfo and the free command is showing
incorrect values. Our custom board is *very* similar to the M5208EVB,
except for more FLASH, and SDR instead of DDR, but they are similar in
almost every other aspect. I changed the PAGE_OFFSET_RAW as suggested in
the released patch for the M5208EVB so the value is 0x40020000. With
this value I get the famous "wrong zone alignment" early in boot:

 

---------------------------

Linux version 2.4.27-uc1 ([EMAIL PROTECTED]) (gcc version 2.95.3 20010315
(release)(ColdFire patches - 20010318 from
http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from
http://www.snapgear.com/)) #57 Fri Mar 9 18:42:55 CET 2007

 

uClinux/COLDFIRE(m5208)

COLDFIRE port done by Greg Ungerer, [EMAIL PROTECTED]

Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne

On node 0 totalpages: 8159

zone(0): 0 pages.

zone(1): 8159 pages.

BUG: wrong zone alignment, it will crash

zone(2): 0 pages.

Kernel command line: rootfstype=romfs

Bad boy: ColdFire Timer (at 0x40022e90) called request_irq without a
dev_id!

Calibrating delay loop... 109.77 BogoMIPS

Memory available: 29584k/32767k RAM, 0k/0k ROM (737k kernel code, 214k
data)

kmem_create: Forcing size word alignment - vm_area_struct

kmem_create: Forcing size word alignment - mm_struct

kmem_create: Forcing size word alignment - filp

Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)

Inode cache hash table entries: 2048 (order: 2, 16384 bytes)

kmem_create: Forcing size word alignment - inode_cache

Mount cache hash table entries: 512 (order: 0, 4096 bytes)

kmem_create: Forcing size word alignment - bdev_cache

kmem_create: Forcing size word alignment - cdev_cache

kmem_create: Forcing size word alignment - kiobuf

Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)

Page-cache hash table entries: 8192 (order: 3, 32768 bytes)

POSIX conformance testing by UNIFIX

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

kmem_create: Forcing size word alignment - sock

Initializing RT netlink socket

Starting kswapd

kmem_create: Forcing size word alignment - file_lock_cache

JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis
Communications AB.

ColdFire internal UART serial driver version 1.00

ttyS0 at 0xfc060000 (irq = 90) is a builtin ColdFire UART

.

.

I spent the weekend searching the archives for discussions regarding
this. Is it correct that the PAGE_OFFSET_RAW must be on a 2 Mb boundary?

 

Today I tried changing the PAGE_OFFSET_RAW to just 0x40000000, i..e.
start of physical RAM. Then everything seems OK. However, I also tried
adding a call to "reserve_bootmem(0x40000000, 0x20000)" in
/linux-2.4.x/arch/m68knommu/kernel/setup.c in order to make sure that
the first 0x200000 is reserved. This gave the following messages at
boot:

 

-----------------------------

Linux version 2.4.27-uc1 ([EMAIL PROTECTED]) (gcc version 2.95.3 20010315
(release)(ColdFire patches - 20010318 from
http://fiddes.net/coldfire/)(uClinux XIP and shared lib patches from
http://www.snapgear.com/)) #59 Mon Mar 12 16:08:16 CET 2007

 

uClinux/COLDFIRE(m5208)

COLDFIRE port done by Greg Ungerer, [EMAIL PROTECTED]

Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne

hm, page 00000000 reserved twice.

hm, page 00001000 reserved twice.

hm, page 00002000 reserved twice.

hm, page 00003000 reserved twice.

hm, page 00004000 reserved twice.

hm, page 00005000 reserved twice.

hm, page 00006000 reserved twice.

hm, page 00007000 reserved twice.

hm, page 00008000 reserved twice.

hm, page 00009000 reserved twice.

hm, page 0000a000 reserved twice.

hm, page 0000b000 reserved twice.

hm, page 0000c000 reserved twice.

hm, page 0000d000 reserved twice.

hm, page 0000e000 reserved twice.

hm, page 0000f000 reserved twice.

hm, page 00010000 reserved twice.

hm, page 00011000 reserved twice.

hm, page 00012000 reserved twice.

hm, page 00013000 reserved twice.

hm, page 00014000 reserved twice.

hm, page 00015000 reserved twice.

hm, page 00016000 reserved twice.

hm, page 00017000 reserved twice.

hm, page 00018000 reserved twice.

hm, page 00019000 reserved twice.

hm, page 0001a000 reserved twice.

hm, page 0001b000 reserved twice.

hm, page 0001c000 reserved twice.

hm, page 0001d000 reserved twice.

hm, page 0001e000 reserved twice.

hm, page 0001f000 reserved twice.

On node 0 totalpages: 8191

zone(0): 0 pages.

zone(1): 8191 pages.

zone(2): 0 pages.

Kernel command line: rootfstype=romfs

Bad boy: ColdFire Timer (at 0x40022e90) called request_irq without a
dev_id!

Calibrating delay loop... 109.77 BogoMIPS

Memory available: 29584k/32767k RAM, 0k/0k ROM (737k kernel code, 214k
data)

kmem_create: Forcing size word alignment - vm_area_struct

kmem_create: Forcing size word alignment - mm_struct

kmem_create: Forcing size word alignment - filp

Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)

Inode cache hash table entries: 2048 (order: 2, 16384 bytes)

kmem_create: Forcing size word alignment - inode_cache

Mount cache hash table entries: 512 (order: 0, 4096 bytes)

kmem_create: Forcing size word alignment - bdev_cache

kmem_create: Forcing size word alignment - cdev_cache

kmem_create: Forcing size word alignment - kiobuf

Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)

Page-cache hash table entries: 8192 (order: 3, 32768 bytes)

POSIX conformance testing by UNIFIX

Linux NET4.0 for Linux 2.4

Based upon Swansea University Computer Society NET3.039

kmem_create: Forcing size word alignment - sock

Initializing RT netlink socket

Starting kswapd

kmem_create: Forcing size word alignment - file_lock_cache

JFFS2 version 2.1. (C) 2001 Red Hat, Inc., designed by Axis
Communications AB.

ColdFire internal UART serial driver version 1.00

ttyS0 at 0xfc060000 (irq = 90) is a builtin ColdFire UART

 

I take this as an indication that my call to reserve_bootmem() in
incorrect/unnecessary. Basically, I'm looking for some feedback from
more experienced people to confirm if PAGE_OFFSET_RAW should be changed
from 0x40020000 to 0x40000000, and if some other change is necessary to
mark the first 0x20000 as out of bounds?

 

Regards,

 

/Martin Voss

Sweden

 

 

_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to