@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> only one segment? how come?
<0> you need at least two, code & data
<1> yes
<1> i do
<1> 0x08=code
<1> 0x10=data
<1> and yes the handler code is correct i just tried it
<1> could the cli be the problem?
<0> no
<0> cli is pointless, but should cause problems
<0> sti, on the other hand, can be dangerous later
<1> so should i try it on real hardware with sti removed?
<0> delete them both -- CPU automatically clears IF on entry via interrupt gate and sets on iret
<1> ok
<1> i'll try
<1> i have to use this computer at the moment



<1> so i'll have to restart
<1> see you later
<1> same problem
<0> anything special around this jump?
<1> should i post the code?
<1> it's just a call_main
<1> there's a space between that call and _main
<1> and then _to_jmp:
<1> jmp _to_jmp
<0> uh... so your main() actually returns?
<1> yeah
<1> i push %eax and push %ebx before that
<1> must i put an explicit return?
<1> in the main
<1> but even if the jmp is in the main function it still gives a problem
<0> no
<1> why does it only give problems on hardware?
<1> it does it on qemu too
<2> because emulators aren't necessarilly accurate
<3> emulators do not map complete systems. just the parts that most of the software uses.
<2> and then, even on real hardware, if you do something illegal it may or may not work
<2> depending on the manufacturer, version
<3> oh .. not to mention the bugs :)
<1> yeah i see
<1> i meant i doesn't work on qemu
<1> ok
<1> so when i return from an interrupt
<1> the next instruction causes a double falt
<1> i mean a general protection fault
<1> when do i send an end of interrupt?
<2> to what from where?
<2> and which interrupt are you returning from?
<2> did you properly deal with the error code?
<1> the interrupt is interrupt 0(timer)
<1> i return from that
<1> and there is no error code
<2> eh. wait a sec
<2> it's literally exception vector 0?
<1> no it is irq 0
<2> ah, so you did remap the PIC
<1> which is mapped to 0x20
<2> ah good. almost had me worried there for a bit
<1> i just send the EOI signal to the first pic right?
<2> if it's < 8 yes
<1> yeah so timer is just the first one
<1> my handler is(in at&t syntax):
<1> pusha
<1> call timer_handler(a c function)
<1> popa
<1> iret
<2> i ***ume you dont have ring3 code?
<2> if everythign is ring0, that'll work
<1> yeah i;m in ring0
<1> i only have 1 code segment in ring0
<2> otherwise you'd need to reload ds,es,fs,gs before continuing (since they may still have ring3 descriptors in them)
<1> could it be the cpu trying to call another irq which is just set as 0
<2> yeah but that wouldn't cause a double fault
<1> it's a general protection fault
<2> yeah, dunno.
<1> for some reason in my exception handler ss is 00000
<2> ah, now you're getting somewhere



<2> figure that out
<1> now it's giving me a gpf on the mov $0x10,%eax instruction(0x10 is my data segment)
<1> i don't think it's a problem with me
<1> well i mean with the interrupt
<1> because if i just let the gpf go without halting, the timer goes fine
<1> in a division by zero exception
<1> it reports 15 is ss
<1> but it should be 16
<1> what could be causing this ss trouble
<4> $0x10 is a constant, not a reference into data segment
<1> so what should i say?
<4> actually I don't care
<4> oops, he's gone
<5> http://charliebrown.outwardhosting.com/~kmw/Super_Bowl_XLI.png
<1> i sometimes get a gpf sometimes i don't and sometimes i get it after a few seconds
<1> it has something to do with my timer isr
<1> only when i enter a loop
<2> sounds like fun
<6> gn
<7> yo
<8> is there anything stopping an operating system from being written in objective-c?
<2> not really. some poition of the next kernel had objective c in it
<2> it's the same as most slightly higher level languages
<2> there may or may not be problems with the runtime at the lowest level
<2> and of course it all depends on what you define as 'operating system'
<2> as in, most oses are made up of many layers, each of which can be done in whatever language
<2> typically the absolutely lowest layer is in C or asm, and probably will remain so for the forseeable future
<2> C was designed to write oses in
<2> well, kernels
<2> but you could write all the bits around the lowest level services in a higher level language if you can deal with the language's runtime
<2> drivers, filesystems, networking, etc
<9> I would think about using D, instead of C
<9> but I dont know that language very well yet
<8> well, how about the kernel?
<2> though i pretty much cleared that up in my little essay there
<8> err... what's stopping anything that could be written in C from being written in obj-c?
<8> I guess is my question
<2> at some point you have to write the objc runtime
<8> oh... so the stuff that p***es messages and what not
<2> right
<2> but all in all objc doesn't have very much of one
<2> and that might actually come for free with the compiler
<2> so yeah, objc you could probably do almost everyrhing with (except for the obvious places where you need ***embly)
<2> it'd be much like C++ in that you can do it but you have to know what you're doing
<8> so you could probably start using it as soon as you have a heap set up, right?
<2> yeah, depends on if the runtime uses heap allocations
<2> mind you that anything that automatically does stuff like use the heap behind your back is pretty much not okay for very low level stuff
<8> eh... I'm starting to have second thoughts about this. Unless I could somehow get the runtime to use my os's slab, I dunno if I like it.
<2> midn you i dont think it does
<2> raw objc i *think* only does the method mapping
<2> which doesn't use any heap
<8> that kinda explains why it's split into alloc/init/new
<8> alloc probably calls malloc or something
<2> that's not objc
<2> when i say objc i'm talking about the *language*
<2> not the common patterns people put on top of it
<8> ohh
<2> you'd probably have to design your own stuff for that
<1> if i have an interrupt 0x50, and i call int 0x50, will it enter ring-0
<1> i mean the interrupt 0x50 is in my idt
<8> If I'm not mistaken, that's how you get back to ring-0
<8> on an interrupt
<9> iammisc: still havent read the Intel manuals, have you?
<8> geist: Simon Cooper didn't know who you were... he also said he couldn't find you in the employee listing, but he said he thought newos was really cool
<1> Mathis: i'm just confused
<9> iammisc: reading those manuals will clear it
<1> ok i'm starting it right now
<2> sp1nm0nkey: i dont work at apple anymore
<8> geist: Where do you work now?
<2> sp1nm0nkey: i work at a game company called Secret Level
<2> just started a couple of weeks ago
<8> how do you like game development?
<8> "PICTURE: 80-year-old Chinese man washes hair for the first time in 26 years" "I think i just thew up in my mouth." "okay, now keep it there for 26 years. Then I'll digg you up."
<10> geist: Too much stress and stuff at apple?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #osdev
or
Go to some related logs:

#ldap
#math
unexpected $end in / modernbill
#javascript
emerge evtest
backports php5-mcrypt
remove mesa drivers
ubuntu nzbget zlib
uninstall a python module
#web



Home  |  disclaimer  |  contact  |  submit quotes