From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MIYmE-00056c-5c for mharc-grub-devel@gnu.org; Sun, 21 Jun 2009 21:56:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MIYmC-000547-2o for grub-devel@gnu.org; Sun, 21 Jun 2009 21:56:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MIYm6-00050q-K0 for grub-devel@gnu.org; Sun, 21 Jun 2009 21:56:50 -0400 Received: from [199.232.76.173] (port=57247 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MIYm6-00050n-Ef for grub-devel@gnu.org; Sun, 21 Jun 2009 21:56:46 -0400 Received: from c60.cesmail.net ([216.154.195.49]:41348) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MIYm5-0000wN-OI for grub-devel@gnu.org; Sun, 21 Jun 2009 21:56:46 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 21 Jun 2009 21:56:43 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id A796D34C6A for ; Sun, 21 Jun 2009 22:02:46 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20090621195237.GA23624@thorin> References: <20090621181748.GA21152@thorin> <20090621195237.GA23624@thorin> Content-Type: multipart/mixed; boundary="=-z8I6PpEEL2oz/TMLNjFt" Date: Sun, 21 Jun 2009 21:56:42 -0400 Message-Id: <1245635802.9864.60.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 (2.26.2-1.fc11) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] swap real_to_prot() and prot_to_real() (Re: [PATCH] i386-qemu port) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2009 01:56:52 -0000 --=-z8I6PpEEL2oz/TMLNjFt Content-Type: text/plain Content-Transfer-Encoding: 7bit On Sun, 2009-06-21 at 21:52 +0200, Robert Millan wrote: > When doing the i386-coreboot port I made this choice completely backwards. > > I thought real_to_prot() was only useful on i386-pc, because we needed it > for returning from BIOS, and prot_to_real() was useful elsewhere, because > the Linux loader would use it. > > Turns out we need real_to_prot() on i386-qemu for the initial transition > to i386 mode, AND we don't need prot_to_real() anywhere other than i386-pc, > because OSes that expect to be loaded in i8086 mode are going to rely on > BIOS calls. > > So this patch swaps them. real_to_prot() goes to realmode.S and > prot_to_real() back to startup.S. You have my approval as long as it compiles and doesn't introduce any warnings. I'm attaching the script I'm using to test all platforms at once. The compiler path needs to be adjusted, as well as the target names, as they affect search for the target compiler. That's the version with qemu support. If every Log2make is empty, please go ahead. -- Regards, Pavel Roskin --=-z8I6PpEEL2oz/TMLNjFt Content-Disposition: attachment; filename="grub-all-qemu" Content-Type: application/x-shellscript; name="grub-all-qemu" Content-Transfer-Encoding: 7bit #!/bin/sh set -e MAKE_JOBS=8 MAKE_ARGS="-j$MAKE_JOBS" PATH=/opt/ppc/usr/bin:/opt/sparc/usr/bin:$PATH test -f include/grub/xnu.h || exit 1 GRUB_SRC=`pwd` ./autogen.sh function build() { GRUB_BIN="$GRUB_SRC/build-$1-$2" rm -rf "$GRUB_BIN" mkdir "$GRUB_BIN" cd "$GRUB_BIN" $GRUB_SRC/configure --with-platform=$1 --target=$2 >Log1conf 2>Log2conf make grub_script.tab.c make $MAKE_ARGS >Log1make 2>Log2make } build pc i386-linux build efi i386-linux build efi x86_64-linux build coreboot i386-linux build qemu i386-linux build ieee1275 i386-linux build ieee1275 powerpc-linux build ieee1275 sparc64-linux-uclibc --=-z8I6PpEEL2oz/TMLNjFt--