From owner-freebsd-hackers Fri Sep 18 15:08:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA12234 for freebsd-hackers-outgoing; Fri, 18 Sep 1998 15:08:04 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA12197 for ; Fri, 18 Sep 1998 15:07:53 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id PAA01422; Fri, 18 Sep 1998 15:12:46 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199809182212.PAA01422@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: zhihuizhang cc: hackers Subject: Re: PC memory usage (what is PIC?) In-reply-to: Your message of "Fri, 18 Sep 1998 17:24:12 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 18 Sep 1998 15:12:46 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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