From: Kevin O'Connor Date: Fri, 17 Oct 2014 04:20:14 +0000 (-0400) Subject: vgabios: Add support for reading framebuffer in "direct" mode X-Git-Tag: rel-1.8.0~52 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=136d4ec190af616bb4fa8624dd9c648e5c9e0d2a;p=seabios.git vgabios: Add support for reading framebuffer in "direct" mode Support reading high memory "direct" framebuffers and translating the results to 8 bit attribute values. Signed-off-by: Kevin O'Connor --- diff --git a/vgasrc/vgafb.c b/vgasrc/vgafb.c index 0100080..bb27660 100644 --- a/vgasrc/vgafb.c +++ b/vgasrc/vgafb.c @@ -236,9 +236,31 @@ get_color(int depth, u8 attr) int r = (attr&4) ? 2 : 0, g = (attr&2) ? 2 : 0, b = (attr&1) ? 2 : 0; if ((attr & 0xf) == 6) g = 1; - return ((((((1<> (gbits+bbits)) & ((1<> bbits) & ((1<x * bypp); switch (op->op) { default: - case GO_READ8: - // XXX - not implemented. + case GO_READ8: { + u8 data[64]; + memcpy_high(MAKE_FLATPTR(GET_SEG(SS), data), dest_far, bypp * 8); + int i; + for (i=0; i<8; i++) + op->pixels[i] = reverse_color(depth, *(u32*)&data[i*bypp]); break; + } case GO_WRITE8: { u8 data[64]; int i;