OSDev.org

The Place to Start for Operating System Developers
It is currently Sat May 18, 2024 6:31 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Sun Sep 09, 2007 9:24 am 
Offline
Member
Member

Joined: Sat Jun 03, 2006 11:00 pm
Posts: 38
Candy wrote:
mmiikkee12 wrote:
I was planning on waiting until I have all my current code working before importing it into a SVN repo. Should I do that now so you can see my code?


It's advisable to check into a svn / cvs / something repo ASAP after you get one more feature working. You wouldn't be the first to have the just-not-working product remove half its source.
'

My current code == GDT+IDT :-)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 15, 2007 9:02 am 
Offline
Member
Member

Joined: Sat Jun 03, 2006 11:00 pm
Posts: 38
OK, I got past the GDT problems. Now QEMU is telling me this:
Quote:
qemu: fatal: Trying to execute code outside RAM or ROM at 0x000b8f00

EAX=000b8f00 EBX=00103000 ECX=0000011b EDX=00000000
ESI=000250b0 EDI=00030f48 EBP=001020fc ESP=00102094
EIP=000b8f00 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0010 00000000 ffffffff 00cf9300
CS =0008 00000000 ffffffff 00cf9a00
SS =0010 00000000 ffffffff 00cf9300
DS =0010 00000000 ffffffff 00cf9300
FS =0010 00000000 ffffffff 00cf9300
GS =0010 00000000 ffffffff 00cf9300
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT= 0010b020 00000017
IDT= 0010b040 000007ff
CR0=60000011 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00000004 CCD=fffffffc CCO=SUBL
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
[FPR0-7 and XMM0-7 are all 0.]


And Bochs tells me this:
Quote:
00016806479i[CPU0 ] LOCK prefix unallowed (op1=0x87, attr=0x300, mod=0xc0, nnn=5)
00016859235i[CPU0 ] LOCK prefix unallowed (op1=0x53, attr=0x0, mod=0x0, nnn=0)

The second line repeats until I kill Bochs, and prints isr_handler each time it happens.

I finally got around to putting my code in SVN, the kernel code is here: http://dinounix.ath.cx/delta/?module=svn&mode=browse&path=/kernel/source/&rev=HEAD


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 15, 2007 9:16 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
your asm stubs are incorrect: you push two values (or one if the error code is already there), but you neglegt to pop them once the interrupt routine returns
Code:
push 0
|
| push %1
|  |
|  | jmp isr_common_stub
|  | pusha
|  |  | call isr_handler
|  | popa
|  |
|  ?
?
ret

_________________
"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: Sat Sep 15, 2007 9:26 am 
Offline
Member
Member

Joined: Sat Jun 03, 2006 11:00 pm
Posts: 38
Thank you! add esp, 8 did it. (How did I forget that?)

Oh well, everyone makes mistakes. I just happen to make many more mistakes than most other people.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 15, 2007 11:26 pm 
Offline
Member
Member

Joined: Wed Mar 07, 2007 10:09 am
Posts: 43
Location: Minneapolis, Minnesota
you'd be surprised


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 22, 2007 5:11 am 
Offline

Joined: Thu Oct 21, 2004 11:00 pm
Posts: 3
mmiikkee12 wrote:
Still the gate type 7 message.

I'm going to take a short (couple of hours) break from OSDev for a few hours to do some web coding (for my OS's website of course :-), but please feel free to try to tell me wtf is going on :-)


Gate Type? Are you sure you're not making your code segment a "System" segment?


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 20 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