[SerialICE] New patch to review for serialice: e8268ed SerialICE: Add support for VIA EPIA M-850 mainboard

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Sat Jul 7 05:56:40 CEST 2012


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1183

-gerrit

commit e8268ed8a6d251dc4b9e37461c2e590ff3ba2aba
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Fri Jul 6 22:42:00 2012 -0500

    SerialICE: Add support for VIA EPIA M-850 mainboard
    
    Add code to initialize the serial port on the M-850 and create
    a working SerialICE rom.
    
    Change-Id: Ie6639f62383e3acc64259d339b5a51bbf123d38d
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 SerialICE/Kconfig                   |    4 ++
 SerialICE/mainboard/via_epia_m850.c |   64 +++++++++++++++++++++++++++++++++++
 2 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/SerialICE/Kconfig b/SerialICE/Kconfig
index aab5249..9844b4a 100644
--- a/SerialICE/Kconfig
+++ b/SerialICE/Kconfig
@@ -105,6 +105,9 @@ config BOARD_ASUS_P4P800_VM
 config BOARD_AOPEN_DXPL_PLUS
 	bool "AOpen DXPL Plus"
 
+config BOARD_VIA_EPIA_M850
+	bool "VIA EPIA M850"
+
 endchoice
 
 config BOARD_INIT
@@ -132,6 +135,7 @@ config BOARD_INIT
 	default "asrock_p4i65gv.c" if BOARD_ASROCK_P4I65GV
 	default "asus_p4p800-vm.c" if BOARD_ASUS_P4P800_VM
 	default "aopen_dxpl-plus.c" if BOARD_AOPEN_DXPL_PLUS
+	default "via_epia_m850.c" if BOARD_VIA_EPIA_M850
 
 config SOUTHBRIDGE_INIT
 	string
diff --git a/SerialICE/mainboard/via_epia_m850.c b/SerialICE/mainboard/via_epia_m850.c
new file mode 100644
index 0000000..6446c61
--- /dev/null
+++ b/SerialICE/mainboard/via_epia_m850.c
@@ -0,0 +1,64 @@
+/*
+ * This file is part of the SerialICE project.
+ *
+ * Copyright (C) 2012  Alexandru Gagniuc <mr.nuke.me at gmail.com>
+ *
+ * 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, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+const char boardname[33]="VIA EPIA M-850                  ";
+
+#define SUPERIO_CONFIG_PORT		0x2e
+
+static inline void pnp_enter_conf_state(u16 port)
+{
+	outb(0x87, port);
+	outb(0x87, port);
+}
+
+static inline void pnp_exit_conf_state(u16 port)
+{
+	outb(0xaa, port);
+}
+
+static void superio_init(void)
+{
+	pnp_enter_conf_state(SUPERIO_CONFIG_PORT);
+	pnp_set_logical_device(SUPERIO_CONFIG_PORT, 0);
+	pnp_set_enable(SUPERIO_CONFIG_PORT, 0);
+	pnp_set_iobase0(SUPERIO_CONFIG_PORT, 0x03f8);
+	pnp_set_enable(SUPERIO_CONFIG_PORT, 1);
+	pnp_exit_conf_state(SUPERIO_CONFIG_PORT);
+
+}
+
+static void chipset_init(void)
+{
+	superio_init();
+
+	__asm__ __volatile__("\
+	jmp skip\n\
+	.align 128\n\
+	.global via_romstrap\n\
+	via_romstrap:\n\
+	.long 0x77886047\n\
+	.long 0x00777777\n\
+	.long 0x00000000\n\
+	.long 0x00000000\n\
+	.long 0x00888888\n\
+	.long 0x00AA1111\n\
+	.long 0x00000000\n\
+	.long 0x00000000\n\
+	skip:\n");
+}



More information about the SerialICE mailing list