From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1M7MUr-0001i2-Tk for mharc-grub-devel@gnu.org; Fri, 22 May 2009 00:36:41 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M7MUq-0001fm-4z for grub-devel@gnu.org; Fri, 22 May 2009 00:36:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M7MUl-0001aA-E0 for grub-devel@gnu.org; Fri, 22 May 2009 00:36:39 -0400 Received: from [199.232.76.173] (port=55968 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M7MUl-0001Zv-AY for grub-devel@gnu.org; Fri, 22 May 2009 00:36:35 -0400 Received: from c60.cesmail.net ([216.154.195.49]:12810) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1M7MUk-0006V3-On for grub-devel@gnu.org; Fri, 22 May 2009 00:36:35 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 22 May 2009 00:36:33 -0400 Received: from ct.roinet.com (c-69-141-194-35.hsd1.pa.comcast.net [69.141.194.35]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 347AF34C6A for ; Fri, 22 May 2009 00:38:00 -0400 (EDT) To: grub-devel@gnu.org From: Pavel Roskin Date: Fri, 22 May 2009 00:36:32 -0400 Message-ID: <20090522043632.10755.77091.stgit@ct.roinet.com> User-Agent: StGit/0.14.3.368.g58f7 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [PATCH 1/2] Reduce the special variables area in kern/i386/pc/startup.S X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 May 2009 04:36:40 -0000 ChangeLog: * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type to grub_uint8_t. (grub_root_drive): Likewise. * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte, remove alignment. (grub_root_drive): Change size to byte. (grub_start_addr): Remove. (grub_end_addr): Likewise. (grub_apm_bios_info): Likewise. This patch will require trivial adjustments to the patches changing END_SYMBOL. We don't need END_SYMBOL for grub_end_addr. --- include/grub/i386/pc/kernel.h | 7 ++----- kern/i386/pc/startup.S | 22 ++-------------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/include/grub/i386/pc/kernel.h b/include/grub/i386/pc/kernel.h index b6650bc..5acc883 100644 --- a/include/grub/i386/pc/kernel.h +++ b/include/grub/i386/pc/kernel.h @@ -69,13 +69,10 @@ extern grub_int32_t grub_install_bsd_part; extern char grub_prefix[]; /* The boot BIOS drive number. */ -extern grub_int32_t EXPORT_VAR(grub_boot_drive); +extern grub_uint8_t EXPORT_VAR(grub_boot_drive); /* The root BIOS drive number. */ -extern grub_int32_t grub_root_drive; - -/* The end address of the kernel. */ -extern grub_addr_t grub_end_addr; +extern grub_uint8_t grub_root_drive; #endif /* ! ASM_FILE */ diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index 8e8b661..fc83c4c 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -273,30 +273,12 @@ codestart: * This is the area for all of the special variables. */ - .p2align 2 /* force 4-byte alignment */ - VARIABLE(grub_boot_drive) - .long 0 + .byte 0 VARIABLE(grub_root_drive) - .long 0 + .byte 0 -VARIABLE(grub_start_addr) - .long _start - -VARIABLE(grub_end_addr) - .long END_SYMBOL - -VARIABLE(grub_apm_bios_info) - .word 0 /* version */ - .word 0 /* cseg */ - .long 0 /* offset */ - .word 0 /* cseg_16 */ - .word 0 /* dseg_16 */ - .word 0 /* cseg_len */ - .word 0 /* cseg_16_len */ - .word 0 /* dseg_16_len */ - .p2align 2 /* force 4-byte alignment */ /*