]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
seems to work now. A lot is still missing though
authorphcoder <phcoder@debian.bg45.phnet>
Sun, 11 Oct 2009 12:18:58 +0000 (14:18 +0200)
committerphcoder <phcoder@debian.bg45.phnet>
Sun, 11 Oct 2009 12:18:58 +0000 (14:18 +0200)
include/grub/mips/qemu-r4k/memory.h
include/grub/mips/types.h
kern/dl.c
kern/mips/qemu-r4k/init.c
kern/term.c
term/serial.c

index 21f295b675e157b1e477f81840e2410022c9649c..87e68674eb8397c22fe7db6efea4887f92fa4bc5 100644 (file)
@@ -25,7 +25,8 @@
 #include <grub/types.h>
 #endif
 
-#define GRUB_MACHINE_MEMORY_STACK_HIGH       0x81000000
+#define GRUB_MACHINE_MEMORY_STACK_HIGH       0x80f00000
+#define GRUB_MACHINE_MEMORY_USABLE       0x81000000
 
 #define GRUB_MACHINE_MEMORY_AVAILABLE        1
 
index f5f4602e47d108babdc8b7ae7090143d22aadd5f..fe09afa3ebece80f8921036b40b0c79febbb9bb1 100644 (file)
@@ -31,7 +31,7 @@
 #elif defined (GRUB_CPU_MIPS)
 /* mips is big-endian.  */
 #define GRUB_TARGET_WORDS_BIGENDIAN
-#else
+#elif !defined (GRUB_SYMBOL_GENERATOR)
 #error Neither GRUB_CPU_MIPS nor GRUB_CPU_MIPSEL is defined
 #endif
 
index 78ebc1e385ff56deb3a5d6a634bd290ca788e860..7cc5855bd270ae444f838d4cf2f2b5328433f9ef 100644 (file)
--- a/kern/dl.c
+++ b/kern/dl.c
@@ -342,6 +342,7 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
       switch (type)
        {
        case STT_NOTYPE:
+       case STT_OBJECT:
          /* Resolve a global symbol.  */
          if (sym->st_name != 0 && sym->st_shndx == 0)
            {
@@ -351,15 +352,13 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
                                   "the symbol `%s' not found", name);
            }
          else
-           sym->st_value = 0;
-         break;
-
-       case STT_OBJECT:
-         sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,
-                                                               sym->st_shndx);
-         if (bind != STB_LOCAL)
-           if (grub_dl_register_symbol (name, (void *) sym->st_value, mod))
-             return grub_errno;
+           {
+             sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,
+                                                                   sym->st_shndx);
+             if (bind != STB_LOCAL)
+               if (grub_dl_register_symbol (name, (void *) sym->st_value, mod))
+                 return grub_errno;
+           }
          break;
 
        case STT_FUNC:
index 085c60bf8bc4dfe661e87f87e8af8c9f261cfa5a..8dfda57c273b5b86c3d2f60c1fa49200341f04d1 100644 (file)
@@ -22,9 +22,8 @@ grub_get_rtc (void)
 void
 grub_machine_init (void)
 {
-  void *tst;
-  grub_mm_init_region ((void *) GRUB_MACHINE_MEMORY_STACK_HIGH,
-                      RAMSIZE - (GRUB_MACHINE_MEMORY_STACK_HIGH & 0x7fffffff));
+  grub_mm_init_region ((void *) GRUB_MACHINE_MEMORY_USABLE,
+                      RAMSIZE - (GRUB_MACHINE_MEMORY_USABLE & 0x7fffffff));
   grub_install_get_time_ms (grub_rtc_get_time_ms);
 }
 
index 789e4651bdb6f7c611ed1883412e62add183d3b2..0e3595df34efe6bc7db2dc94e7b2586a6f6cd413 100644 (file)
@@ -136,7 +136,6 @@ grub_getcharwidth (grub_uint32_t code)
 int
 grub_getkey (void)
 {
-  int c;
   if (!grub_cur_term_input)
     return 0;
   return (grub_cur_term_input->getkey) ();
index 6c2d8ac097c305ceb11078c5335dda0467db426f..4b6ac981dafc077d483d723899e95cf80fe3356b 100644 (file)
@@ -29,7 +29,7 @@
 #include <grub/extcmd.h>
 
 #define TEXT_WIDTH     80
-#define TEXT_HEIGHT    25
+#define TEXT_HEIGHT    24
 
 static unsigned int xpos, ypos;
 static unsigned int keep_track = 1;
@@ -370,7 +370,7 @@ grub_serial_putchar (grub_uint32_t c)
          break;
 
        case '\n':
-         if (ypos < TEXT_HEIGHT)
+         if (ypos < TEXT_HEIGHT - 1)
            ypos++;
          break;