aboutsummaryrefslogtreecommitdiff
path: root/src/farptr.h
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/farptr.h
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/farptr.h')
-rw-r--r--src/farptr.h14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/farptr.h b/src/farptr.h
index acc9d59..3cc4170 100644
--- a/src/farptr.h
+++ b/src/farptr.h
@@ -122,9 +122,9 @@ extern void __force_link_error__unknown_type();
#define MAKE_FLATPTR(seg,off) ((void*)(((u32)(seg)<<4)+(u32)(off)))
-#if MODE16 == 1
+#if MODESEGMENT == 1
-// Definitions when in 16 bit mode.
+// Definitions when using segmented mode.
#define GET_FARVAR(seg, var) __GET_FARVAR((seg), (var))
#define SET_FARVAR(seg, var, val) __SET_FARVAR((seg), (var), (val))
#define GET_VAR(seg, var) __GET_VAR(seg, (var))
@@ -159,13 +159,9 @@ static inline void outsl_fl(u16 port, void *ptr_fl, u16 count) {
outsl(port, (u32*)FLATPTR_TO_OFFSET(ptr_fl), count);
}
-extern void __force_link_error__only_in_32bit() __attribute__ ((noreturn));
-#define ASSERT16() do { } while (0)
-#define ASSERT32() __force_link_error__only_in_32bit()
-
#else
-// In 32-bit mode there is no need to mess with the segments.
+// In 32-bit flat mode there is no need to mess with the segments.
#define GET_FARVAR(seg, var) \
(*((typeof(&(var)))MAKE_FLATPTR((seg), &(var))))
#define SET_FARVAR(seg, var, val) \
@@ -184,10 +180,6 @@ extern void __force_link_error__only_in_32bit() __attribute__ ((noreturn));
#define outsw_fl(port, ptr_fl, count) outsw(port, ptr_fl, count)
#define outsl_fl(port, ptr_fl, count) outsl(port, ptr_fl, count)
-extern void __force_link_error__only_in_16bit() __attribute__ ((noreturn));
-#define ASSERT16() __force_link_error__only_in_16bit()
-#define ASSERT32() do { } while (0)
-
#endif
// Definition for common 16bit segment/offset pointers.