Page 1 of 2
EPROM confusion
Posted: Mon Jun 04, 2007 2:41 pm
by Zacariaz
[quote="'Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide'"]9.7.1 Real-Address Mode IDT
In real-address mode, the only system data structure that must be loaded into memory is the IDT (also called the “interrupt vector tableâ€
Posted: Mon Jun 04, 2007 2:46 pm
by Aali
all that says is that the code doesn't have to be in RAM, it could be BIOS code or whatever
it doesn't mean you should put *your* code in EPROM
Posted: Mon Jun 04, 2007 3:08 pm
by Combuster
It describes that in real mode you need to set up an interrupt table (the "real mode IDT"/ IVT).
Furthermore, the interrupt handlers must be within the 1MB limit of real mode where the processor can access it, and that it can be located on any form of memory (either RAM or ROM).
What it does not say is that the code and hardware responsible for doing this is implemented in the PC BIOS. When the computer boots, it will create the IVT and will set all the pointers to the appropriate interrupt handlers. Since the bios is contained in ROM mapped to 0xf0000-0xfffff, it conforms to all the requirements the documentation states.
It also means that you do not have to worry about setting up the IVT or about (EP)ROM.
Common sense tells us not to write to the bios area, as things are stored there that are beyond the average human's comprehension which also happen to be required for the computer to work properly.
so for the bios rom, pros: nice area for showing off 1337 skills, cons: one mistake and your box is braindead.
You could add another rom chip into an x86 system, but that's a different subject and requires quite a bit more arcane knowledge to make it work.
Posted: Mon Jun 04, 2007 3:24 pm
by Zacariaz
Combuster wrote:What it does not say is that the code and hardware responsible for doing this is implemented in the PC BIOS. When the computer boots, it will create the IVT and will set all the pointers to the appropriate interrupt handlers. Since the bios is contained in ROM mapped to 0xf0000-0xfffff, it conforms to all the requirements the documentation states.
It also means that you do not have to worry about setting up the IVT or about (EP)ROM.
Thats more or less what i thought would be the answer, but better be on the safe side when trying to understand this rather complicated stuff.
Thanks
Posted: Mon Jun 04, 2007 8:00 pm
by Colonel Kernel
This is "OS Design & Theory". Please post this type of question in "OS Development" next time.
Posted: Mon Jun 04, 2007 8:47 pm
by Brynet-Inc
Colonel Kernel wrote:This is "OS Design & Theory". Please post this type of question in "OS Development" next time.
Are you sure about that? This looks like "OS Development".. Although it seems chase made a duplicate? or a mirror?
Posted: Mon Jun 04, 2007 10:11 pm
by Colonel Kernel
This thread has been moved, objection withdrawn.
Posted: Mon Jun 04, 2007 11:06 pm
by Zacariaz
Colonel Kernel wrote:This is "OS Design & Theory". Please post this type of question in "OS Development" next time.
pardon me, but what should i post in "OS Design and Theory" then?
Posted: Mon Jun 04, 2007 11:44 pm
by Colonel Kernel
Zacariaz wrote:Colonel Kernel wrote:This is "OS Design & Theory". Please post this type of question in "OS Development" next time.
pardon me, but what should i post in "OS Design and Theory" then?
Ideas about design and theory, not questions about hardware and implementation details. Read some of the other posts in "OS Design & Theory" to get an idea.
An example of a good question for Design & Theory: "Should I use a microkernel or monolithic architecture for my OS?" An example of a bad question for Design & Theory: "How do I set up the page tables so that my kernel is mapped in the higher half?"
Does this help?
Posted: Mon Jun 04, 2007 11:46 pm
by Zacariaz
k, i get the point, but would still classify my question as theory.
Posted: Tue Jun 05, 2007 4:41 am
by Combuster
Zacariaz wrote:k, i get the point, but would still classify my question as theory.
I agree. The question was a corner case and could've gone to either development and theory. It was the answer that made it a purely practical affair.
Posted: Thu Jun 07, 2007 11:39 am
by bewing
Zacariaz wrote: I any case, what would the pros and cons be to using EPROM as suggested?
I'm not seeing a specific answer to this question in the replies, so far, I don't think. So here's the answer as best I know.
The statement you quoted in the Intel manual is aimed at motherboard manufacturers, not programmers or OS developers. As an OS developer, the use of ROM is hidden from you. You cannot access it directly. You cannot do anything with it, if it is there. The BIOS is what gets stored in that ROM, and is usually "shadowed" into your computer's RAM at physical address 0xF0000 to 0xFFFFF. Your OS probably can't, and probably shouldn't (assuming it can) even turn the shadowing off.
Posted: Thu Jun 07, 2007 12:18 pm
by Zacariaz
The word "software" in: 'Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide'
is what made it confusing, but i get it now.
Posted: Thu Jun 07, 2007 12:36 pm
by Combuster
Zacariaz wrote:The word "software" in: 'Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 3A: System Programming Guide'
is what made it confusing, but i get it now.
The BIOS is also a piece of software
Posted: Thu Jun 07, 2007 1:00 pm
by Zacariaz
sure it is, but if you are gonna program a bios, syrely you need more info than whats in the intel manual... or?