[coreboot] New patch to review for coreboot: 6d10403 VIA chipsets: fix compilation without real mode code

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Nov 14 02:02:52 CET 2012


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1833

-gerrit

commit 6d1040399eae186c146ecad2bf1b0e79fd082e6d
Author: Stefan Reinauer <reinauer at chromium.org>
Date:   Tue Nov 13 12:49:59 2012 -0800

    VIA chipsets: fix compilation without real mode code
    
    The VIA chipsets CX700, VT8623 and VX800 required to be
    configured with real mode option rom code enabled. This
    patch fixes the issue and drops some unneeded header files.
    
    Change-Id: I0d8a3f8f99c2eacec7666f08f85b99f09c06af84
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
 src/northbridge/via/cx700/northbridge.c  |  1 -
 src/northbridge/via/cx700/northbridge.h  | 26 --------------------------
 src/northbridge/via/cx700/vga.c          |  6 +++++-
 src/northbridge/via/vt8623/northbridge.c |  1 -
 src/northbridge/via/vt8623/northbridge.h |  8 --------
 src/northbridge/via/vt8623/vga.c         |  6 +++++-
 src/northbridge/via/vx800/northbridge.c  |  1 -
 src/northbridge/via/vx800/northbridge.h  | 27 ---------------------------
 src/northbridge/via/vx800/vga.c          |  6 +++++-
 9 files changed, 15 insertions(+), 67 deletions(-)

diff --git a/src/northbridge/via/cx700/northbridge.c b/src/northbridge/via/cx700/northbridge.c
index 1df9ce0..3d7137e 100644
--- a/src/northbridge/via/cx700/northbridge.c
+++ b/src/northbridge/via/cx700/northbridge.c
@@ -29,7 +29,6 @@
 #include <bitops.h>
 #include <cpu/cpu.h>
 #include <cpu/x86/mtrr.h>
-#include "northbridge.h"
 
 #if CONFIG_WRITE_HIGH_TABLES
 #include <cbmem.h>
diff --git a/src/northbridge/via/cx700/northbridge.h b/src/northbridge/via/cx700/northbridge.h
deleted file mode 100644
index c651bfe..0000000
--- a/src/northbridge/via/cx700/northbridge.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#ifndef NORTHBRIDGE_VIA_CX700_H
-#define NORTHBRIDGE_VIA_CX700_H
-
-extern unsigned int cx700_scan_root_bus(device_t root, unsigned int max);
-extern void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx,
-		u32 esi, u32 edi) __attribute__((regparm(0)));
-#endif				/* NORTHBRIDGE_VIA_CX700_H */
diff --git a/src/northbridge/via/cx700/vga.c b/src/northbridge/via/cx700/vga.c
index 821edc4..c6bf72e 100644
--- a/src/northbridge/via/cx700/vga.c
+++ b/src/northbridge/via/cx700/vga.c
@@ -31,7 +31,9 @@
 #include <cpu/x86/msr.h>
 #include <arch/interrupt.h>
 #include "registers.h"
-#include "northbridge.h"
+#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
+#include <devices/oprom/x86.h>
+#endif
 
 /* PCI Domain 1 Device 0 Function 0 */
 
@@ -145,6 +147,7 @@ static void write_protect_vgabios(void)
 
 static void vga_enable_console(void)
 {
+#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
 	/* Call VGA BIOS int10 function 0x4f14 to enable main console
 	 * Epia-M does not always autosense the main console so forcing
 	 * it on is good.
@@ -152,6 +155,7 @@ static void vga_enable_console(void)
 
 	/*                 int#,    EAX,    EBX,    ECX,    EDX,    ESI,    EDI */
 	realmode_interrupt(0x10, 0x4f14, 0x8003, 0x0001, 0x0000, 0x0000, 0x0000);
+#endif
 }
 
 static void vga_init(device_t dev)
diff --git a/src/northbridge/via/vt8623/northbridge.c b/src/northbridge/via/vt8623/northbridge.c
index 76cd7a0..42864e0 100644
--- a/src/northbridge/via/vt8623/northbridge.c
+++ b/src/northbridge/via/vt8623/northbridge.c
@@ -11,7 +11,6 @@
 #include <cpu/cpu.h>
 #include <cpu/x86/mtrr.h>
 #include <cpu/x86/msr.h>
