OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 3:02 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Mon Jan 02, 2017 4:36 pm 
Offline
Member
Member
User avatar

Joined: Fri Mar 07, 2008 5:36 pm
Posts: 2111
Location: Bucharest, Romania
Although I don't think the answers you got were particularly reasonable (WHY ALL THE SHOUTING?), you'd get a lot more respect if you actually followed the advice people are giving you about the learning process. They're not just empty words, you know. You're not the first one to think he's clever, ignore them, and think the easy way out will work just fine if you just figure out a few more technical details---it's actually not right around the corner at all. And you won't be the last to think it either. So far, you're setting yourself up for failure in a big way but don't know enough to see it and the rest of the forum is watching it happen. It's up to you to change that.

_________________
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Mon Jan 02, 2017 4:44 pm 
Offline
Member
Member
User avatar

Joined: Tue Aug 02, 2016 1:52 pm
Posts: 286
Location: East Riding of Yorkshire, UK
NunoLava1998 wrote:
Can't you just (and other OSDevers in the forum) treat me like a normal user? Can't i just get a nice answer?

Yes. You need to do a bit of research yourself though.
I don't think people mind helping you, but sometimes you need to help yourself.

_________________
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Compiler Development Forum


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Mon Jan 02, 2017 5:00 pm 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4597
Location: Chichester, UK
NunoLava1998 wrote:
Can't you just (and other OSDevers in the forum) treat me like a normal user? Can't i just get a nice answer?

It's a two-way street; to be treated as a normal user first you have to act like a normal user. A normal user does not post over and over about every line of code they are trying to write. A normal user does not expect others to do all the work for them and to baby-sit them through the basics of processor operation. A normal user does a bit of research first. A normal user pays some heed to the advice they are given.

No-one can give you a nice answer to your question because no-one, you least of all, know what you are really asking. You have such a lack of understanding - and an inability, it seems, to learn - of what is involved that you really don't know what you are asking for.

Example - you are testing your IDT by doing an interrupt 0. And it fails; of course it does. You haven't defined an interrupt routine to handle this interrupt and you haven't made an entry in the IDT for it. So a triple fault is the only possible result (as you don't have handlers for GPF and PF exceptions either).

You are not ready for OS development yet; you need to understand better what it is that you are trying to do.


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Tue Jan 03, 2017 4:10 am 
Offline
Member
Member

Joined: Sun Feb 01, 2009 6:11 am
Posts: 1070
Location: Germany
NunoLava1998 wrote:
Kevin wrote:
He is just copying code from http://wiki.osdev.org/LGDT without understanding it.

And as the comment there says, what you should put there is "Some GDT entries, like null, kernel code, kernel data, user code, user data, TSS..."


So? I don't know what those are. I implemented a big part of my IDT/GDT almost-complete loader, not copy pasting.
Besides, i wasn't copy pasting, i was actually chatting with some os devers for 3 hours trying to get IDT to work.

Okay, first of all: Forget about the IDT for now, get a working GDT first. Once that works, the IDT shouldn't be too hard because its structure is similar. The way to check whether your GDT is valid is to reload the segment registers.

The other thing is: How did you implement a "big part of my IDT/GDT" without knowing what GDT entries are? The GDT is literally just an array of GDT entries, so without entries you shouldn't have anything. Each GDT entry is a 64 bit integer, whose meaning is described in the wiki article.

Next step: Now you try and figure out how many entries you need in your GDT and which numbers to put there. Then tell us those numbers and we'll check them. Don't come back before you haven't made at least an attempt at them. The wiki describes everything you need, and checking the Intel manual can't hurt either.

_________________
Developer of tyndur - community OS of Lowlevel (German)


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Tue Jan 03, 2017 4:49 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4597
Location: Chichester, UK
Kevin wrote:
get a working GDT first. Once that works, the IDT shouldn't be too hard because its structure is similar.

I'm not so sure about that. I don't think that the OP realizes that he has to write interrupt routines for the interrupt descriptors to point to. In reality it seems pretty clear that he only understands interrupts as software interrupts (and even then doesn't seem to know that he needs a handler for the descriptor to point to). Exceptions and hardware interrupts are still unknowns; unfortunately they are not "things that we know that we don't know".


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Tue Jan 03, 2017 5:01 am 
Offline
Member
Member

Joined: Sun Feb 01, 2009 6:11 am
Posts: 1070
Location: Germany
Well, possibly. Anyway, one problem at a time. And without a GDT, you can't get a working IDT, so GDT is first.

_________________
Developer of tyndur - community OS of Lowlevel (German)


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Wed Jan 04, 2017 2:37 am 
Offline
Member
Member

Joined: Sun Oct 09, 2016 4:38 am
Posts: 273
Yeah, i really had no idea what i was doing.
I'm now loading the GDT/IDT properly.

_________________
Developing TRIODIUM OS. Or call it Dixium if you want. It doesn't matter.

https://github.com/NunoLava1998/DixiumOS


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Sun Jan 15, 2017 2:38 am 
Offline
Member
Member
User avatar

Joined: Tue Jan 10, 2017 3:19 pm
Posts: 84
I just look at this thread and say "was I really that stupid so little ago?".

_________________
(not so frequently updated) Code is at:

https://github.com/NunoLava1998/DixiumOS-1


Top
 Profile  
 
 Post subject: Re: What do i put in gdt_start and idt_start?
PostPosted: Sun Jan 15, 2017 6:35 am 
Offline
Member
Member
User avatar

Joined: Thu Jul 12, 2012 7:29 am
Posts: 723
Location: Tallinn, Estonia
DixiumOS wrote:
I just look at this thread and say "was I really that stupid so little ago?".


And you still are! Imagine that.

_________________
Learn to read.


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 248 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