summaryrefslogtreecommitdiffstats
path: root/src/include/compiler.h
diff options
context:
space:
mode:
authorMichael Brown2008-06-14 21:01:14 +0200
committerMichael Brown2008-06-14 21:01:14 +0200
commit0d91c37ce56497f6aba1ecb07f25c6d71b355e09 (patch)
tree87788027542b6c1937e4be63b5c32e5d022e0f7e /src/include/compiler.h
parent[prefix] When we have to hook INT 19, chain to original handler if possible (diff)
downloadipxe-0d91c37ce56497f6aba1ecb07f25c6d71b355e09.tar.gz
ipxe-0d91c37ce56497f6aba1ecb07f25c6d71b355e09.tar.xz
ipxe-0d91c37ce56497f6aba1ecb07f25c6d71b355e09.zip
[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>
Diffstat (limited to 'src/include/compiler.h')
-rw-r--r--src/include/compiler.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/compiler.h b/src/include/compiler.h
index 1d4312a6..8ab7b8ae 100644
--- a/src/include/compiler.h
+++ b/src/include/compiler.h
@@ -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