]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-08-29 Robert Millan <rmh.grub@aybabtu.com>
authorrobertmh <robertmh@localhost>
Sat, 29 Aug 2009 00:24:32 +0000 (00:24 +0000)
committerrobertmh <robertmh@localhost>
Sat, 29 Aug 2009 00:24:32 +0000 (00:24 +0000)
        * 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.

ChangeLog
term/i386/pc/serial.c

index b657885fed4f66b86a64e42bbf0b7458376ba27f..66b8371dd5503ddeee5e84528fd86e22868a59a6 100644 (file)
--- a/ChangeLog
+++ b/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>
 
        * kern/file.c (grub_file_read): Check offset.
index 195f73670898b892137e5987ed858a398667c4c3..1d74dbbc8e20377607ec70bd3b52f37086137d16 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  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
  *  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/memory.h>
 #include <grub/machine/serial.h>
 #include <grub/machine/console.h>
 #include <grub/term.h>
@@ -64,12 +65,11 @@ struct serial_port
 static struct serial_port serial_settings;
 
 #ifdef GRUB_MACHINE_PCBIOS
-/* The BIOS data area.  */
-static const unsigned short *serial_hw_io_addr = (const unsigned short *) 0x0400;
+static const unsigned short *serial_hw_io_addr = (const unsigned short *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;
 #define GRUB_SERIAL_PORT_NUM 4
 #else
 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
 
 /* Return the port number for the UNITth serial device.  */