This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: EDB7312 - Linux booting


Gary Thomas wrote:
Index: hal/arm/arch/current/src/redboot_linux_exec.c
[snip]
- params->u.mem.start = CYGARC_PHYSICAL_ADDRESS(CYGMEM_REGION_ram);
/* Round up so there's only one bit set in the memory size.
* Don't double it if it's already a power of two, though.
*/
params->u.mem.size = 1<<hal_msbindex(CYGMEM_REGION_ram_SIZE);
if (params->u.mem.size < CYGMEM_REGION_ram_SIZE)
params->u.mem.size <<= 1;
+ params->u.mem.start = CYGARC_PHYSICAL_ADDRESS(CYGMEM_REGION_ram);
+ // Linux doesn't like physical RAM to start on odd boundary + params->u.mem.start &= ~(params->u.mem.size-1);
Excuse my ignorance, but why is this a power of two? Physical memory may not be a power of two certainly.

Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]