- Use the generally more appropriate PROM base rather than the
kernel one as the non-faulting flush address in the loader so we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we ever want to without needing to worry about using a compatible loader. - Correctly check for LOADER_DEBUG. - Add a missing const for page_sizes[].
This commit is contained in:
parent
5d1df4b56d
commit
ceab1bee37
@ -383,7 +383,7 @@ __elfN(exec)(struct preloaded_file *fp)
|
||||
return (error);
|
||||
|
||||
printf("jumping to kernel entry at %#lx.\n", e->e_entry);
|
||||
#if LOADER_DEBUG
|
||||
#ifdef LOADER_DEBUG
|
||||
pmap_print_tlb_sun4u();
|
||||
#endif
|
||||
|
||||
@ -499,7 +499,7 @@ itlb_enter_sun4u(u_long vpn, u_long data)
|
||||
stxa(AA_IMMU_TAR, ASI_IMMU,
|
||||
TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
|
||||
stxa(TLB_DAR_SLOT(i), ASI_ITLB_DATA_ACCESS_REG, data);
|
||||
flush(KERNBASE);
|
||||
flush(PROMBASE);
|
||||
break;
|
||||
}
|
||||
wrpr(pstate, reg, 0);
|
||||
@ -511,7 +511,7 @@ itlb_enter_sun4u(u_long vpn, u_long data)
|
||||
stxa(AA_IMMU_TAR, ASI_IMMU,
|
||||
TLB_TAR_VA(vpn) | TLB_TAR_CTX(TLB_CTX_KERNEL));
|
||||
stxa(0, ASI_ITLB_DATA_IN_REG, data);
|
||||
flush(KERNBASE);
|
||||
flush(PROMBASE);
|
||||
wrpr(pstate, reg, 0);
|
||||
}
|
||||
|
||||
@ -837,7 +837,7 @@ exit(int code)
|
||||
}
|
||||
|
||||
#ifdef LOADER_DEBUG
|
||||
static const char *page_sizes[] = {
|
||||
static const char *const page_sizes[] = {
|
||||
" 8k", " 64k", "512k", " 4m"
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _MACHINE_VMPARAM_H_
|
||||
#define _MACHINE_VMPARAM_H_
|
||||
|
||||
@ -203,6 +202,7 @@
|
||||
#define VM_MAXUSER_ADDRESS (VM_MAX_USER_ADDRESS)
|
||||
|
||||
#define KERNBASE (VM_MIN_KERNEL_ADDRESS)
|
||||
#define PROMBASE (VM_MIN_PROM_ADDRESS)
|
||||
#define USRSTACK (VM_MAX_USER_ADDRESS)
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user