From 93d994894364bdecb9f9cbc4539050f173e14072 Mon Sep 17 00:00:00 2001 From: grehan Date: Tue, 14 Sep 2010 03:18:11 +0000 Subject: Resurrect PSIM support by moving the cacheline size-detection warning printf outside of the MMU-disabled region. A call into OpenFirmware with the MMU off resulted in an internal PSIM assert. --- sys/powerpc/aim/machdep.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sys/powerpc') diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index ba06531..a197681 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -258,6 +258,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, char *env; register_t msr, scratch; uint8_t *cache_check; + int cacheline_warn; #ifndef __powerpc64__ int ppc64; #endif @@ -265,6 +266,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, end = 0; kmdp = NULL; trap_offset = 0; + cacheline_warn = 0; /* * Parse metadata if present and fetch parameters. Must be done @@ -360,7 +362,8 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, /* * Disable translation in case the vector area hasn't been - * mapped (G5). + * mapped (G5). Note that no OFW calls can be made until + * translation is re-enabled. */ msr = mfmsr(); @@ -387,7 +390,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, /* Work around psim bug */ if (cacheline_size == 0) { - printf("WARNING: cacheline size undetermined, setting to 32\n"); + cacheline_warn = 1; cacheline_size = 32; } @@ -496,6 +499,11 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, mtmsr(msr); isync(); + /* Warn if cachline size was not determined */ + if (cacheline_warn == 1) { + printf("WARNING: cacheline size undetermined, setting to 32\n"); + } + /* * Choose a platform module so we can get the physical memory map. */ -- cgit v1.1