From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 4/8] bootwrapper: help for 64 bit cpus From: Benjamin Herrenschmidt To: Segher Boessenkool In-Reply-To: References: Content-Type: text/plain Date: Thu, 12 Apr 2007 18:49:49 +1000 Message-Id: <1176367789.5764.10.camel@localhost.localdomain> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, Paul Mackerras , Milton Miller , David Gibson List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2007-04-12 at 09:43 +0200, Segher Boessenkool wrote: > > + /* We are in 64-bit mode. This program must run in 32 bit > > + * mode. Assume we are actually running somewhere in the > > + * low 32 bits of the address space, so we can just turn > > + * off MSR[SF] which is bit 0. > > + */ > > + .machine push > > + .machine "ppc64" > > + rldicl r0,r0,0,1 > > + sync > > + mtmsrd r0 > > + isync > > + .machine pop > > I'm not sure this actually works on all CPUs -- > aren't you supposed to use rfid for this? Not for 32/64 bits switches afaik... as long as your PC is known to fit in 32 bits, you don't generate an implicit branch. Ben.