From mboxrd@z Thu Jan 1 00:00:00 1970 From: j.neuschaefer@gmx.net (Jonathan =?utf-8?Q?Neusch=C3=A4fer?=) Date: Thu, 11 Aug 2011 18:29:25 +0200 Subject: What's the value of %cs before jump in pm32 on booting? In-Reply-To: References: <201108111918521090677@gmail.com> Message-ID: <20110811162924.GI29043@debian.debian> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Thu, Aug 11, 2011 at 09:53:10PM +0700, Mulyadi Santosa wrote: > On Thu, Aug 11, 2011 at 18:18, jiangtao.jit wrote: > > Hi all: > > > > on booting of x86 > > top of file arch/x86/boot/pmjump.S > > there is code > > ------------------- > > GLOBAL(protected_mode_jump) > > ? ? ? ?movl ? ?%edx, %esi > > ? ? ? ?xorl ? ?%ebx, %ebx > > i think it's zeroing bx (l--> low I suppose) Long, actually, i.e. 32-bit. > > > ? ? ? ?movw ? ?%cs, %bx > > then, it should zero the content of cs. Quite likely, it means to jump > to cpu ring level 0 and do something there.. No, this is written in AT&T syntax, where the source comes first, and then the destination. IOW, the code means: Copy the 16 bit register CS into the lower 16 bit of EBX (which is BX). CMIIW, Jonathan Neusch?fer