Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/pseries/platform_chrp.c
Show First 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
#ifdef __powerpc64__ | #ifdef __powerpc64__ | ||||
int i; | int i; | ||||
/* XXX: check for /rtas/ibm,hypertas-functions? */ | /* XXX: check for /rtas/ibm,hypertas-functions? */ | ||||
if (!(mfmsr() & PSL_HV)) { | if (!(mfmsr() & PSL_HV)) { | ||||
struct mem_region *phys, *avail; | struct mem_region *phys, *avail; | ||||
int nphys, navail; | int nphys, navail; | ||||
vm_offset_t off; | |||||
mem_regions(&phys, &nphys, &avail, &navail); | mem_regions(&phys, &nphys, &avail, &navail); | ||||
realmaxaddr = phys[0].mr_size; | |||||
realmaxaddr = 0; | |||||
for (i = 0; i < nphys; i++) { | |||||
off = phys[i].mr_start + phys[i].mr_size; | |||||
realmaxaddr = MAX(off, realmaxaddr); | |||||
jhibbits: realmaxaddr = MAX(off, realmaxaddr) should do the same thing. | |||||
Done Inline ActionsRight, I'll change this part to use MAX. luporl: Right, I'll change this part to use MAX. | |||||
} | |||||
pmap_mmu_install("mmu_phyp", BUS_PROBE_SPECIFIC); | pmap_mmu_install("mmu_phyp", BUS_PROBE_SPECIFIC); | ||||
cpu_idle_hook = phyp_cpu_idle; | cpu_idle_hook = phyp_cpu_idle; | ||||
/* Set up important VPA fields */ | /* Set up important VPA fields */ | ||||
for (i = 0; i < MAXCPU; i++) { | for (i = 0; i < MAXCPU; i++) { | ||||
/* First two: VPA size */ | /* First two: VPA size */ | ||||
splpar_vpa[i][4] = | splpar_vpa[i][4] = | ||||
▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines |
realmaxaddr = MAX(off, realmaxaddr) should do the same thing.