I'm totally n00bed about writing a bootloader so I have to ask questions before I go up to my neck

.
Firstly, when the second stage loads, and opens up a menu (simple text menu, where a number is an OS to load. Purly Chainloading). I want to have the Bootloader do some GRUB-like activities (minus the entry of P-Mode of coarse

) like setting the A20 gate (unreal mode), finding memory size, CPU speed and abilities (MMX, SSE2, etc.), then pass all that to the kernel in a nice simple structure placed before the kernel (the kernel is loaded to 1m, 8k) at 1m 1k (giving me ~7k flexability). I have a few questions regarding this:
- Is it a GOOD IDEA to pass [some] things to the kernel via the stack instead of using a section of memory
- If so, where's and ideal place to place the stack
My mind just went blank (and these sheets of looseleaf with designs isn't helping). All I can think of is: load kernel, make BOOTSTRUCT, put things on stack, then jump to x86_boot.
Cheers, DH.
ps. I'll have more later (I hope

)