Re: Patch to align virt and phys spaces on i386
Michael Brown <[email protected]> Wed, 8 Mar 2006 20:59:32 +0000 (GMT)
| Newsgroups | gmane.network.etherboot.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 8 Mar 2006, Glenn Brown wrote: > The attached patch increases i386 virt_offset alignment to 4kB, so the > bottom 12 bits of corresponding virt and bus addrs will be identical. Good idea for Etherboot as-is, since it removes the need for drivers to care about aligning physical addresses, but won't work in the "stay in real mode" (aka KEEP_IT_REAL) port in Etherboot 5.5, since the PXE spec guarantees us only 16-byte alignment in where we get loaded, and we don't get to relocate ourselves. We therefore need another mechanism to deal with buffer alignment anyway, and I'd prefer to keep it down to just one mechanism for simplicity. I accept that the current approach, in which each driver allocates more space than it needs and then slides its buffers to align them, is inefficient and duplicative. In 5.5, all data buffers are part of the shared buffer space, so maybe we could implement a mechanism whereby we refer to this space via a global pointer that gets maximally aligned by shared (non-driver) code. This would give drivers aligned buffers while removing the duplicate code and maintaining the option of PXE compliance. Michael ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642