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.
This commit is contained in:
parent
3e50771086
commit
44633af3c7
@ -258,6 +258,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
|
|||||||
char *env;
|
char *env;
|
||||||
register_t msr, scratch;
|
register_t msr, scratch;
|
||||||
uint8_t *cache_check;
|
uint8_t *cache_check;
|
||||||
|
int cacheline_warn;
|
||||||
#ifndef __powerpc64__
|
#ifndef __powerpc64__
|
||||||
int ppc64;
|
int ppc64;
|
||||||
#endif
|
#endif
|
||||||
@ -265,6 +266,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
|
|||||||
end = 0;
|
end = 0;
|
||||||
kmdp = NULL;
|
kmdp = NULL;
|
||||||
trap_offset = 0;
|
trap_offset = 0;
|
||||||
|
cacheline_warn = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse metadata if present and fetch parameters. Must be done
|
* 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
|
* 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();
|
msr = mfmsr();
|
||||||
@ -387,7 +390,7 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
|
|||||||
|
|
||||||
/* Work around psim bug */
|
/* Work around psim bug */
|
||||||
if (cacheline_size == 0) {
|
if (cacheline_size == 0) {
|
||||||
printf("WARNING: cacheline size undetermined, setting to 32\n");
|
cacheline_warn = 1;
|
||||||
cacheline_size = 32;
|
cacheline_size = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,6 +499,11 @@ powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
|
|||||||
mtmsr(msr);
|
mtmsr(msr);
|
||||||
isync();
|
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.
|
* Choose a platform module so we can get the physical memory map.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user