OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 4:43 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: EPROM confusion
PostPosted: Mon Jun 04, 2007 2:41 pm 
Offline
Member
Member
User avatar

Joined: Tue May 22, 2007 2:36 pm
Posts: 1069
[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â€


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 2:46 pm 
Offline
Member
Member

Joined: Sat Apr 14, 2007 12:13 pm
Posts: 58
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 3:08 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 3:24 pm 
Offline
Member
Member
User avatar

Joined: Tue May 22, 2007 2:36 pm
Posts: 1069
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 8:00 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 6:06 pm
Posts: 1437
Location: Vancouver, BC, Canada
This is "OS Design & Theory". Please post this type of question in "OS Development" next time.

_________________
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 8:47 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 9:29 pm
Posts: 2426
Location: Canada
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? :roll:

_________________
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 10:11 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 6:06 pm
Posts: 1437
Location: Vancouver, BC, Canada
This thread has been moved, objection withdrawn. :)

_________________
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 11:06 pm 
Offline
Member
Member
User avatar

Joined: Tue May 22, 2007 2:36 pm
Posts: 1069
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 11:44 pm 
Offline
Member
Member
User avatar

Joined: Tue Oct 17, 2006 6:06 pm
Posts: 1437
Location: Vancouver, BC, Canada
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?

_________________
Top three reasons why my OS project died:
  1. Too much overtime at work
  2. Got married
  3. My brain got stuck in an infinite loop while trying to design the memory manager
Don't let this happen to you!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 11:46 pm 
Offline
Member
Member
User avatar

Joined: Tue May 22, 2007 2:36 pm
Posts: 1069
k, i get the point, but would still classify my question as theory.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 05, 2007 4:41 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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.

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 07, 2007 11:39 am 
Offline
Member
Member
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1401
Location: Eugene, OR, US
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 07, 2007 12:18 pm 
Offline
Member
Member
User avatar

Joined: Tue May 22, 2007 2:36 pm
Posts: 1069
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 07, 2007 12:36 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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 :wink:

_________________
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 07, 2007 1:00 pm 
Offline
Member
Member
User avatar

Joined: Tue May 22, 2007 2:36 pm
Posts: 1069
sure it is, but if you are gonna program a bios, syrely you need more info than whats in the intel manual... or?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 136 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group