]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
simplified serial
authorphcoder <phcoder@debian.bg45.phnet>
Sun, 18 Oct 2009 09:49:09 +0000 (11:49 +0200)
committerphcoder <phcoder@debian.bg45.phnet>
Sun, 18 Oct 2009 09:49:09 +0000 (11:49 +0200)
include/grub/i386/coreboot/serial.h [new file with mode: 0644]
include/grub/i386/ieee1275/serial.h
include/grub/mips/qemu-mipssim/serial.h [new file with mode: 0644]
include/grub/mips/qemu-r4k/serial.h [new file with mode: 0644]
term/serial.c

diff --git a/include/grub/i386/coreboot/serial.h b/include/grub/i386/coreboot/serial.h
new file mode 100644 (file)
index 0000000..b6819d5
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2009  Free Software Foundation, Inc.
+ *
+ *  GRUB 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 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB 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 GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_MACHINE_SERIAL_HEADER
+#define GRUB_MACHINE_SERIAL_HEADER     1
+
+#define GRUB_MACHINE_SERIAL_PORTS { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }
+
+#endif
index 2c527f6264c59a3eb83e43a10af5cd73d383e3fb..2d8563414b8c92a5e423ecdb6e1aee67856bbcdc 100644 (file)
@@ -1 +1 @@
-#include <grub/i386/pc/serial.h>
+#include <grub/i386/coreboot/serial.h>
diff --git a/include/grub/mips/qemu-mipssim/serial.h b/include/grub/mips/qemu-mipssim/serial.h
new file mode 100644 (file)
index 0000000..55d64fe
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2009  Free Software Foundation, Inc.
+ *
+ *  GRUB 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 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB 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 GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_MACHINE_SERIAL_HEADER
+#define GRUB_MACHINE_SERIAL_HEADER     1
+
+#define GRUB_MACHINE_SERIAL_PORTS { 0x1fd003f8 }
+
+#endif 
diff --git a/include/grub/mips/qemu-r4k/serial.h b/include/grub/mips/qemu-r4k/serial.h
new file mode 100644 (file)
index 0000000..1f8ce08
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2009  Free Software Foundation, Inc.
+ *
+ *  GRUB 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 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB 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 GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GRUB_MACHINE_SERIAL_HEADER
+#define GRUB_MACHINE_SERIAL_HEADER     1
+
+#define GRUB_MACHINE_SERIAL_PORTS { 0x140003f8 }
+
+#endif 
index 30f8bb91a16229f3f5ec4a1bd7bde5c74b3ece8d..648b5baf6e9c0547f7d66bcb63708c6c933e5e72 100644 (file)
@@ -19,7 +19,6 @@
 #include <grub/machine/machine.h>
 #include <grub/machine/memory.h>
 #include <grub/serial.h>
-//#include <grub/machine/console.h>
 #include <grub/term.h>
 #include <grub/types.h>
 #include <grub/dl.h>
@@ -67,14 +66,9 @@ static struct serial_port serial_settings;
 #ifdef GRUB_MACHINE_PCBIOS
 static const unsigned short *serial_hw_io_addr = (const unsigned short *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;
 #define GRUB_SERIAL_PORT_NUM 4
-#elif defined (GRUB_MACHINE_MIPS_QEMU_MIPSSIM)
-static const grub_port_t serial_hw_io_addr[] = { 0x1fd003f8 };
-#define GRUB_SERIAL_PORT_NUM (ARRAY_SIZE(serial_hw_io_addr))
-#elif defined (GRUB_MACHINE_MIPS_QEMU_R4K)
-static const grub_port_t serial_hw_io_addr[] = { 0x140003f8 };
-#define GRUB_SERIAL_PORT_NUM (ARRAY_SIZE(serial_hw_io_addr))
 #else
-static const grub_port_t serial_hw_io_addr[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
+#include <grub/machine/serial.h>
+static const grub_port_t serial_hw_io_addr[] = GRUB_MACHINE_SERIAL_PORTS;
 #define GRUB_SERIAL_PORT_NUM (ARRAY_SIZE(serial_hw_io_addr))
 #endif