Timothy Pearson (tpearson@raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8360
-gerrit
commit 23310233d6bdeaf367682ff1075a1f9330f7359c Author: Timothy Pearson tpearson@raptorengineeringinc.com Date: Thu Feb 5 01:02:57 2015 -0600
drivers/xgi: Fix legacy VGA text mode initialization
TEST: Booted KFSN4-DRE with on-board XGI Volari Z9s Initial text from coreboot appeared, and the Linux console was displayed immediately at the start of kernel initialization. After boot was complete the text mode console continued to behave normally.
SeaBIOS does not currently make use of the legacy VGA text-mode display.
Change-Id: I2177a1d00e6f07db661dd99fe0184e2c228404d1 Signed-off-by: Timothy Pearson tpearson@raptorengineeringinc.com --- src/drivers/xgi/common/XGI_main.h | 1 + src/drivers/xgi/common/vb_init.c | 3 ++- src/drivers/xgi/common/xgi_coreboot.c | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/src/drivers/xgi/common/XGI_main.h b/src/drivers/xgi/common/XGI_main.h index cd9b84a..7b91d9f 100644 --- a/src/drivers/xgi/common/XGI_main.h +++ b/src/drivers/xgi/common/XGI_main.h @@ -108,6 +108,7 @@ static const struct _XGIbios_mode { { 0x70, 0x0000, 0x0000, 800, 480, 8, MD_XGI315 }, { 0x7a, 0x0000, 0x0000, 800, 480, 16, MD_XGI315 }, { 0x76, 0x0000, 0x0000, 800, 480, 32, MD_XGI315 }, +#define DEFAULT_TEXT_MODE 16 /* index for 800x600x8 */ { 0x30, 0x0103, 0x0103, 800, 600, 8, MD_XGI315 }, #define DEFAULT_MODE 17 /* index for 800x600x16 */ { 0x47, 0x0114, 0x0114, 800, 600, 16, MD_XGI315 }, diff --git a/src/drivers/xgi/common/vb_init.c b/src/drivers/xgi/common/vb_init.c index 2b81605..2e9a242 100644 --- a/src/drivers/xgi/common/vb_init.c +++ b/src/drivers/xgi/common/vb_init.c @@ -854,7 +854,8 @@ static void XGINew_SetDRAMSize_340(struct xgifb_video_info *xgifb_info,
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress;
- XGISetModeNew(xgifb_info, HwDeviceExtension, 0x2e); + if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) + XGISetModeNew(xgifb_info, HwDeviceExtension, 0x2e);
data = xgifb_reg_get(pVBInfo->P3c4, 0x21); /* disable read cache */ diff --git a/src/drivers/xgi/common/xgi_coreboot.c b/src/drivers/xgi/common/xgi_coreboot.c index 84ed81a..fa2ff35 100755 --- a/src/drivers/xgi/common/xgi_coreboot.c +++ b/src/drivers/xgi/common/xgi_coreboot.c @@ -265,7 +265,10 @@ int xgifb_probe(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info) xgifb_info->mode_idx = XGIfb_GetXG21DefaultLVDSModeIdx(xgifb_info); else - xgifb_info->mode_idx = DEFAULT_MODE; + if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) + xgifb_info->mode_idx = DEFAULT_MODE; + else + xgifb_info->mode_idx = DEFAULT_TEXT_MODE; }
if (xgifb_info->mode_idx < 0) { @@ -406,10 +409,16 @@ int xgifb_modeset(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info) } #else /* FIXME - * Text mode does not work + * Text mode is slightly unstable/jittery (bad/incomplete DDR init?) */ + + /* Initialize standard VGA text mode */ vga_io_init(); vga_textmode_init(); + printk(BIOS_INFO, "XGI VGA text mode initialized\n"); + + /* if we don't have console, at least print something... */ + vga_line_write(0, "XGI VGA text mode initialized"); #endif
return 0;