All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] Make boot/i386/pc/boot.S safer to modify
@ 2009-07-15  1:00 Pavel Roskin
  2009-07-15  1:00 ` [PATCH 2/7] Remove unused version information from boot/i386/pc/boot.S Pavel Roskin
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Pavel Roskin @ 2009-07-15  1:00 UTC (permalink / raw)
  To: grub-devel

ChangeLog:

	* include/grub/i386/pc/boot.h: Sort all offsets.
	(GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
	(GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
	* boot/i386/pc/boot.S: Assert location of every offset listed in
	include/grub/i386/pc/boot.h.
---
 boot/i386/pc/boot.S         |    8 +++++++-
 include/grub/i386/pc/boot.h |   10 ++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S
index 8d8c27c..fb90947 100644
--- a/boot/i386/pc/boot.S
+++ b/boot/i386/pc/boot.S
@@ -65,6 +65,7 @@ start:
 	 * this area.
 	 */
 
+	. = _start + GRUB_BOOT_MACHINE_BPB_START
 	. = _start + 4
 
 	/* scratch space */
@@ -91,14 +92,19 @@ cylinder_start:
 	 * End of BIOS parameter block.
 	 */
 
+	. = _start + GRUB_BOOT_MACHINE_VER_MAJ
 boot_version:
 	.byte	GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
 kernel_address:
 	.word	GRUB_BOOT_MACHINE_KERNEL_ADDR
 kernel_segment:
 	.word	GRUB_BOOT_MACHINE_KERNEL_SEG
+
+	. = _start + GRUB_BOOT_MACHINE_KERNEL_SECTOR
 kernel_sector:
 	.long	1, 0
+
+	. = _start + GRUB_BOOT_MACHINE_BOOT_DRIVE
 boot_drive:
 	.byte 0xff	/* the disk to load kernel from */
 			/* 0xff means use the boot drive */
@@ -477,8 +483,8 @@ nt_magic:
 	 *  sneaky, huh?
 	 */
 
-part_start:
 	. = _start + GRUB_BOOT_MACHINE_PART_START
+part_start:
 
 probe_values:
 	.byte	36, 18, 15, 9, 0
diff --git a/include/grub/i386/pc/boot.h b/include/grub/i386/pc/boot.h
index f35cb3a..221ed38 100644
--- a/include/grub/i386/pc/boot.h
+++ b/include/grub/i386/pc/boot.h
@@ -31,17 +31,11 @@
 /* The offset of the major version.  */
 #define GRUB_BOOT_MACHINE_VER_MAJ	0x3e
 
-/* The offset of BOOT_DRIVE.  */
-#define GRUB_BOOT_MACHINE_BOOT_DRIVE	0x4c
-
-/* The offset of KERNEL_ADDRESS.  */
-#define GRUB_BOOT_MACHINE_KERNEL_ADDRESS	0x40
-
 /* The offset of KERNEL_SECTOR.  */
 #define GRUB_BOOT_MACHINE_KERNEL_SECTOR	0x44
 
-/* The offset of KERNEL_SEGMENT.  */
-#define GRUB_BOOT_MACHINE_KERNEL_SEGMENT	0x42
+/* The offset of BOOT_DRIVE.  */
+#define GRUB_BOOT_MACHINE_BOOT_DRIVE	0x4c
 
 /* The offset of BOOT_DRIVE_CHECK.  */
 #define GRUB_BOOT_MACHINE_DRIVE_CHECK	0x4e



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-07-16 15:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-15  1:00 [PATCH 1/7] Make boot/i386/pc/boot.S safer to modify Pavel Roskin
2009-07-15  1:00 ` [PATCH 2/7] Remove unused version information from boot/i386/pc/boot.S Pavel Roskin
2009-07-15  1:00 ` [PATCH 3/7] Eliminate kernel_segment Pavel Roskin
2009-07-16 15:45   ` Robert Millan
2009-07-15  1:00 ` [PATCH 4/7] Eliminate kernel_address Pavel Roskin
2009-07-16 15:52   ` Robert Millan
2009-07-15  1:00 ` [PATCH 5/7] Add newline after "Error" in bootsector Pavel Roskin
2009-07-15  1:00 ` [PATCH 6/7] Increase BPB size to accommodate FAT32 Pavel Roskin
2009-07-15  1:00 ` [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations Pavel Roskin
2009-07-15 15:33   ` Pavel Roskin
2009-07-15 22:41     ` Vladimir 'phcoder' Serbinenko
2009-07-15 23:40       ` Pavel Roskin
2009-07-16  3:44       ` Pavel Roskin
2009-07-16 15:36         ` Vladimir 'phcoder' Serbinenko
2009-07-16 15:43 ` [PATCH 1/7] Make boot/i386/pc/boot.S safer to modify Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.