Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Sep 1998 15:12:46 -0700
From:      Mike Smith <mike@smith.net.au>
To:        zhihuizhang <bf20761@binghamton.edu>
Cc:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: PC memory usage (what is PIC?) 
Message-ID:  <199809182212.PAA01422@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 18 Sep 1998 17:24:12 EDT." <Pine.SOL.L3.93.980918172000.16483A-100000@bingsun1> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> I read in the FreeBSD handbook on PC memory usage:
> 
> Since it has been linked for another (high) address, it will have to 
> execute PIC until the page table and page directory stuff is setup properly, 
> at which point paging will be enabled and the kernel will finally run at 
> the address for which it was linked.
> 
> Can anyone explain to me what is PIC and the two different linked
> addresses mentioned here?

PIC is position-independant code.

The kernel is linked to run at a virtual address different from the 
physical address that it's loaded at.  When it starts, it can't know 
what the current virtual:physical mapping is and thus what the current
virtual address is, so everything must be performed relative to %eip.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



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?199809182212.PAA01422>