david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[legacy] Align legacy drivers' __shared data to the maximum possible

Some drivers that still use the legacy-driver wrapper (tg3 in particular)
apparently do not specify their alignment constraints properly.  This
hack forces any __shared data to be maximally aligned.

Note that this provides only 16-byte alignment; it is not possible to
request alignment to any greater than 16 bytes using
__attribute__((aligned)), since the relocation code will preserve only 16
byte alignment (and operation under -DKEEP_IT_REAL cannot preserve more
that 16 byte alignment).

Idea proposed by Tim Hockin <thockin@google.com>
This commit is contained in:
Michael Brown 2008-06-14 20:01:14 +01:00
parent cd0e9bcd22
commit 0d91c37ce5
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ extern void dbg_hex_dump_da ( unsigned long dispaddr,
* @endcode
*
*/
#define __shared __asm__ ( "_shared_bss" )
#define __shared __asm__ ( "_shared_bss" ) __aligned
/**
* Optimisation barrier