[PATCH 1/1] rtas_flash_4gig

Paul Mackerras paulus at samba.org
Thu Oct 28 13:59:30 EST 2004

Jake Moilanen writes:

> According to the RPA (item E7-41 to be exact), the block-list can be
> anywhere under 4 gigs.  RTAS will make hypervisor calls to access this
> memory.  

OK, but I don't see that we make any attempt at all to try to make
sure the memory for the block list pages is below 4G.  I also don't
see where we check the ibm,flash-block-version property (to see if we
can in fact use a linked list of headers) or where we check that the
pages we are using don't overlap OF's memory (i.e. real-size bytes
starting at real-base).

Since this is happening at reboot time, I suggest we copy the block
list into rtas_rmo_buf.  That is big enough to accommodate up to 8k
entries, which will do for up to 32MB of flash image, which should be
enough for now, shouldn't it?  If not we can just make rtas_rmo_buf a
bit bigger.

As for not overlapping OF, we just need a little allocator function
that keeps on allocating pages until it gets one that doesn't overlap
with OF, and then frees all the extra pages it had to allocate.  Those
pages could be linked together so we don't have to maintain a big
array of page pointers.  The common case will be that we get a page we
can use (i.e. which doesn't overlap OF) on the first try.


More information about the Linuxppc64-dev mailing list