All of lore.kernel.org
 help / color / mirror / Atom feed
From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: What's the value of %cs before jump in pm32 on booting?
Date: Thu, 11 Aug 2011 18:29:25 +0200	[thread overview]
Message-ID: <20110811162924.GI29043@debian.debian> (raw)
In-Reply-To: <CAGdaadaYBKLgJ9S-XPy6T4BL+XaF70oCt3BGRURo8qGYm46XGQ@mail.gmail.com>

On Thu, Aug 11, 2011 at 09:53:10PM +0700, Mulyadi Santosa wrote:
> On Thu, Aug 11, 2011 at 18:18, jiangtao.jit <jiangtao.jit@gmail.com> 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

      reply	other threads:[~2011-08-11 16:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-11 11:18 What's the value of %cs before jump in pm32 on booting? jiangtao.jit
2011-08-11 14:53 ` Mulyadi Santosa
2011-08-11 16:29   ` Jonathan Neuschäfer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110811162924.GI29043@debian.debian \
    --to=j.neuschaefer@gmx.net \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.