This is a resend of two previous patches that improve the text
emulation of the "coreboot native vga" SeaVGABIOS support. The main
difference in this version is that the support requires both a compile
time define (CONFIG_VGA_EMULATE_TEXT) as well as runtime enablement.
The net effect of this is that the code wont try to blink the cursor
if a bootloader explicitly switches into graphics mode.
This is also available at:
Kevin O'Connor (2):
vgabios: Support emulating text mode attributes while in graphics mode
vgabios: Add software cursor capability
vgasrc/Kconfig | 6 ++++
vgasrc/cbvga.c | 10 +++++--
vgasrc/vbe.c | 5 ++--
vgasrc/vgabios.c | 13 ++++++--
vgasrc/vgabios.h | 14 ++++++++-
vgasrc/vgaentry.S | 30 +++++++++++++++++++
vgasrc/vgafb.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
vgasrc/vgainit.c | 34 +++++++++++++++++++++
8 files changed, 188 insertions(+), 13 deletions(-)
On Sun, Jun 22, 2014 at 05:54:17PM +0200, Idwer Vollering wrote:
> > So, this looks different from Matt's report. What appears to be
> > happening in the above is that the device shows up originally as a
> > high speed device (see "[High]" above). However, when the set_address
> > command is sent to it, it appears that the device effectively
> > disconnects and then reconnects as a super speed device (see "change
> > port #2" and "change port #4" above - port 2==port 4 - see ("offset 1"
> > / "offset 3" above)).
> > You can try increasing the xchi_event_wait timeout which fixes Matt's
> > issue, but I think we tried this on your hardware before with no luck.
> Indeed, changing 1000 to 5000 or USB_TIME_COMMAND in
> src/hw/usb-xhci.c:501 didn't matter.
Can you retry with the patch series I just posted? It's also at:
It may help with this device.
Don't set the device details when changing modes, and don't set mode
details outside of mode setting.
Signed-off-by: Kevin O'Connor <kevin(a)koconnor.net>
vgasrc/vgabios.c | 9 ---------
vgasrc/vgainit.c | 19 ++++++++-----------
2 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 5fdb549..e2a4efc 100644
@@ -326,15 +326,6 @@ vga_set_mode(int mode, int flags)
- // FIXME We nearly have the good tables. to be reworked
- SET_BDA(dcc_index, 0x08); // 8 is VGA should be ok for now
- , SEGOFF(get_global_seg(), (u32)&video_save_pointer_table));
- // FIXME
- SET_BDA(video_msr, 0x00); // Unavailable on vanilla vga, but...
- SET_BDA(video_pal, 0x00); // Unavailable on vanilla vga, but...
// Set the ints 0x1F and 0x43
SET_IVT(0x1f, SEGOFF(get_global_seg(), (u32)&vgafont8[128 * 8]));
diff --git a/vgasrc/vgainit.c b/vgasrc/vgainit.c
index 5c76c5b..c323cf8 100644
@@ -140,20 +140,17 @@ init_bios_area(void)
// set 80x25 color (not clear from RBIL but usual)
- // the default char height
- SET_BDA(char_height, 0x10);
- // Clear the screen
- SET_BDA(video_ctl, 0x60);
- // Set the basic screen we have
- SET_BDA(video_switches, 0xf9);
// Set the basic modeset options
- // Set the default MSR
- SET_BDA(video_msr, 0x09);
+ // FIXME We nearly have the good tables. to be reworked
+ SET_BDA(dcc_index, 0x08); // 8 is VGA should be ok for now
+ , SEGOFF(get_global_seg(), (u32)&video_save_pointer_table));
+ // FIXME
+ SET_BDA(video_msr, 0x00); // Unavailable on vanilla vga, but...
+ SET_BDA(video_pal, 0x00); // Unavailable on vanilla vga, but...
int VgaBDF VAR16 = -1;
The first six patches in this series make the internal usb naming
convention a little more standard. (Use a "usb_" prefix on all
exported functions and don't use camel case on exported functions.)
The remaining five patches convert the USB controller drivers to a
single pipe "realloc" function for managing pipe allocations and
freeing. This should make it easier for xhci to implement pipe
freeing (not implemented in this series).
Kevin O'Connor (11):
usb: Rename ?hci_control() to ?hci_send_control()
usb: Rename usb_getFrameExp() to usb_get_period()
usb: Rename findEndPointDesc() to usb_find_desc()
usb: Rename send_default_control() to usb_send_default_control()
usb: Rename free_pipe() to usb_free_pipe()
usb: Clarify usb freelist manipulations
xhci: Change xhci_update_pipe() to xhci_realloc_pipe() and use for
uhci: Export uhci_realloc_pipe() instead of uhci_alloc_pipe()
ohci: Export ohci_realloc_pipe() instead of ohci_alloc_pipe()
ehci: Export ehci_realloc_pipe() instead of ehci_alloc_pipe()
usb: Use usb_realloc_pipe for pipe alloc, update, and free.
src/hw/usb-ehci.c | 17 +++++----
src/hw/usb-ehci.h | 9 +++--
src/hw/usb-hid.c | 6 +--
src/hw/usb-hub.c | 8 ++--
src/hw/usb-msc.c | 10 ++---
src/hw/usb-ohci.c | 17 +++++----
src/hw/usb-ohci.h | 9 +++--
src/hw/usb-uas.c | 8 ++--
src/hw/usb-uhci.c | 17 +++++----
src/hw/usb-uhci.h | 9 +++--
src/hw/usb-xhci.c | 18 ++++++---
src/hw/usb-xhci.h | 12 +++---
src/hw/usb.c | 109 +++++++++++++++++++++++++++++-------------------------
src/hw/usb.h | 22 ++++++-----
14 files changed, 149 insertions(+), 122 deletions(-)
These two patches implement a software based cursor for the "coreboot
native vga" seavgabios implementation. It implements the cursor by
inverting the pixels in the framebuffer at the character cell that
contains the cursor.
This is a bit of a failed experiment - I do not intend to commit it to
the main git repo as is. The feature works, but it seems to slow down
screen writing significantly. I'm posting this here in case anyone is
interested in playing with it.
I've also put this up at:
I suspect the reason for the slow down is that the majority of
character writes to the screen end up moving the cursor, and on each
cursor move it's required to remove the inverse in the old position
and then add the inverse in the new position. The inverse is
implemented as an xor which requires a cell read followed by a cell
write. Thus, a typical character write used to require writing one
cell's worth of data to the framebuffer, but with this patch takes 5
times more IO (a read/write, a write, a read/write).
If I get time I may play with other approaches. (One I was thinking
of is hooking the BIOS timer irq and only enabling the cursor from
that irq - which should dramatically reduce the amount of cursor
updates when lots of characters are being rendered in bulk.)
Kevin O'Connor (2):
vgabios: Add stubs for software cursor enable/disable
vgabios: Add software cursor capability
vgasrc/Kconfig | 5 +++++
vgasrc/vgabios.c | 40 ++++++++++++++++++++++++++++++++++------
vgasrc/vgabios.h | 2 ++
vgasrc/vgafb.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 90 insertions(+), 6 deletions(-)