Removed unused GRUB_BOOT_VERSION. Check for kernel version is better

done with a dedicated section.

	* grub-core/boot/sparc64/ieee1275/boot.S: Remove GRUB_BOOT_VERSION.
	Ensure the correct position of boot_path.
	* grub-core/kern/i386/efi/startup.S: Remove GRUB_BOOT_VERSION.
	* grub-core/kern/i386/pc/startup.S: Likewise. Ensure correct position of
	other fields.
	* grub-core/kern/x86_64/efi/startup.S: Remove GRUB_BOOT_VERSION.
	* include/grub/boot.h: Removed. All references removed.
	* include/grub/sparc64/ieee1275/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
	Removed.
	(GRUB_BOOT_MACHINE_BOOT_DEVPATH): Make it lower.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-10-19 23:01:44 +02:00
parent e55599dcbf
commit de9c615e5c
13 changed files with 25 additions and 82 deletions

View file

@ -1,3 +1,19 @@
2011-10-19 Vladimir Serbinenko <phcoder@gmail.com>
Removed unused GRUB_BOOT_VERSION. Check for kernel version is better
done with a dedicated section.
* grub-core/boot/sparc64/ieee1275/boot.S: Remove GRUB_BOOT_VERSION.
Ensure the correct position of boot_path.
* grub-core/kern/i386/efi/startup.S: Remove GRUB_BOOT_VERSION.
* grub-core/kern/i386/pc/startup.S: Likewise. Ensure correct position of
other fields.
* grub-core/kern/x86_64/efi/startup.S: Remove GRUB_BOOT_VERSION.
* include/grub/boot.h: Removed. All references removed.
* include/grub/sparc64/ieee1275/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
Removed.
(GRUB_BOOT_MACHINE_BOOT_DEVPATH): Make it lower.
2011-10-19 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-install.in: Declare IEEE1275 as able to find out the disk

View file

@ -78,7 +78,6 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/memory.h

View file

@ -18,7 +18,6 @@
*/
#include <grub/symbol.h>
#include <grub/boot.h>
#include <grub/machine/boot.h>
/*

View file

@ -18,7 +18,6 @@
*/
#include <grub/symbol.h>
#include <grub/boot.h>
#include <grub/machine/boot.h>
#include <grub/machine/kernel.h>
#include <multiboot.h>

View file

@ -19,7 +19,6 @@
#include <config.h>
#include <grub/symbol.h>
#include <grub/boot.h>
#include <grub/machine/boot.h>
#include <grub/machine/kernel.h>
#include <multiboot.h>

View file

@ -17,7 +17,6 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/boot.h>
#include <grub/machine/boot.h>
.text
@ -29,9 +28,6 @@ pic_base:
call boot_continue
mov %o4, CIF_REG
. = _start + GRUB_BOOT_MACHINE_VER_MAJ
boot_version: .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
/* The offsets to these locations are defined by the
* GRUB_BOOT_MACHINE_foo macros in include/grub/sparc/ieee1275/boot.h,
* and grub-setup uses this to patch these next three values as needed.
@ -44,6 +40,7 @@ boot_version: .byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
* After loading in that block we will execute it by jumping to the
* load address plus the size of the prepended A.OUT header (32 bytes).
*/
. = _start + GRUB_BOOT_MACHINE_BOOT_DEVPATH
boot_path:
. = _start + GRUB_BOOT_MACHINE_KERNEL_BYTE
boot_path_end:

View file

@ -17,7 +17,6 @@
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/boot.h>
#include <grub/machine/boot.h>
#include <grub/offsets.h>

View file

@ -19,29 +19,12 @@
#include <config.h>
#include <grub/symbol.h>
#include <grub/boot.h>
.file "startup.S"
.text
.globl start, _start
start:
_start:
jmp codestart
/*
* Compatibility version number
*
* These MUST be at byte offset 6 and 7 of the executable
* DO NOT MOVE !!!
*/
. = _start + 0x6
.byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
/*
* This is a special data area 8 bytes from the beginning.
*/
codestart:
/*
* EFI_SYSTEM_TABLE * and EFI_HANDLE are passed on the stack.
*/

View file

@ -43,7 +43,6 @@
#include <config.h>
#include <grub/symbol.h>
#include <grub/boot.h>
#include <grub/machine/boot.h>
#include <grub/machine/memory.h>
#include <grub/machine/console.h>
@ -75,31 +74,27 @@ LOCAL (base):
#else
ljmp $0, $ABS(LOCAL (codestart))
#endif
/*
* Compatibility version number
*
* These MUST be at byte offset 6 and 7 of the executable
* DO NOT MOVE !!!
*/
. = _start + 0x6
.byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
/*
* This is a special data area 8 bytes from the beginning.
* This is a special data area.
*/
. = _start + 0x8
. = _start + GRUB_KERNEL_I386_PC_TOTAL_MODULE_SIZE
VARIABLE(grub_total_module_size)
.long 0
. = _start + GRUB_KERNEL_I386_PC_KERNEL_IMAGE_SIZE
VARIABLE(grub_kernel_image_size)
.long 0
. = _start + GRUB_KERNEL_I386_PC_COMPRESSED_SIZE
VARIABLE(grub_compressed_size)
.long 0
. = _start + GRUB_KERNEL_I386_PC_INSTALL_DOS_PART
VARIABLE(grub_install_dos_part)
.long 0xFFFFFFFF
. = _start + GRUB_KERNEL_I386_PC_INSTALL_BSD_PART
VARIABLE(grub_install_bsd_part)
.long 0xFFFFFFFF
. = _start + GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY
reed_solomon_redundancy:
.long 0

View file

@ -19,7 +19,6 @@
#include <config.h>
#include <grub/symbol.h>
#include <grub/boot.h>
/*
* x86_64 uses registry to pass parameters. Unfortunately, gcc and efi use

View file

@ -19,7 +19,6 @@
#include <config.h>
#include <grub/symbol.h>
#include <grub/boot.h>
.file "startup.S"
.text
@ -28,18 +27,6 @@
start:
_start:
jmp codestart
/*
* Compatibility version number
*
* These MUST be at byte offset 6 and 7 of the executable
* DO NOT MOVE !!!
*/
. = _start + 0x6
.byte GRUB_BOOT_VERSION_MAJOR, GRUB_BOOT_VERSION_MINOR
codestart:
movq %rcx, EXT_C(grub_efi_image_handle)(%rip)
movq %rdx, EXT_C(grub_efi_system_table)(%rip)

View file

@ -1,27 +0,0 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2007 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_BOOT_HEADER
#define GRUB_BOOT_HEADER 1
#define GRUB_BOOT_VERSION_MAJOR 4
#define GRUB_BOOT_VERSION_MINOR 0
#define GRUB_BOOT_VERSION ((GRUB_BOOT_VERSION_MINOR << 8) \
| GRUB_BOOT_VERSION_MAJOR)
#endif /* ! GRUB_BOOT_HEADER */

View file

@ -39,9 +39,7 @@
#define GRUB_BOOT_MACHINE_SIGNATURE 0xbb44aa55
#define GRUB_BOOT_MACHINE_VER_MAJ 0x08
#define GRUB_BOOT_MACHINE_BOOT_DEVPATH 0x0a
#define GRUB_BOOT_MACHINE_BOOT_DEVPATH 0x08
#define GRUB_BOOT_MACHINE_BOOT_DEVPATH_END 0x80