Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/vt/hw/ofwfb/ofwfb.c
Show First 20 Lines • Show All 483 Lines • ▼ Show 20 Lines | #endif | ||||
} | } | ||||
if (fb_phys == num_pciaddrs) /* No candidates found */ | if (fb_phys == num_pciaddrs) /* No candidates found */ | ||||
return (CN_DEAD); | return (CN_DEAD); | ||||
#if defined(__powerpc__) | #if defined(__powerpc__) | ||||
OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase, | OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase, | ||||
NULL); | NULL); | ||||
sc->fb.fb_pbase = sc->fb.fb_vbase; /* 1:1 mapped */ | sc->fb.fb_pbase = sc->fb.fb_vbase & ~DMAP_BASE_ADDRESS; | ||||
#ifdef __powerpc64__ | #ifdef __powerpc64__ | ||||
/* Real mode under a hypervisor probably doesn't cover FB */ | /* Real mode under a hypervisor probably doesn't cover FB */ | ||||
if (!(mfmsr() & (PSL_HV | PSL_DR))) | if (!(mfmsr() & (PSL_HV | PSL_DR))) | ||||
sc->fb.fb_flags |= FB_FLAG_NOWRITE; | sc->fb.fb_flags |= FB_FLAG_NOWRITE; | ||||
#endif | #endif | ||||
#else | #else | ||||
/* No ability to interpret assigned-addresses otherwise */ | /* No ability to interpret assigned-addresses otherwise */ | ||||
return (CN_DEAD); | return (CN_DEAD); | ||||
Show All 10 Lines |