2009-08-29 Robert Millan <rmh.grub@aybabtu.com>
* term/i386/pc/serial.c: Include `<grub/machine/memory.h>'. [GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR). [! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using `ARRAY_SIZE' macro.
This commit is contained in:
parent
6f07b921bc
commit
d8888b5cb4
2 changed files with 14 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2009-08-29 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* term/i386/pc/serial.c: Include `<grub/machine/memory.h>'.
|
||||||
|
|
||||||
|
[GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Macroify initialization
|
||||||
|
value (0x0400 -> GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR).
|
||||||
|
|
||||||
|
[! GRUB_MACHINE_PCBIOS] (GRUB_SERIAL_PORT_NUM): Calculate using
|
||||||
|
`ARRAY_SIZE' macro.
|
||||||
|
|
||||||
2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
|
2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* kern/file.c (grub_file_read): Check offset.
|
* kern/file.c (grub_file_read): Check offset.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008 Free Software Foundation, Inc.
|
* Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <grub/machine/machine.h>
|
#include <grub/machine/machine.h>
|
||||||
|
#include <grub/machine/memory.h>
|
||||||
#include <grub/machine/serial.h>
|
#include <grub/machine/serial.h>
|
||||||
#include <grub/machine/console.h>
|
#include <grub/machine/console.h>
|
||||||
#include <grub/term.h>
|
#include <grub/term.h>
|
||||||
|
@ -64,12 +65,11 @@ struct serial_port
|
||||||
static struct serial_port serial_settings;
|
static struct serial_port serial_settings;
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_PCBIOS
|
#ifdef GRUB_MACHINE_PCBIOS
|
||||||
/* The BIOS data area. */
|
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 *) 0x0400;
|
|
||||||
#define GRUB_SERIAL_PORT_NUM 4
|
#define GRUB_SERIAL_PORT_NUM 4
|
||||||
#else
|
#else
|
||||||
static const unsigned short serial_hw_io_addr[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
|
static const unsigned short serial_hw_io_addr[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
|
||||||
#define GRUB_SERIAL_PORT_NUM (sizeof(serial_hw_io_addr)/sizeof(serial_hw_io_addr[0]))
|
#define GRUB_SERIAL_PORT_NUM (ARRAY_SIZE(serial_hw_io_addr))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Return the port number for the UNITth serial device. */
|
/* Return the port number for the UNITth serial device. */
|
||||||
|
|
Loading…
Reference in a new issue