diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-12-04 11:48:05 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-12-05 10:40:55 -0500 |
commit | 0f0612e8dc287d568f2eaa8407ed3f76cfae4018 (patch) | |
tree | a044e5908e9f089cc2c86d591e31c048ccb3d802 | |
parent | 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d (diff) | |
download | seabios-0f0612e8dc287d568f2eaa8407ed3f76cfae4018.zip seabios-0f0612e8dc287d568f2eaa8407ed3f76cfae4018.tar.gz seabios-0f0612e8dc287d568f2eaa8407ed3f76cfae4018.tar.bz2 |
Minor - move sgdt/lgdt macros from stacks.c to x86.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/stacks.c | 7 | ||||
-rw-r--r-- | src/x86.h | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/stacks.c b/src/stacks.c index 78ad65c..b7d8ade 100644 --- a/src/stacks.c +++ b/src/stacks.c @@ -102,13 +102,6 @@ stack_hop_back(u32 eax, u32 edx, void *func) * 16bit / 32bit calling ****************************************************************/ -static inline void sgdt(struct descloc_s *desc) { - asm("sgdtl %0" : "=m"(*desc)); -} -static inline void lgdt(struct descloc_s *desc) { - asm("lgdtl %0" : : "m"(*desc) : "memory"); -} - u16 StackSeg VARLOW; // Call a 32bit SeaBIOS function from a 16bit SeaBIOS function. @@ -209,6 +209,12 @@ struct descloc_s { u32 addr; } PACKED; +static inline void sgdt(struct descloc_s *desc) { + asm("sgdtl %0" : "=m"(*desc)); +} +static inline void lgdt(struct descloc_s *desc) { + asm("lgdtl %0" : : "m"(*desc) : "memory"); +} // x86.c void cpuid(u32 index, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx); |