aboutsummaryrefslogtreecommitdiff
path: root/src/system.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-02-19 01:33:45 -0500
committerKevin O'Connor <kevin@koconnor.net>2013-02-19 21:57:24 -0500
commitf85e4bc030e38966b48e8085ba74f58b40603a46 (patch)
treebaa9fd882a3f393d7df0a13ee182bf2b8df73767 /src/system.c
parent0b314abc5841d5d1b25486e604cd91a6b3063e2c (diff)
downloadseabios-hppa-f85e4bc030e38966b48e8085ba74f58b40603a46.zip
seabios-hppa-f85e4bc030e38966b48e8085ba74f58b40603a46.tar.gz
seabios-hppa-f85e4bc030e38966b48e8085ba74f58b40603a46.tar.bz2
Calculate "RamSize" needed by 16bit interface dynamically.
Calculate a LegacyRamSize directly from the e820 map for use by handle_1588() and handle_15e801() (the only two external interfaces that require "RamSize"). All other users of the existing RamSize (and RamSizeOver4G) variables are specific to QEMU, so move the declarations to paravirt.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/system.c')
-rw-r--r--src/system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/system.c b/src/system.c
index dc1dd7d..7b481a8 100644
--- a/src/system.c
+++ b/src/system.c
@@ -174,7 +174,7 @@ handle_1587(struct bregs *regs)
static void
handle_1588(struct bregs *regs)
{
- u32 rs = GET_GLOBAL(RamSize);
+ u32 rs = GET_GLOBAL(LegacyRamSize);
// According to Ralf Brown's interrupt the limit should be 15M,
// but real machines mostly return max. 63M.
@@ -270,7 +270,7 @@ handle_15e801(struct bregs *regs)
// regs.u.r16.ax = 0;
// regs.u.r16.bx = 0;
- u32 rs = GET_GLOBAL(RamSize);
+ u32 rs = GET_GLOBAL(LegacyRamSize);
// Get the amount of extended memory (above 1M)
if (rs > 16*1024*1024) {