simplified serial
This commit is contained in:
parent
d71b572aea
commit
cba2cae2f5
5 changed files with 75 additions and 9 deletions
24
include/grub/i386/coreboot/serial.h
Normal file
24
include/grub/i386/coreboot/serial.h
Normal file
|
@ -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
|
|
@ -1 +1 @@
|
||||||
#include <grub/i386/pc/serial.h>
|
#include <grub/i386/coreboot/serial.h>
|
||||||
|
|
24
include/grub/mips/qemu-mipssim/serial.h
Normal file
24
include/grub/mips/qemu-mipssim/serial.h
Normal file
|
@ -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
|
24
include/grub/mips/qemu-r4k/serial.h
Normal file
24
include/grub/mips/qemu-r4k/serial.h
Normal file
|
@ -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
|
|
@ -19,7 +19,6 @@
|
||||||
#include <grub/machine/machine.h>
|
#include <grub/machine/machine.h>
|
||||||
#include <grub/machine/memory.h>
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/serial.h>
|
#include <grub/serial.h>
|
||||||
//#include <grub/machine/console.h>
|
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/dl.h>
|
#include <grub/dl.h>
|
||||||
|
@ -67,14 +66,9 @@ static struct serial_port serial_settings;
|
||||||
#ifdef GRUB_MACHINE_PCBIOS
|
#ifdef GRUB_MACHINE_PCBIOS
|
||||||
static const unsigned short *serial_hw_io_addr = (const unsigned short *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;
|
static const unsigned short *serial_hw_io_addr = (const unsigned short *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;
|
||||||
#define GRUB_SERIAL_PORT_NUM 4
|
#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
|
#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))
|
#define GRUB_SERIAL_PORT_NUM (ARRAY_SIZE(serial_hw_io_addr))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue