linux-mips
[Top] [All Lists]

Re: linux porting - doubts

To: joe seb <joe.seb8@gmail.com>
Subject: Re: linux porting - doubts
From: David Daney <ddaney@caviumnetworks.com>
Date: Fri, 26 Jun 2009 08:26:46 -0700
Cc: linux-mips@linux-mips.org
In-reply-to: <4f9abdc70906260030q3cefba63tb2fd30245a7015df@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4f9abdc70906260030q3cefba63tb2fd30245a7015df@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
joe seb wrote:
Hi,

We are trying to port linux to our new platform based on MIPS32 24Kc.

In our platform we have physical RAM of 256M mapped from 0x90000000
to 0xa0000000( KSEG0 - cached) and 0xb0000000 to 0xc0000000(KSEG1- uncached).

We made the following changes for our platform,

CAC_BASE to  0x90000000 in spaces.h
KSEG0 to 0x90000000 and KSEG1 to 0xb0000000 in addrspace.h
CKSEG0 to 0x90000000 and CKSEG1 to 0xb0000000 in addrspace.h
loadaddr to 0x90000000 in the Makefile under arch/mips folder.

Are these changes sufficient??
Is there any other platform port with such variations which we can refer to
make sure about the changes made.


That seems mostly wrong.

The CAC_BASE, KSEG0, and CKSEG0 should probably be left unchanged. You the load-y in arch/mips/Makefile for your target to the load address of the kernel. Then when registering memory call add_memory_region() only for the physical memory that you want the kernel to use. In your case physical addresses from 0 to fffffff would seem to have no RAM, so you would do something like:

 add_memory_region(0x10000000, 0x10000000, BOOT_MEM_RAM);

David Daney


<Prev in Thread] Current Thread [Next in Thread>