- Declare sparc64_memreg and sparc64_nmemreg in machine/ofw_mem.h.

- On startup print the total physical memory, instead of what we're told is
  free by the firmware, to avoid astonishing users.
This commit is contained in:
jake 2003-06-07 18:29:29 +00:00
parent da37394134
commit 03ec9aa3d8
4 changed files with 11 additions and 8 deletions

View File

@ -40,4 +40,7 @@ struct ofw_map {
u_long om_tte;
};
extern struct ofw_mem_region sparc64_memreg[];
extern int sparc64_nmemreg;
#endif

View File

@ -46,9 +46,6 @@
CTASSERT(sizeof(struct kerneldumpheader) == DEV_BSIZE);
extern struct ofw_mem_region sparc64_memreg[];
extern int sparc64_nmemreg;
static struct kerneldumpheader kdh;
static off_t dumplo, dumppos;

View File

@ -97,6 +97,7 @@
#include <machine/md_var.h>
#include <machine/metadata.h>
#include <machine/ofw_machdep.h>
#include <machine/ofw_mem.h>
#include <machine/smp.h>
#include <machine/pmap.h>
#include <machine/pstate.h>
@ -162,6 +163,8 @@ CTASSERT(sizeof(struct pcpu) <= ((PCPU_PAGES * PAGE_SIZE) / 2));
static void
cpu_startup(void *arg)
{
vm_paddr_t physsz;
int i;
tick_tc.tc_get_timecount = tick_get_timecount;
tick_tc.tc_poll_pps = NULL;
@ -170,8 +173,11 @@ cpu_startup(void *arg)
tick_tc.tc_name = "tick";
tc_init(&tick_tc);
printf("real memory = %lu (%lu MB)\n", physmem * PAGE_SIZE,
physmem / ((1024 * 1024) / PAGE_SIZE));
physsz = 0;
for (i = 0; i < sparc64_nmemreg; i++)
physsz += sparc64_memreg[i].mr_size;
printf("real memory = %lu (%lu MB)\n", physsz,
physsz / (1024 * 1024));
vm_ksubmap_init(&kmi);

View File

@ -80,9 +80,6 @@
#include <machine/tlb.h>
#include <machine/tstate.h>
extern struct ofw_mem_region sparc64_memreg[];
extern int sparc64_nmemreg;
PMAP_STATS_VAR(uma_nsmall_alloc);
PMAP_STATS_VAR(uma_nsmall_alloc_oc);
PMAP_STATS_VAR(uma_nsmall_free);