kernel_journeyman wrote:
I am about to take the plunge, dig myself into another hole of debt and get an AMD Athlon 64 machine. I think I will start my kernel off as a native 64-bit kernel, rather than a 64-bit hack on top of a 32-bit kernel.
That's a nice idea. Did you read up on the 32-bit compatibilities in AMD64?
Would anyone like to start a FAQ on this topic, and write about it in the Wiki FAQ? I'll be starting on it when I get the machine and have something up and running. In the mean time please PM me or register your interest here.
The idea about a FAQ is that there are people asking questions. There are barely any people asking questions about AMD64. Still, I must say I'm very much interested in giving you a testing module of my kernel in about 2 - 4 months, it should be doing 64-bits then.
I'd like to get a discussion going. Anyone like to kick it off? First up, with assembly language... maybe we'll need to patch up NASM so we can use [BITS 64] and so on... I wonder if registers in the Athlon x86-64 are EEAX, etc?
Oh dear oh dear oh dear....
we seem to have a problem

. At least, according to _ALL_ AMD64 sources, since about the end of 2002, the registers were rax...rsi plus r8...r15. Also, you got rflags & lots of MSRs.
Do you have the manuals AMD spreads?
By the way, Intel have done a backflip on 64-bit x86 and are now committed to cloning the Athlon 64! ;D
You know the problem about cloning, they don't live as long and they have hideous deformities.
Intels iAMD64's don't do syscall in 64-bit mode without indicating that in the flags (there's no flag for that particular combination, and they do some form of 64-bit, and they do support syscall in 32-bit mode), plus they've left out numerous best functions, and they've added sysenter/exit to 64-bit mode which was left out explicitly. Also, what is probably obvious, the MSR's are completely different.
Anyway, nice to hear there is somebody else who's going to buy a 64-bit machine just for osdev (it's not listed on dell's categories! it's not fair! 8D). I am still thinking of saving up until I've got enough for a dual machine, and I've finished my NUMA MP starter...

Although that doesn't help in getting smp support, it does help for the future.
Candy did some preliminary work in the GCC Cross-Compiler page; that means a functional GNU 'as' is available. (Must... resist... gas... advertising...

)
Yes, it's true there is a GAS that can assemble for AMD64, that is, as far as it can assemble. There is also a GCC that generates more or less terrible code, because amd64 is a quickhack on 32-bit for them. Expect to see code moving things from the amd64 spots to the 32-bit spots, back to registers, do something, back to 32-bit, back to 64-bit, returning, jumping around a lot, etc... :S
If you want a different syntax-assembler, try YASM, which I've heard also supports AMD64. Also, on masmforum.com there's a nasm64developer user, who eh... indicates he's a developer for nasm's 64-bit support. You could contact him for testbuilds or help (as in, helping him, not the other way around).