mac68k_video
if (addr != mac68k_video.mv_phys &&
&& (addr == mac68k_video.mv_phys));
macfb_cnattach(mac68k_video.mv_phys);
dc->dc_vaddr = m68k_trunc_page(mac68k_video.mv_kvaddr);
dc->dc_paddr = m68k_trunc_page(mac68k_video.mv_phys);
dc->dc_wid = mac68k_video.mv_width;
dc->dc_ht = mac68k_video.mv_height;
dc->dc_depth = mac68k_video.mv_depth;
dc->dc_rowbytes = mac68k_video.mv_stride;
dc->dc_size = (mac68k_video.mv_len > 0) ?
mac68k_video.mv_len : dc->dc_ht * dc->dc_rowbytes;
dc->dc_offset = m68k_page_offset(mac68k_video.mv_phys);
extern struct mac68k_video mac68k_video;
struct mac68k_video mac68k_video;
for (i = 0; i < 10 * mac68k_video.mv_stride / 4; i++)
((u_long *)mac68k_video.mv_kvaddr)
for (i = 0; i < 2 * mac68k_video.mv_stride / 4; i++)
((u_long *)mac68k_video.mv_kvaddr)
if (!get_physical(mac68k_video.mv_kvaddr, &phys)) {
mac68k_video.mv_log = mac68k_video.mv_kvaddr;
mac68k_video.mv_phys = phys;
mac68k_video.mv_len = 32768;
addr = mac68k_video.mv_kvaddr + 32768;
if ((phys - mac68k_video.mv_phys)
!= mac68k_video.mv_len)
if (mac68k_video.mv_len + 32768 > limit) {
mac68k_video.mv_len = maxm;
mac68k_video.mv_len += 32768;
id, (void *)mac68k_video.mv_log,
(void *)mac68k_video.mv_phys);
printf("len 0x%x.\n", mac68k_video.mv_len);
if (!get_physical(mac68k_video.mv_kvaddr, &phys))
phys = mac68k_video.mv_kvaddr;
mac68k_video.mv_phys = phys & ~iip->fbmask;
mac68k_video.mv_len = 32768 - (phys & 0x7fff);
limit = iip->fbbase + iip->fblen - mac68k_video.mv_phys;
if (mac68k_video.mv_len > limit) {
mac68k_video.mv_len = limit;
addr = mac68k_video.mv_kvaddr + mac68k_video.mv_len;
if ((phys - mac68k_video.mv_phys) !=
mac68k_video.mv_len)
if ((mac68k_video.mv_phys + 32768) > limit) {
mac68k_video.mv_len = limit;
mac68k_video.mv_len += 32768;
if (mac68k_video.mv_len > 0) {
(void *)mac68k_video.mv_kvaddr,
(void *)mac68k_video.mv_phys,
mac68k_video.mv_len);
mac68k_video.mv_log = nblog[i] - nbphys[i];
mac68k_video.mv_len = nblen[i] + nbphys[i];
mac68k_video.mv_phys = 0;
if (0x60000000 <= mac68k_video.mv_kvaddr
&& mac68k_video.mv_kvaddr < 0x70000000) {
} else if (0x50F40000 <= mac68k_video.mv_kvaddr
&& mac68k_video.mv_kvaddr < 0x50FBFFFF) {
} else if (0x50100100 <= mac68k_video.mv_kvaddr
&& mac68k_video.mv_kvaddr < 0x50400000) {
mac68k_video.mv_kvaddr);
(void *)mac68k_video.mv_kvaddr);
(void *)mac68k_video.mv_log);
mac68k_video.mv_len, mac68k_video.mv_len);
int reqsize = mac68k_video.mv_height * mac68k_video.mv_stride;
if (mac68k_video.mv_len < reqsize)
mac68k_video.mv_len = reqsize;
mac68k_video.mv_phys = mac68k_video.mv_kvaddr;
vidlen = m68k_round_page(mac68k_video.mv_height *
mac68k_video.mv_stride + m68k_page_offset(mac68k_video.mv_phys));
m68k_trunc_page(mac68k_video.mv_phys);
newvideoaddr += m68k_page_offset(mac68k_video.mv_phys);
(void *)mac68k_video.mv_kvaddr, (void *)newvideoaddr);
mac68k_video.mv_kvaddr = newvideoaddr;
mac68k_video.mv_kvaddr = getenv("VIDEO_ADDR");
mac68k_video.mv_stride = getenv("ROW_BYTES");
mac68k_video.mv_depth = getenv("SCREEN_DEPTH");
mac68k_video.mv_width = getenv("DIMENSIONS") & 0xffff;
mac68k_video.mv_height = (getenv("DIMENSIONS") >> 16) & 0xffff;
protopte = m68k_trunc_page(mac68k_video.mv_phys) |
+ m68k_page_offset(mac68k_video.mv_phys);
if (mac68k_video.mv_len == 0 ||
if (mac68k_video.mv_len == 0)
if (sc->sc_basepa <= mac68k_video.mv_phys &&
mac68k_video.mv_phys < (sc->sc_basepa + length)) {
mac68k_video.mv_phys - sc->sc_basepa;
m68k_trunc_page(mac68k_video.mv_phys);
m68k_page_offset(mac68k_video.mv_phys);
length = mac68k_video.mv_len + sc->sc_fbofs;
if (mac68k_video.mv_phys >= sc->sc_basepa &&
mac68k_video.mv_phys < (sc->sc_basepa + length)) {
sc->sc_fbofs = mac68k_video.mv_phys - sc->sc_basepa;
sc->sc_basepa = m68k_trunc_page(mac68k_video.mv_phys);
sc->sc_fbofs = m68k_page_offset(mac68k_video.mv_phys);
length = mac68k_video.mv_len + sc->sc_fbofs;
sc->sc_basepa = m68k_trunc_page(mac68k_video.mv_phys);
sc->sc_fbofs = m68k_page_offset(mac68k_video.mv_phys);
length = mac68k_video.mv_len + sc->sc_fbofs;
sc->sc_basepa = m68k_trunc_page(mac68k_video.mv_phys);
sc->sc_fbofs = m68k_page_offset(mac68k_video.mv_phys);
length = mac68k_video.mv_len + sc->sc_fbofs;
if (sc->sc_basepa <= mac68k_video.mv_phys &&
mac68k_video.mv_phys < (sc->sc_basepa + length)) {
mac68k_video.mv_kvaddr = sc->sc_handle.base + sc->sc_fbofs;
gm->psize = mac68k_video.mv_depth;
gm->width = mac68k_video.mv_width;
gm->height = mac68k_video.mv_height;
gm->rowbytes = mac68k_video.mv_stride;
size_t depth = mac68k_video.mv_depth; \
index += 256 - (1 << mac68k_video.mv_depth);