diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-12-26 23:32:57 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-12-26 23:32:57 -0500 |
commit | 52a300f1c1ec2d9733d41ecd3ecaf78be48097b8 (patch) | |
tree | aae0fd6884fd93440080f65144d3f7eab327e1b5 /src/pmm.c | |
parent | fe2c3eece930e6d6e9f88e5d4d4ba4ccbe29f9fa (diff) | |
download | seabios-52a300f1c1ec2d9733d41ecd3ecaf78be48097b8.tar.gz |
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/pmm.c')
-rw-r--r-- | src/pmm.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -11,7 +11,7 @@ #include "biosvar.h" // GET_BDA -#if MODE16 +#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)) @@ -26,11 +26,11 @@ struct zone_s { u32 top, bottom, cur; }; -struct zone_s ZoneLow VAR32VISIBLE, ZoneHigh VAR32VISIBLE; -struct zone_s ZoneFSeg VAR32VISIBLE; -struct zone_s ZoneTmpLow VAR32VISIBLE, ZoneTmpHigh VAR32VISIBLE; +struct zone_s ZoneLow VAR32FLATVISIBLE, ZoneHigh VAR32FLATVISIBLE; +struct zone_s ZoneFSeg VAR32FLATVISIBLE; +struct zone_s ZoneTmpLow VAR32FLATVISIBLE, ZoneTmpHigh VAR32FLATVISIBLE; -struct zone_s *Zones[] VAR32VISIBLE = { +struct zone_s *Zones[] VAR32FLATVISIBLE = { &ZoneTmpLow, &ZoneLow, &ZoneFSeg, &ZoneTmpHigh, &ZoneHigh }; @@ -49,7 +49,7 @@ relocate_ebda(u32 newebda, u32 oldebda, u8 ebda_size) return -1; // Do copy - if (MODE16) + if (MODESEGMENT) memcpy_far(FLATPTR_TO_SEG(newebda) , (void*)FLATPTR_TO_OFFSET(newebda) , FLATPTR_TO_SEG(oldebda) @@ -172,7 +172,7 @@ struct pmmalloc_s { struct pmmalloc_s *next; }; -struct pmmalloc_s *PMMAllocs VAR32VISIBLE; +struct pmmalloc_s *PMMAllocs VAR32FLATVISIBLE; // Allocate memory from the given zone and track it as a PMM allocation void * @@ -279,7 +279,7 @@ pmm_find(u32 handle) void malloc_setup() { - ASSERT32(); + ASSERT32FLAT(); dprintf(3, "malloc setup\n"); PMMAllocs = NULL; |