-#include "northbridge.h"
 
 /*
  * This fixup is based on capturing values from an Award BIOS.  Without
diff --git a/src/northbridge/via/vt8623/northbridge.h b/src/northbridge/via/vt8623/northbridge.h
deleted file mode 100644
index 176a590..0000000
--- a/src/northbridge/via/vt8623/northbridge.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef NORTHBRIDGE_VIA_VT8623_H
-#define NORTHBRIDGE_VIA_VT8623_H
-
-unsigned int vt8623_scan_root_bus(device_t root, unsigned int max);
-extern void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx,
-		u32 esi, u32 edi) __attribute__((regparm(0)));
-
-#endif /* NORTHBRIDGE_VIA_VT8623_H */
diff --git a/src/northbridge/via/vt8623/vga.c b/src/northbridge/via/vt8623/vga.c
index 20857a6..dffe7cb 100644
--- a/src/northbridge/via/vt8623/vga.c
+++ b/src/northbridge/via/vt8623/vga.c
@@ -30,7 +30,9 @@
 #include <cpu/x86/mtrr.h>
 #include <cpu/x86/msr.h>
 #include <arch/interrupt.h>
-#include "northbridge.h"
+#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
+#include <devices/oprom/x86.h>
+#endif
 
 static int via_vt8623_int15_handler(struct eregs *regs)
 {
@@ -99,6 +101,7 @@ static void vga_random_fixup(device_t dev)
 
 static void vga_enable_console(void)
 {
+#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
 	/* Call VGA BIOS int10 function 0x4f14 to enable main console
 	 * Epia-M does not always autosense the main console so forcing
 	 * it on is good.
@@ -106,6 +109,7 @@ static void vga_enable_console(void)
 
 	/*                 int#,    EAX,    EBX,    ECX,    EDX,    ESI,    EDI */
 	realmode_interrupt(0x10, 0x4f14, 0x8003, 0x0001, 0x0000, 0x0000, 0x0000);
+#endif
 }
 
 static void vga_init(device_t dev)
diff --git a/src/northbridge/via/vx800/northbridge.c b/src/northbridge/via/vx800/northbridge.c
index 6274e23..5fcff76 100644
--- a/src/northbridge/via/vx800/northbridge.c
+++ b/src/northbridge/via/vx800/northbridge.c
@@ -31,7 +31,6 @@
 #include <string.h>
 #include <bitops.h>
 #include <cpu/cpu.h>
-#include "northbridge.h"
 #include "vx800.h"
 
 /* !!FIXME!!  This was meant to be a CONFIG option */
diff --git a/src/northbridge/via/vx800/northbridge.h b/src/northbridge/via/vx800/northbridge.h
deleted file mode 100644
index 4b51bb7..0000000
--- a/src/northbridge/via/vx800/northbridge.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2009 One Laptop per Child, Association, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
- */
-
-#ifndef NORTHBRIDGE_VIA_VX800_H
-#define NORTHBRIDGE_VIA_VX800_H
-
-extern unsigned int vx800_scan_root_bus(device_t root, unsigned int max);
-extern void (*realmode_interrupt)(u32 intno, u32 eax, u32 ebx, u32 ecx, u32 edx,
-		u32 esi, u32 edi) __attribute__((regparm(0)));
-
-#endif				/* NORTHBRIDGE_VIA_VX800_H */
diff --git a/src/northbridge/via/vx800/vga.c b/src/northbridge/via/vx800/vga.c
index bb7de9e..c3ae224 100644
--- a/src/northbridge/via/vx800/vga.c
+++ b/src/northbridge/via/vx800/vga.c
@@ -33,7 +33,9 @@
 #include <cpu/x86/mtrr.h>
 #include <cpu/x86/msr.h>
 #include <arch/interrupt.h>
-#include "northbridge.h"
+#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
+#include <devices/oprom/x86.h>
+#endif
 
 /* PCI Domain 1 Device 0 Function 0 */
 
@@ -145,6 +147,7 @@ static void write_protect_vgabios(void)
 
 static void vga_enable_console(void)
 {
+#if CONFIG_PCI_OPTION_ROM_RUN_REALMODE
 	/* Call VGA BIOS int10 function 0x4f14 to enable main console
 	 * Epia-M does not always autosense the main console so forcing
 	 * it on is good.
@@ -152,6 +155,7 @@ static void vga_enable_console(void)
 
 	/*                 int#,    EAX,    EBX,    ECX,    EDX,    ESI,    EDI */
 	realmode_interrupt(0x10, 0x4f14, 0x8003, 0x0001, 0x0000, 0x0000, 0x0000);
+#endif
 }
 
 extern u8 acpi_sleep_type;




More information about the coreboot mailing list