diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-19 21:53:37 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-12-19 21:53:37 +0000 |
commit | d746971c0c409e53e144c6c06e07d8594cd805ec (patch) | |
tree | 09357109a4f0380dc40e81c52d1379e7e5a29b4a /sys/arch | |
parent | 060004eb1d901c43549a8de5a7c1bedff49318be (diff) |
Use the real physical memory size for physmem, rather than what's left after
the PROM has eaten part of it, so that the reported memory size in dmesg is
a nice round number.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/aviion/aviion/av400_machdep.c | 13 | ||||
-rw-r--r-- | sys/arch/aviion/aviion/machdep.c | 3 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/aviion/aviion/av400_machdep.c b/sys/arch/aviion/aviion/av400_machdep.c index 4f16206412d..7d7271f1a69 100644 --- a/sys/arch/aviion/aviion/av400_machdep.c +++ b/sys/arch/aviion/aviion/av400_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: av400_machdep.c,v 1.10 2007/12/13 18:51:01 miod Exp $ */ +/* $OpenBSD: av400_machdep.c,v 1.11 2007/12/19 21:53:36 miod Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat. * @@ -219,17 +219,20 @@ u_int32_t int_mask_val[INT_LEVEL] = { vaddr_t av400_memsize() { - vaddr_t memsize; + vaddr_t memsize0, memsize1; - memsize = scm_memsize(1); + memsize0 = scm_memsize(0); + memsize1 = scm_memsize(1); /* * What we got is the ``top of memory'', i.e. the largest addressable * word address, ending in 0xffc. Round up to a multiple of a page. */ - memsize = round_page(memsize); + memsize0 = round_page(memsize0); + memsize1 = round_page(memsize1); - return (memsize); + physmem = atop(memsize0); + return (memsize1); } void diff --git a/sys/arch/aviion/aviion/machdep.c b/sys/arch/aviion/aviion/machdep.c index d6161ab72c4..d80ed3bde3e 100644 --- a/sys/arch/aviion/aviion/machdep.c +++ b/sys/arch/aviion/aviion/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.18 2007/12/13 18:51:01 miod Exp $ */ +/* $OpenBSD: machdep.c,v 1.19 2007/12/19 21:53:36 miod Exp $ */ /* * Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr. * Copyright (c) 1996 Nivas Madhur @@ -809,7 +809,6 @@ aviion_bootstrap() first_addr = round_page(first_addr); last_addr = platform->memsize(); - physmem = btoc(last_addr); setup_board_config(); master_cpu = cmmu_init(); |