[coreboot] I've turned on paging as a test

Stefan Reinauer stefan.reinauer at coreboot.org
Wed Mar 12 21:12:05 CET 2014


* Peter Stuge <peter at stuge.se> [140312 19:08]:
> ron minnich wrote:
> > [on arm]
> > 
> > > Why is it helpful or neccessary there?
> > 
> > It only matters if you like to have a dcache. Do you want a dcache?
> 
> What are the numbers?

Of running with dcache vs without? Beyond 10x speed improvement iirc.
Far too much to ignore it.

> > > Why is it neccessary there?
> > 
> > It only matters if you want to enter 64-bit mode.
> 
> (Why) Does coreboot need to do so?
 
I'd have to look up what we told the BIOS guys about why we switched to
32bit mode on 32bit platforms instead of staying in real mode.
But with address space being more than 4G these days it seems like a
good decision to go with the CPUs native mode instead of keeping to add
tricks to address memory above 4G.

> > Just look at our last iteration of MTRR setup.
> 
> I'm unfortunately being kept too busy trying to keep coreboot from
> making changes which seem good enough when proposed but which may
> not actually be worth the change.
 
I don't think this is going to make MTRR setup go away. These are two
separate mechanisms and at least the OS will still need MTRRs set up
correctly. Unfortunate, but that's how the hardware works. However there
are other potential benefits, see below.

> > For the base identity map on x86-32, it's one page for 4G.
> > For a map which locks out page 0, it's two pages.
> 
> I think it would be great if you could write up what you actually
> want to accomplish.
 
- be able to run code at any address without run time
  linking/relocating. This can also greatly simplify the way
  we do romstage today (which can't be moved inside the CBFS, for
  example)
- be able to write protect code, eg prevent exploits to rewrite code.
- catch NULL pointer accesses
- catch writes to non-designated memory, e.g. overwriting OS
  memory on resume
- run in 64 bit mode, for easy addressing of memory / devices,
  have more registers available for more compact code, etc.

> I am very worried that this is an XY problem:
> 
> Someone wants X and thinks that Y is the best way to accomplish it.
> They move on to communicate with others about Y, instead of about X,
> which is the more constructive communication to be had.

Possibly. It is an experiment at this point but it might prove really
useful in the future.

Stefan



More information about the coreboot mailing list