<div dir="ltr">right, Aaron, you keep reminding me of that and I keep forgetting it :-)<div><br></div><div>so, ok, ramstage it is for paging. The x86 is so darned annoying. We had paging in the bootblock for PPC on linuxbios.</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 2, 2017 at 12:43 PM Aaron Durbin <<a href="mailto:adurbin@google.com">adurbin@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Aug 2, 2017 at 1:36 PM, ron minnich <<a href="mailto:rminnich@gmail.com" target="_blank">rminnich@gmail.com</a>> wrote:<br>
><br>
><br>
> On Wed, Aug 2, 2017 at 12:08 PM Zoran Stojsavljevic<br>
> <<a href="mailto:zoran.stojsavljevic@gmail.com" target="_blank">zoran.stojsavljevic@gmail.com</a>> wrote:<br>
>><br>
>><br>
>><br>
>> So, turning on the Virtual Mode (paging ON), you'll also imply that<br>
>> Coreboot will initialize and use MMU, don't you?<br>
><br>
><br>
> sure.<br>
><br>
>><br>
>><br>
>> Am I correct, or you can use paging without MMU?!<br>
><br>
><br>
> MMU must be on.<br>
><br>
>><br>
>> I doubt that, perhaps. So, then, I would like to see this code in Coreboot<br>
>> where MMU is initialized. And how it is initialized (maybe there is a some<br>
>> over-simplified mode of operation using 2MB pages).<br>
><br>
><br>
> yep.<br>
><br>
>><br>
>><br>
>> And my question is: what for? Or I did not get the idea... Who really<br>
>> needs to use paging in boot-loaders? Even INTEL, which (on purpose) makes<br>
>> things way over-dimensioned and over-complicated, does NOT use paging in<br>
>> UEFI BIOSes, so far???<br>
>><br>
><br>
> it's trivial to turn on paging. In harvey I've got it down to 160 lines,<br>
> including comments and white space. I made it much more compact in my CL<br>
> from 1/2014.<br>
><br>
> If you turn on paging you can capture null pointer derefs, and all other out<br>
> of range address references. And relocatable modules are much easier..<br>
><br>
> My question is, why not do it? I don't see any harm. All the other platforms<br>
> in coreboot use paging. What's so special about x86 that it should not use<br>
> paging?<br>
<br>
You can't use it for CAR so that sorta throws out romstage and before.<br>
It's up to the implementation of how CAR works within the hierarchy,<br>
but with hardware page walkers that pull things through the cache<br>
things can go badly. So then you could enable paging for ramstage.<br>
Need to locate storage for the page tables, but that's not an<br>
impossible thing either.<br>
<br>
><br>
> ron<br>
><br>
> --<br>
> coreboot mailing list: <a href="mailto:coreboot@coreboot.org" target="_blank">coreboot@coreboot.org</a><br>
> <a href="https://mail.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">https://mail.coreboot.org/mailman/listinfo/coreboot</a><br>
</blockquote></div>