summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include/librm.h
diff options
context:
space:
mode:
authorMichael Brown2006-05-06 20:57:31 +0200
committerMichael Brown2006-05-06 20:57:31 +0200
commitf8e087767bb9fa82eac04b6819bb3cb78b2e8028 (patch)
tree0bd2d1b9edf7b46ecfbd5e0a11b2a831bee674fe /src/arch/i386/include/librm.h
parentPreserve GDT across prot_call(). (diff)
downloadipxe-f8e087767bb9fa82eac04b6819bb3cb78b2e8028.tar.gz
ipxe-f8e087767bb9fa82eac04b6819bb3cb78b2e8028.tar.xz
ipxe-f8e087767bb9fa82eac04b6819bb3cb78b2e8028.zip
Allow access to variables in .text16 as well as .data16. Chained
interrupt vectors, for example, will be easiest to handle if placed in .text16.
Diffstat (limited to 'src/arch/i386/include/librm.h')
-rw-r--r--src/arch/i386/include/librm.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/arch/i386/include/librm.h b/src/arch/i386/include/librm.h
index b4970c02..3a5d9468 100644
--- a/src/arch/i386/include/librm.h
+++ b/src/arch/i386/include/librm.h
@@ -15,17 +15,26 @@
*
*/
-/* Access to variables in .data16 */
+/* Access to variables in .data16 and .text16 */
extern char *data16;
+extern char *text16;
#define __data16( variable ) \
_data16_ ## variable __asm__ ( #variable ) \
__attribute__ (( section ( ".data16" ) ))
+#define __text16( variable ) \
+ _text16_ ## variable __asm__ ( #variable ) \
+ __attribute__ (( section ( ".text16" ) ))
+
#define __use_data16( variable ) \
( * ( ( typeof ( _data16_ ## variable ) * ) \
& ( data16 [ ( size_t ) & ( _data16_ ## variable ) ] ) ) )
+#define __use_text16( variable ) \
+ ( * ( ( typeof ( _text16_ ## variable ) * ) \
+ & ( text16 [ ( size_t ) & ( _text16_ ## variable ) ] ) ) )
+
/* Variables in librm.S, present in the normal data segment */
extern uint16_t rm_sp;
extern uint16_t rm_ss;