]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2006-05-14 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Sun, 14 May 2006 21:16:20 +0000 (21:16 +0000)
committerokuji <okuji@localhost>
Sun, 14 May 2006 21:16:20 +0000 (21:16 +0000)
        * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
        grub/machine/linux.h
        * loader/i386/pc/linux.c: Likewise.

        * include/grub/i386/pc/linux.h: Moved to ...
        * include/grub/i386/linux.h: ... here.

        * include/grub/i386/linux.h (struct linux_kernel_params): New
        struct.

ChangeLog
include/grub/i386/linux.h [moved from include/grub/i386/pc/linux.h with 56% similarity]
kern/i386/pc/startup.S
loader/i386/pc/linux.c

index f51ac1a3633e9dad61d999ab38e4ed8899cd4bcf..45bef02ec8d32b50309db8b801ccfc7243039b39 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
+       grub/machine/linux.h
+       * loader/i386/pc/linux.c: Likewise.
+
+       * include/grub/i386/pc/linux.h: Moved to ...
+       * include/grub/i386/linux.h: ... here.
+
+       * include/grub/i386/linux.h (struct linux_kernel_params): New
+       struct.
+       
 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
 
        * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
similarity index 56%
rename from include/grub/i386/pc/linux.h
rename to include/grub/i386/linux.h
index c2b733ec7523c2a6699adf96279d0fe49723ef56..669eb99486a6f46c0b55aad1088fa9fac04e19a2 100644 (file)
@@ -45,6 +45,9 @@
 #define GRUB_LINUX_SETUP_MOVE_SIZE     0x9100
 #define GRUB_LINUX_CL_MAGIC            0xA33F
 
+#define GRUB_LINUX_EFI_SIGNATURE       \
+  ('E' << 24 | 'F' << 16 | 'I' << 8 | 'L')
+
 #ifndef ASM_FILE
 
 /* For the Linux/i386 boot protocol version 2.03.  */
@@ -81,6 +84,99 @@ struct linux_kernel_header
   grub_uint32_t initrd_addr_max;        /* Highest address for initrd */
 } __attribute__ ((packed));
 
+/* Boot parameters for Linux based on 2.6.12. This is used by the setup
+   sectors of Linux, and must be simulated by GRUB on EFI, because
+   the setup sectors depend on BIOS.  */
+struct linux_kernel_params
+{
+  grub_uint8_t video_cursor_x;         /* 0 */
+  grub_uint8_t video_cursor_y;
+
+  grub_uint16_t ext_mem;               /* 2 */
+  
+  grub_uint16_t video_page;            /* 4 */
+  grub_uint8_t video_mode;             /* 6 */
+  grub_uint8_t video_width;            /* 7 */
+  
+  grub_uint8_t padding1[0xa - 0x8];
+  
+  grub_uint16_t video_ega_bx;          /* a */
+  
+  grub_uint8_t padding2[0xe - 0xc];
+  
+  grub_uint8_t video_height;           /* e */
+  grub_uint8_t have_vga;               /* f */
+  grub_uint16_t font_size;             /* 10 */
+  
+  grub_uint16_t lfb_width;             /* 12 */
+  grub_uint16_t lfb_height;            /* 14 */
+  grub_uint16_t lfb_depth;             /* 16 */
+  grub_uint32_t lfb_base;              /* 18 */
+  grub_uint32_t lfb_size;              /* 1c */
+
+  grub_uint16_t cl_magic;              /* 20 */
+  grub_uint16_t cl_offset;
+
+  grub_uint16_t lfb_line_len;          /* 24 */
+  grub_uint8_t red_mask_size;          /* 26 */
+  grub_uint8_t red_field_pos;
+  grub_uint8_t green_mask_size;
+  grub_uint8_t green_field_pos;
+  grub_uint8_t blue_mask_size;
+  grub_uint8_t blue_field_pos;
+  grub_uint8_t reserved_mask_size;
+  grub_uint8_t reserved_field_pos;
+  grub_uint16_t vesapm_segment;                /* 2e */
+  grub_uint16_t vesapm_offset;         /* 30 */
+  grub_uint16_t lfb_pages;             /* 32 */
+  grub_uint16_t vesa_attrib;           /* 34 */
+
+  grub_uint8_t padding3[0x40 - 0x36];
+
+  grub_uint16_t apm_version;           /* 40 */
+  grub_uint16_t apm_code_segment;      /* 42 */
+  grub_uint32_t apm_entry;             /* 44 */
+  grub_uint16_t apm_16bit_code_segment;        /* 48 */
+  grub_uint16_t apm_data_segment;      /* 4a */
+  grub_uint16_t apm_flags;             /* 4c */
+  grub_uint32_t apm_code_len;          /* 4e */
+  grub_uint16_t apm_data_len;          /* 52 */
+  
+  grub_uint8_t padding4[0x60 - 0x54];
+  
+  grub_uint32_t ist_signature;         /* 60 */
+  grub_uint32_t ist_command;           /* 64 */
+  grub_uint32_t ist_event;             /* 68 */
+  grub_uint32_t ist_perf_level;                /* 6a */
+
+  grub_uint8_t padding5[0x80 - 0x6e];
+  
+  grub_uint8_t hd0_drive_info[10];     /* 80 */
+  grub_uint8_t hd1_drive_info[10];     /* 90 */
+  grub_uint16_t rom_config_len;                /* a0 */
+
+  grub_uint8_t padding6[0x1c0 - 0xa2];
+  
+  grub_uint32_t efi_signature;         /* 1c0 */
+  grub_uint32_t efi_system_table;      /* 1c4 */
+  grub_uint32_t efi_mem_desc_size;     /* 1c8 */
+  grub_uint32_t efi_mem_desc_version;  /* 1cc */
+  grub_uint32_t efi_mmap;              /* 1d0 */
+  grub_uint32_t efi_mmap_size;         /* 1d4 */
+  
+  grub_uint8_t padding7[0x1e0 - 0x1d8];
+  
+  grub_uint32_t alt_mem;               /* 1e0 */
+  
+  grub_uint8_t padding8[0x1e8 - 0x1e4];
+  
+  grub_uint32_t mmap_size;             /* 1e8 */
+
+  grub_uint8_t padding9[0x1ff - 0x1ec];
+  
+  grub_uint8_t ps_mouse;               /* 1ff */
+} __attribute__ ((packed));
+
 #endif /* ! ASM_FILE */
 
 #endif /* ! GRUB_LINUX_MACHINE_HEADER */
index 9fdbb2384927ac6c5bcf803d3cc9097c049d28c0..c79535362e860a9a531f2b16ce45493750483d61 100644 (file)
@@ -48,7 +48,7 @@
 #include <grub/machine/boot.h>
 #include <grub/machine/memory.h>
 #include <grub/machine/console.h>
-#include <grub/machine/linux.h>
+#include <grub/cpu/linux.h>
 #include <grub/machine/kernel.h>
 #include <grub/machine/multiboot.h>
                
index da62f52b1b9fde05cfaee20840134bfb7b14c26e..73a9662c97d23c4603283e80f5148c0fe891f0ce 100644 (file)
@@ -30,7 +30,7 @@
 #include <grub/machine/memory.h>
 #include <grub/rescue.h>
 #include <grub/dl.h>
-#include <grub/machine/linux.h>
+#include <grub/cpu/linux.h>
 
 static grub_dl_t my_mod;