Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2001 16:16:00 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Weiguang SHI <weiguang_shi@hotmail.com>
Cc:        freebsd-hackers@FreeBSD.org
Subject:   RE: jmp after setting PE?
Message-ID:  <XFMail.010723161600.jhb@FreeBSD.org>
In-Reply-To: <F94Fsxf4yp8ARf3sllN00002f3d@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 23-Jul-01 Weiguang SHI wrote:
> Thanks.
> I think I've found it in btx.s:
> 
>     213                 mov %eax,%cr0                   #
>     214                 ljmp $SEL_SCODE,$init.8         # To 32-bit code
>     215                 .code32
>     216 init.8:         xorl %ecx,%ecx                  # Zero
> 
> And there IS this "ljmp".

Yes.

> Well, this BTX thing is amazing: all this effort, (btxld, run-time
> library crt0.o, loader, etc.) seems to just to provide a 32-bit
> protected and possibly paging-enabled environment to start the 
> kernel/loader(and to confuse a new-comer like me.) What are the
> other gains? Where can I found more info about this BTX before going
> through the ultimate source code? (I've search the mailing-lists.)

That's its purpose, to provide a mini-kenrel for the loader so we can write the
loader in C and not assembly.  (gcc doesn't do well with generating code for
real mode).

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010723161600.jhb>