Commit ID 97b2ba8046c4cbd46e012300b2c36b325864c728
|Contributor:||Glenn Brown||Files Modified:||2|
|Date:||23-March-2006 at 21:20||Lines Added:||1|
|Repository:||git://git.ipxe.org/mirror/etherboot.git master||Lines Removed:||31|
|Commit Comment:||Reviewed by: Marty Conner <md...@etherboot.org>, \ Michael Brown <mbr...@fensystems.co.uk>
[For the record: Michael Brown warns that any driver relying on the
feature added here will not be compatible with gpxe's KEEP_IT_REAL
options, and not be strictly PXE compliant.]
Increase i386 virt_offset alignment to 4kB, so the bottom 12 bits of
corresponding virt and bus addrs will be identical.
This change facilitates porting drivers to Etherboot, as the vast
majority of driver execution environments have this virt/bus alignment
relationship, and non-Etherboot drivers often assume bus addresses are
aligned if the corresponding virtual addrs are aligned.
PCI Express requires DMAs not cross 4kB boundaries, and this large
alignment is required by my forthcoming myri10ge.c 10Gb PCI Express
driver, which is a minimal port of Myricom's Linux driver. Other Linux
driver ports in the future would also surely benefit from this patch.
I have successfully tested this approach with our myri10ge.c driver with
this pathis patch on all 8 PCI express motherboards I have available to
me, representing the following hardware:
CPUs: AMD Opteron and Intel EM64T
Chipsets: Serverworks, Invidia, VIA, Intel, SiS
BIOSes: AMI, Award, IBM, Phoenix AwardBIOS, and Phoenix TrustedCore.
The "HAVE_VIRT_OFFSET" lines of the patch are not strictly necessary,
but are there for clarity and to avoid changing non-i386 behaviour,
since I have no way to test non-i386.
On architectures that HAVE_VIRT_OFFSET, align virt_offset on a
|Language||Code Added||Code Removed||Comments Added||Comment Removed||Blanks Added||Blanks Removed|