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


On Mon, 2003-02-10 at 14:21, Jonathan Larmour wrote:
> Gary Thomas wrote:
> > On Fri, 2003-02-07 at 09:21, Robin Farine wrote:
> > 
> >>Was http://sources.redhat.com/ml/ecos-patches/2002-07/msg00027.html such
> >>a bad idea?
> >>
> >>It allows board specific code to handle this delicate stuff
> >>appropriately but defaults to the original code for the platforms happy
> >>with that.
> > 
> > 
> > Actually, no :-)  I don't know what happened with this patch
> > (it was in the "dark" times of the summer).
> 
> I did still have it, but it's _way_ back in the backlog.
> 
>  >  I think I'll adapt/apply it now.
> 
> With respect to the power of two thing, presumably all that's required to 
> future proof that is to reset params->u.mem.size down to 
> CYGMEM_REGION_ram_SIZE - ( CYGARC_PHYSICAL_ADDRESS(CYGMEM_REGION_ram) - 
> params->u.mem.start ), assuming that since Linux can't cope with starting 
> on an odd boundary, then the memory underneath the even boundary is lost. 
> But to be honest I'd have thought Linux only required a page boundary 
> anyway, so perhaps it's better just to define a:
> 
> #ifndef HAL_LINUX_PAGE_SIZE
> # define HAL_LINUX_PAGE_SIZE 4096
> #endif
> 
> at the top anyway and align to that rather than the RAM size in the first 
> place.

When I make the fixes as recommended by Robin, I'll probably take all
of that rounding/masking stuff out and let the platform fix it if it
happens to be wrong.

> 
> I'm curious as to why the 7312 required changes. From what I can see it's 
> physical memory started on an even boundary anyway, but I'm sure I'm 
> missing something.

The real problem is the logical->physical mapping.  On the EDB7xxx,
it's not done very well (it was my first try!) and 
  logical(0) maps to physical(0xC0002900)
This was confusing Linux no end!

-- 
------------------------------------------------------------
Gary Thomas                 |
MLB Associates              |  Consulting for the
+1 (970) 229-1963           |    Embedded world
http://www.mlbassoc.com/    |
email: <gary@mlbassoc.com>  |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------


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