j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Greetings Folks -
I've been lurking on the list for a while, but there's been some call as to how to get started doing PROM start-up code on an x86 so I figured I'd pitch in what I've been doing, with the hope of getting some feedback from others.
My situation: I'm designing an AMD ELAN SC-410 based embedded system, and I want to write the firmware that will initialize the hardware and then launch my application. The app code is a 32 bit protected mode widget that makes no use of any operating system or BIOS calls. Thus my startup code is just that: code to start the processor off, initialize the hardware, switch to protected mode, and then run my app.
Here's my current coding flow. It is, I realize, somewhat crude, but it works so far. It might get you started, and I'd love to hear feedback and suggestions.
All my code is, as yet, being written in assembly. I'm using MASM to assemble it, and specifying a .TINY memory model, so I end up with a .COM file (which, although intended to be run by DOS at 1000:0100, is really a relocatable binary.)
My memory device of choice is a 29F040B, which is a 512KB device (addressed from 0x00000 to 0x7FFFF. I load the .COM file as a binary into my PROM programmer buffer at location 0x70000. This maps, in the system memory space, to 0xF0000. Then I hand edit the buffer, starting at address 0x7FFF0, where I put EA 00 00 00 F0. This is JMP F000:0000 at system address FFFF0. At power-on, the CS:IP initializes to F000:FFF0 and executes the JMP to the start of my .COM file. And off I go...
Right now I'm just fiddling with the hardware initialization, writing diagnostic codes out to port 0x300 and watching for them on the ISA bus.
Anyway, I hope this might get some people started. If you have any suggestions, I'd love to hear them.
Cheers!
Phil King pking@netschools.net