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 /src/x86.h | |
parent | 31b8b4eea9d9ad58a73b22a6060d3ac1c419c26d (diff) | |
download | seabios-hppa-0f0612e8dc287d568f2eaa8407ed3f76cfae4018.zip seabios-hppa-0f0612e8dc287d568f2eaa8407ed3f76cfae4018.tar.gz seabios-hppa-0f0612e8dc287d568f2eaa8407ed3f76cfae4018.tar.bz2 |
Minor - move sgdt/lgdt macros from stacks.c to x86.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/x86.h')
-rw-r--r-- | src/x86.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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); |