diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-12-27 00:14:26 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-12-27 00:14:26 -0500 |
commit | eda2c83bfa9d54a6f751e31ea555e53966f60272 (patch) | |
tree | c7ab2210c2b585e463a3654bbf9cf6d65c687560 /src/pmm.c | |
parent | 52a300f1c1ec2d9733d41ecd3ecaf78be48097b8 (diff) | |
download | seabios-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.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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) |