aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-12-26 23:32:57 -0500
committerKevin O'Connor <kevin@koconnor.net>2009-12-26 23:32:57 -0500
commit52a300f1c1ec2d9733d41ecd3ecaf78be48097b8 (patch)
treeaae0fd6884fd93440080f65144d3f7eab327e1b5 /src/util.c
parentfe2c3eece930e6d6e9f88e5d4d4ba4ccbe29f9fa (diff)
downloadseabios-hppa-52a300f1c1ec2d9733d41ecd3ecaf78be48097b8.zip
seabios-hppa-52a300f1c1ec2d9733d41ecd3ecaf78be48097b8.tar.gz
seabios-hppa-52a300f1c1ec2d9733d41ecd3ecaf78be48097b8.tar.bz2
Introduce MODESEGMENT define; rename VISIBLE32 to VISIBLE32FLAT.
Prepare for support of segmented 32bit code. Add new MODESEGMENT definition, and clarify existing 32bit mode defs.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index f5ae0e1..552f944 100644
--- a/src/util.c
+++ b/src/util.c
@@ -18,7 +18,7 @@
inline void
call16(struct bregs *callregs)
{
- if (!MODE16 && getesp() > BUILD_STACK_ADDR)
+ if (!MODESEGMENT && getesp() > BUILD_STACK_ADDR)
panic("call16 with invalid stack\n");
asm volatile(
#if MODE16 == 1
@@ -36,7 +36,7 @@ call16(struct bregs *callregs)
inline void
call16big(struct bregs *callregs)
{
- ASSERT32();
+ ASSERT32FLAT();
if (getesp() > BUILD_STACK_ADDR)
panic("call16 with invalid stack\n");
asm volatile(
@@ -49,7 +49,7 @@ call16big(struct bregs *callregs)
inline void
__call16_int(struct bregs *callregs, u16 offset)
{
- if (MODE16)
+ if (MODESEGMENT)
callregs->code.seg = GET_SEG(CS);
else
callregs->code.seg = SEG_BIOS;
@@ -197,7 +197,7 @@ memcpy_far(u16 d_seg, void *d_far, u16 s_seg, const void *s_far, size_t len)
void *
#undef memcpy
memcpy(void *d1, const void *s1, size_t len)
-#if MODE16 == 0
+#if MODESEGMENT == 0
#define memcpy __builtin_memcpy
#endif
{