Date: Thu, 29 Jan 2004 10:54:26 -0800 From: "David O'Brien" <obrien@freebsd.org> To: Brian Tao <taob@risc.org> Cc: freebsd-amd64@freebsd.org Subject: Re: New AMD64 owner Message-ID: <20040129185426.GA93242@dragon.nuxi.com> In-Reply-To: <Pine.GSO.4.21.0401290757580.26036-100000@tor-adm1.nbc.attcanada.ca> References: <Pine.GSO.4.21.0401290757580.26036-100000@tor-adm1.nbc.attcanada.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040129185426.GA93242>