From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Y3r9o-0002V9-Md for mharc-grub-devel@gnu.org; Wed, 24 Dec 2014 13:59:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3r9m-0002V2-Ru for grub-devel@gnu.org; Wed, 24 Dec 2014 13:59:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y3r9l-0003pl-Vo for grub-devel@gnu.org; Wed, 24 Dec 2014 13:59:38 -0500 Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:64998) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y3r9l-0003pW-RX for grub-devel@gnu.org; Wed, 24 Dec 2014 13:59:37 -0500 Received: by mail-oi0-f54.google.com with SMTP id u20so18329283oif.13 for ; Wed, 24 Dec 2014 10:59:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=f/QwVJu54igiNnb+2W3r8PzuW4ci52ZRwJIRR7rRhn8=; b=Zd7ddNl4sf2l9ZO7mIb1CvxAs0ZXMDTLkowTZHJBNEJG8GqObkV7TagF9w9yhOWAUf gJoRsYgC1VuT2/Ejl+SfUyHmjYtCnJ93OvBeE/Wg18DaEQHNd+aJEiY4R0oE7cW7O/YF uUAfAsT70sJAKXCwd68R7HMwc2ciXaz6nBwIaQwaUcV5tm5Lfz+p3aN1hL2NinB65a/F 9UVTpU37GFNMXSgNJfjbsViukaiuX9pxOpXF1LqI+p3Gt/w4T7iNMqD3DKuNJMjVppSv 8QGMfZ9bDTrzEig2Zy7ChOnbi/ELeU1wa+k7yUdJ1+BXUvfiWh5m3hW+rvlanzxmoGfE dyvg== MIME-Version: 1.0 X-Received: by 10.60.175.195 with SMTP id cc3mr17256378oec.10.1419447576528; Wed, 24 Dec 2014 10:59:36 -0800 (PST) Received: by 10.182.26.42 with HTTP; Wed, 24 Dec 2014 10:59:36 -0800 (PST) Date: Thu, 25 Dec 2014 00:59:36 +0600 Message-ID: Subject: esp register value after jump to linux From: Alexander Kuleshov To: grub-devel@gnu.org Content-Type: text/plain; charset=UTF-8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::236 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2014 18:59:39 -0000 Hello all, I see that grub setups registers before jump to linux kernel at grub/grub-core/loader/i386/pc/linux.c: grub_linux16_boot (void) { ... state.gs = state.fs = state.es = state.Tds = state.ss = segment; state.sp = GRUB_LINUX_SETUP_STACK; state.cs = segment + 0x20; state.ip = 0; ... } I see in gdb that: ss, ds, and other segment registers are 0x1000, and cs is 0x1020. It is good. But why esp is 0xf7f4? I see that GRUB_LINUX_SETUP_STACK is 0x9000. Thank you.