Question concerning memory configuration
I have question concerning the memory configuration variables in the MIPS/Linux
codebase. I am working on a board that has 64Mbytes (0x400 0000) of SDRAM. We
are using an R4000 core and have the memory map setup so that KSEG0 & KSEG1 both
map to address 0x0 in physical memory. On our embedded system we are going to hard
code the variable mips_memory_upper (This eventually is stored in memory_end). My
question is what I should initialize the value to? Do I treat the top of memory as KSEG1
+ 64Mbytes? (i.e., 0xA400 0000) or do I initialize it realative to 0? If anybody has any
insights in this area, any information would be greatly appreciated.
Thanks,
Jeff
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jeff Harrell Work: (801) 619-6104
Broadband Access group/TI
[email protected]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 10 lines · Jeff Harrell
I have question concerning the memory configuration variables in the MIPS/Linux codebase. I am working on a board that has 64Mbytes (
0x4000000) of SDRAM. We are using an R4000 core and have the memory map setup so that KSEG0 & KSEG1 both map to address0x0in physical memory. On our embedded system we are going to hard code the variablemips_memory_upper(This eventually is stored inmemory_end). My question is what I should initialize the value to? Do I treat the top of memory as KSEG1 + 64Mbytes? (i.e.,0xA4000000) or do I initialize it realative to 0? If anybody has any insights in this area, any information would be greatly appreciated.
I killed mips_memory_upper in 2.3.27. Now the kernel uses the same bootmem functions as the other machines to implement that functionality. I suggest you take a look at arch/mips64/sgi-ip27/ip27-memory.c for a simple example how to use this interface.
Ralf