From owner-freebsd-hackers Thu Sep 3 12:50:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA08157 for freebsd-hackers-outgoing; Thu, 3 Sep 1998 12:50:51 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from att.com (kcgw2.att.com [192.128.133.152]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id MAA08146 for ; Thu, 3 Sep 1998 12:50:48 -0700 (PDT) (envelope-from sbabkin@dcn.att.com) From: sbabkin@dcn.att.com Received: from kcig2.fw.att.com by kcgw2.att.com (AT&T/IPNS/UPAS-1.0) for freebsd.org!freebsd-hackers sender dcn.att.com!sbabkin (dcn.att.com!sbabkin); Thu Sep 3 14:28 CDT 1998 Received: from dcn71.dcn.att.com ([135.44.192.112]) by kcig2.fw.att.com (AT&T/IPNS/GW-1.0) with ESMTP id OAA12119 for ; Thu, 3 Sep 1998 14:49:32 -0500 (CDT) Received: by dcn71.dcn.att.com with Internet Mail Service (5.0.1458.49) id ; Thu, 3 Sep 1998 15:49:12 -0400 Message-ID: To: weeteck@eecs.umich.edu, freebsd-hackers@FreeBSD.ORG Subject: RE: switching to real-address mode Date: Thu, 3 Sep 1998 15:49:10 -0400 X-Priority: 3 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.0.1458.49) Content-Type: text/plain Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, > -----Original Message----- > From: Wee Teck Ng [SMTP:weeteck@eecs.umich.edu] > Sent: Wednesday, September 02, 1998 7:20 PM > To: freebsd-hackers@FreeBSD.ORG > Subject: switching to real-address mode > > i'm trying to switch to real-address mode from protected mode in > the kernel (freebsd 2.2.7), but without success. i had followed > the instructions in the intel manual (p8-14 of system prog guide), > but my code always hung after clearing PE flag in CR0. i would > appreciate comments from anyone who have done this before. > I have tried to this thing once, but only during system boot-up time because later the interrupt handling gets too complicated. May be I still can find this code if you are interested in it. First, you need to allocate a page that has the same physical and virtual address, I have just modified slightly the VM code to reserve such a page during boot-up. Second, you have to disable the interrupts until you set up proper interrupt handlers in real mode. My code switched well to real mode and back, but the support of interrupts was very and very limited, not enough to run the BIOS calls (for what all this code intended). -Sergey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message