Hi I booted the kernel with below said modification However the kernel is crashing. I debugged and found that it is crashing in assembly function __trap_init(arch/arm/kernel). I think it fails when it tries to load the exception vectors at the location 0xffff0000. ENTRY(__trap_init) stmfd sp!, {r4 - r6, lr} adr r1, .LCvectors @ set up the vectors ldmia r1, {r1, r2, r3, r4, r5, r6, ip, lr} stmia r0, {r1, r2, r3, r4, r5, r6, ip, lr} <-- Crashes in this line. add r2, r0, #0x200 adr r0, __stubs_start @ copy stubs to 0x200 adr r1, __stubs_end 1: ldr r3, [r0], #4 str r3, [r2], #4 cmp r0, r1 blt 1b LOADREGS(fd, sp!, {r4 - r6, pc}) Any help will be grateful. Thanking you in advance Regards Aman ----- Original Message ----- From: "Martin J. Bligh" To: "Aman" ; "MM Linux" Sent: Sunday, January 25, 2004 9:19 PM Subject: Re: Discontiguous memory issue > > I am working on a customized board which has S3C2410 as its processor. > > I have applied the following Linux patches patch-2.4.18-rmk6 and > > patch-2.4.18-RMK6-SWL5. > > There are two types of custom hardware with me. One has 64MB contiguous > > SDRAM and the other has 32 MB with following discontiguous physical > > memory map. > > > > 1. 0x30000000 to 0x307fffff size is 8MB > > 2. 0x31000000 to 0x317fffff size is 8MB > > 3. 0x32000000 to 0x327fffff size is 8MB > > 4. 0x33000000 to 0x337fffff size is 8MB > > > > RAMDISK location 0x31000000 (Maximum size is 7 MB) and ZIMAGE > > location 0x31700000 > > > > In the 64 MB hardware, Linux runs without any issues. Because the patch is > > for 64MB contiguous memory. I am able to boot the 32 MB hardware > > with the same kernel used for 64MB. But in 32MB hardware, it crashes > > when I run some of our applications. I assume that this is because the > > kernel is not configured for the discontiguous memory map. > > > > I did the following changes to support discontiguous memory. > > > > 1. I changed the MEM_SIZE macro to 32 * 1024 * 1024 > > (include/as/arch/s3c2410.h) > > 2. Changed the macros in the include/asm/arch/memory.h > > 3. modified the fixup_s3c2410 () function in > > arch/arm/mach-s3c2410/arch.c to support 4 memory banks. > > 4. Enabled CONFIG_DISCONTIGMEM option > > > > After doing the above changes, Linux crashes during the bootup. > > Is my understanding correct ? > > I have attached the modified files. > > Any help regarding the discontiguous memory configuration will be grateful. > > > > Thanking you in advance. > > Where exactly during bootup are you crashing? If it's before console_init, > you're going to have some kind of early printk function to do a crude dump > to the screen or serial port or something. If it's after, then dump all > the pgdats, and see if it looks good. > > Fundamentally, you need to create the pgdats, and fill them out properly, > describing to the main VM where your memory regions start and end. Most > of them are in pfn units (page frame number = physaddr / PAGE_SIZE). > I didn't bother sorting through your files to see if you're doing that ;-) > > M. > >