From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Williams Date: Tue, 21 Jun 2011 22:10:11 -0700 Subject: [U-Boot] how to understand "uboot is 32bit program even it is in the 64bit mips" In-Reply-To: <201106221006548156815@gmail.com> References: <201106221006548156815@gmail.com> Message-ID: <4E017933.6050607@caviumnetworks.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We have dealt with this in our release of U-Boot since we only support 64-bit Linux. We use the n32 ABI with U-Boot and set it up to use a TLB entry to map U-Boot into a 32-bit addressable area. We have some special memcpy type routines that can handle the 64-bit addressing. All of our I/O registers require 64-bit addressing so we use assembly wrappers to do the actual read/writes to those addresses. -Aaron Williams On 06/21/2011 07:07 PM, hacklu wrote: > I have a 64bit cnMips borad.In the mail list archives,it says "uboot is 32bit,even in the 64bit cpu." > but how to understand that? > I have a guess,is the 64bit cpu support a 32bit-mode,then when does it switch to 64bit-mode to load 64-bit linux? > > btw,I have an other question,according to ,linux run in the _xkseg_ segment. so the first two bit virtual address in kernel space must be 11, > like 11xx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx (64bit). > but when I printf a variable' address in a foo driver,is say 0xa80000041c2ea180. not start of _11_. > the memory mapping mode has feazed me for _long_ _long_time. > > Dear Wolfgang(or someone else who can anwser me),thanks > > -------------- > hacklu > 2011-06-22 >