Some errors
Some errors
Hi, I have two questions:
1. When I testing OS in BOCHS 2.0.2, it shows this message "00000960879p[CPU ] >>PANIC<< prefetch: RIP > CS.limit", what does it mean?
2. Can I use s1 === s2 instead of strmp(s1, s2), I mean use === as operator?
Thnx
1. When I testing OS in BOCHS 2.0.2, it shows this message "00000960879p[CPU ] >>PANIC<< prefetch: RIP > CS.limit", what does it mean?
2. Can I use s1 === s2 instead of strmp(s1, s2), I mean use === as operator?
Thnx
Re:Some errors
In real mode, it means that IP has gone beyond 64KB.Unexpected wrote:Hi, I have two questions:
1. When I testing OS in BOCHS 2.0.2, it shows this message "00000960879p[CPU ] >>PANIC<< prefetch: RIP > CS.limit", what does it mean?
In protected mode, it means that EIP has gone beyond the CS segment limit.
No. Why should you? === isn't an operator.2. Can I use s1 === s2 instead of strmp(s1, s2), I mean use === as operator?
Re:Some errors
1. Is there bug in jumping to pmode?
2. I mean, can I declare === as strcmp() ?
2. I mean, can I declare === as strcmp() ?
Re:Some errors
What programming language are you using? C++ supports overloading operators, I think that's what you want.Unexpected wrote: 2. I mean, can I declare === as strcmp() ?
Re:Some errors
Maybe. It's your code -- you tell me...Unexpected wrote:1. Is there bug in jumping to pmode?
No. C++ doesn't let you define your own operators, nor does it let you override existing ones (so you can't define [tt]operator =(const char *, const char *);[/tt]). Stick with strcmp() or use the [tt]std::string[/tt] class.2. I mean, can I declare === as strcmp() ?
Re:Some errors
Oups, not quite right. C++ only allows you to define the result of operators in combination with structs or classes.abless wrote: What programming language are you using? C++ supports overloading operators, I think that's what you want.
Sorry for that
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Some errors
you should CLI before you enter pmode ... you have a STI @ done which is necessary for correct floppy reading, but i can't see any CLI after that ...
Re:Some errors
Added befor jumping to PMode CLI's but still I have "RIP > CS.limit"
Maby some problem in 2nd stage?
But in 2nd stage I coded only INT handlers and reloading GDT.
Maby some problem in 2nd stage?
But in 2nd stage I coded only INT handlers and reloading GDT.
Re:Some errors
Try adding a STI after setting up your real-mode stack. I see that you have a CLI but no STI.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Some errors
a pmode second stage ? how will it load your kernel ? using VM86 or something alike ?
Re:Some errors
No it in PMode, jus compiled as AOUT and I use it for functions that I can't use in C.. anyway here is a source.
[attachment deleted by admin]
[attachment deleted by admin]
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Some errors
i definitely think you should try to find out what's the value of EIP at the time of the crash. Maybe you can also use "show call" (or something alike) in the bochs debug command line, to find out what called that buggy code ...
are you aware that flags are pushed and popped automagically by the CPU when a IRQ is handled ? and that IF is cleared before the interrupt handler is called ?
your CLI, STI PUSHF and POPF in IRQx_HANDLER are just confusing, imho...
(and dangerous as it will reenable interrupts before the previous one returns ... if your handler last too long, you might have a stack overflow quickly ...
are you aware that flags are pushed and popped automagically by the CPU when a IRQ is handled ? and that IF is cleared before the interrupt handler is called ?
your CLI, STI PUSHF and POPF in IRQx_HANDLER are just confusing, imho...
(and dangerous as it will reenable interrupts before the previous one returns ... if your handler last too long, you might have a stack overflow quickly ...