From owner-freebsd-amd64@FreeBSD.ORG Thu Jan 29 10:54:30 2004 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D287616A4CE for ; Thu, 29 Jan 2004 10:54:30 -0800 (PST) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7186A43D2F for ; Thu, 29 Jan 2004 10:54:27 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.10/8.12.9) with ESMTP id i0TIsQA0093437; Thu, 29 Jan 2004 10:54:26 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.10/8.12.10/Submit) id i0TIsQip093436; Thu, 29 Jan 2004 10:54:26 -0800 (PST) (envelope-from obrien) Date: Thu, 29 Jan 2004 10:54:26 -0800 From: "David O'Brien" To: Brian Tao Message-ID: <20040129185426.GA93242@dragon.nuxi.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 5.2-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 cc: freebsd-amd64@freebsd.org Subject: Re: New AMD64 owner X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: obrien@freebsd.org List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2004 18:54:31 -0000 On Thu, Jan 29, 2004 at 08:13:16AM -0500, Brian Tao wrote: > AMD64 CPU's are supposed to have "seamless" backwards > compatibility with 32-bit x86 code... I've confirmed this by watching > Windows 98 boot up on my new system (it was what the integrator had > installed to do some burn-in testing, presumably). If this is the > case, why am I seeing references to broken ia32 compatibility? > Shouldn't that "just work"? Or is this a kernel/loader issue with a > 64-bit aware install? It is a CPU mode issue. If you think back to your brand new i386 and Windows 95, the CPU was switched back into real mode when you ran a MS-Windows 3.1 program. Along with MS-Windows 95 doing "Thunking" for system services. The "seemless" in AMD64 is the same that you saw when the i386 first came out -- it ran 16-bit Real Mode code just fine. In fact it was the fastest 16-bit x86 machine in the world at the time. Simply extend that again to 64-bit and you get the idea behind AMD64. So now the issue you're refering to is how can one run 32-bit code under a 64-bit OS. Issues are that the kernel must support system calls being made by these 32-bit programs -- so one needs syscall translation. If you look at the function call ABI between 32-bit x64 and AMD64 you'll see how things are very different and have to converted from one to the other. Same reason you can't just run a Linux 32-bit x86 binary under FreeBSD/i386 before someone wrote the /sys/compat/linux bits which handle system call translation and other things that are specific to Linux and different from FreeBSD. > Related to the previous question: should I be able to install > either freebsd-i386 or freebsd-amd64, and both will work? Yes -- assuming you are talking about dual-booting. My FreeBSD/i386 build machine is actually an Athlon64 machine that is run purely and only in 32-bit mode. Athlon64 is the fastest 32-bit x86 machine in the world today. > the i386 install will run in 32-bit mode, but at least it will run > (and act as a really fast Intel box, I'm hoping). Correct. > Or is there > something inherent in the kernel or boot process that forces me to run > freebsd-amd64, and cannot utilize the 32-bit compatibility of the CPU? You are mixing machine capabilities, with OS capabilities. Please think back to the 8088/80286 -> i386 transition. > normal IDE drive. However, when I tried to boot the 5.2-RELEASE > installer, it was not able to find any drives. I noticed that Soren > recently committed a change to support the 3114's, but that doesn't > help me if I can't get FreeBSD on the damn disks in the first place. ;-) I will make a new snapshot w/in a week that will have SoS's Si3114 change in it. > Is it possible to subsequently do a source build upgrade to amd64? Or > do we not have the tools to do that yet? No, not at this time. -- -- David (obrien@FreeBSD.org)