aboutsummaryrefslogtreecommitdiff
path: root/src/pmm.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-12-27 00:14:26 -0500
committerKevin O'Connor <kevin@koconnor.net>2009-12-27 00:14:26 -0500
commiteda2c83bfa9d54a6f751e31ea555e53966f60272 (patch)
treec7ab2210c2b585e463a3654bbf9cf6d65c687560 /src/pmm.c
parent52a300f1c1ec2d9733d41ecd3ecaf78be48097b8 (diff)
downloadseabios-hppa-eda2c83bfa9d54a6f751e31ea555e53966f60272.zip
seabios-hppa-eda2c83bfa9d54a6f751e31ea555e53966f60272.tar.gz
seabios-hppa-eda2c83bfa9d54a6f751e31ea555e53966f60272.tar.bz2
Only add "addr32" to memory accesses that require them.
Extract out addr32 to a parameter to the READx/WRITEx_SEG macros.
Diffstat (limited to 'src/pmm.c')
-rw-r--r--src/pmm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pmm.c b/src/pmm.c
index a72167b..d05cc6f 100644
--- a/src/pmm.c
+++ b/src/pmm.c
@@ -14,8 +14,13 @@
#if MODESEGMENT
// The 16bit pmm entry points runs in "big real" mode, and can
// therefore read/write to the 32bit malloc variables.
-#define GET_PMMVAR(var) GET_FARVAR(0, (var))
-#define SET_PMMVAR(var, val) SET_FARVAR(0, (var), (val))
+#define GET_PMMVAR(var) ({ \
+ SET_SEG(ES, 0); \
+ __GET_VAR("addr32 ", ES, (var)); })
+#define SET_PMMVAR(var, val) do { \
+ SET_SEG(ES, 0); \
+ __SET_VAR("addr32 ", ES, (var), (val)); \
+ } while (0)
#else
#define GET_PMMVAR(var) (var)
#define SET_PMMVAR(var, val) do { (var) = (val); } while (0)