On Sun, 2013-01-20 at 17:42 -0600, David Woodhouse wrote: > It would be nice if there was a field in the EFI_COMPATIBILITY16_TABLE > which let the CSM code indicate how much it wants locked. Then we could > lock just the option roms and the bit that the CSM asks us to lock, > while leaving RAM in between. How feasible would it be to add change the > spec to add such a field?
Here's a slightly more concrete version of that proposal: Add fields 'BiosRamStart' and 'BiosRamEnd' to EFI_COMPATIBILITY16_TABLE (the presence of which can be inferred from the TableLength field which will be greater than the current 0x53 for any CSM conforming to the newer spec). In the static image, these fields will indicate the lowest and highest addresses which the BIOS *needs* to be writeable. SeaBIOS would set them to indicate the range 0xE0000-0xF0000, for example. The EFI side shall ensure that at least¹ the range so marked is writeable when invoking the CSM's Legacy16Boot method. It may optionally also *change* the value of the BiosRamStart field to a lower address, and give the CSM *more* writeable RAM than it asked for. So if we haven't loaded many option ROMs, the BIOS gets more RAM. The CSM may *also* move the BiosRamStart field down, during a DispatchOprom call, as long as it doesn't go below the top of the oprom which is currently being loaded. To implement persistent allocations in low memory (which I think is required for PCI BIOS v3) we may want that. I think this should work fairly well, retains flexibility about what to do with the space between bottom-of-BIOS and top-of-oproms, and should be completely transparent to *existing* CSMs. In the absence of the new fields, the EFI code should just write-protect the whole range as it does at the moment. -- dwmw2 ¹ It may need to have a larger range unlocked, depending on the granularity of the access control. Hence 'at least'.
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412
_______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel