Printf on paggin mode.
Printf on paggin mode.
Hi,
I have my paggin mode working. It's only a simple paggin mode, and very basic. Only when i'm trying to print something on screen my os reboots. Any idea?
Thanks
I have my paggin mode working. It's only a simple paggin mode, and very basic. Only when i'm trying to print something on screen my os reboots. Any idea?
Thanks
Re:Printf on paggin mode.
I have some idea but for just not wasting memory for which people pay, I wont say things that will create a chaos in your mind. So: How do you map memory?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Printf on paggin mode.
it sounds like you have no working page fault handler and for some reason, accessing the video memory triggers a PF.
Did you make sure the kernel code is still mapped in a consistent fashion with non-mapped addresses ?
Did you make sure the kernel code is still mapped in a consistent fashion with non-mapped addresses ?
Re:Printf on paggin mode.
Sorry Pype i didn't understand well what you are asking for.Did you make sure the kernel code is still mapped in a consistent fashion with non-mapped addresses ?
In the other hand, how many video memory should i map? 512k? 256Mb? better do it dinamycally?
Re:Printf on paggin mode.
try to use all the 4G for your kernel, if this works then the problem is due to a wrong memory mapping (video ram pages are not mapped).
check that memory from A000:0000 (video RAM base) to 1Mb is correctly mapped and not ysed by the kernel.
try also to use an identity mapping of the first 4Mb of RAM (this seems to be a convention).
check that memory from A000:0000 (video RAM base) to 1Mb is correctly mapped and not ysed by the kernel.
try also to use an identity mapping of the first 4Mb of RAM (this seems to be a convention).
Re:Printf on paggin mode.
try to use all the 4G for your kernel, if this works then the problem is due to a wrong memory mapping (video ram pages are not mapped).
check that memory from A000:0000 (video RAM base) to 1Mb is correctly mapped and not ysed by the kernel.
try also to use an identity mapping of the first 4Mb of RAM (this seems to be a convention).
check that memory from A000:0000 (video RAM base) to 1Mb is correctly mapped and not ysed by the kernel.
try also to use an identity mapping of the first 4Mb of RAM (this seems to be a convention).
Re:Printf on paggin mode.
if you had done some os programming yourself instead of making stupid comments, like "are u sure that u watch the right monitor", you would know why the computer resets itself on a crash.if it crashes, why does it reboot itself ?
it could remain frozen
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Printf on paggin mode.
@bubach: Ach, don't pay too much attention to that git. Maybe he's got problems with his ma 'n' da and now has a go at each and every one coz he canna bear it.
@balroj: map your kernel adress space in this way: virtual adress 0x0 = physical adress 0x0, and so forth. take care that virtual 0xa0000 is also mapped to physical 0xa0000 and virt. 0xb8000 to phys. 0xb8000. You map in ranges of 4k. Take this into consideration. Write some handler for exception 0x14.
stay safe.
@balroj: map your kernel adress space in this way: virtual adress 0x0 = physical adress 0x0, and so forth. take care that virtual 0xa0000 is also mapped to physical 0xa0000 and virt. 0xb8000 to phys. 0xb8000. You map in ranges of 4k. Take this into consideration. Write some handler for exception 0x14.
stay safe.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Printf on paggin mode.
hum, afaik, this is exception 0x0e , not 0x14 ... and that's certainly a mandatory step before you activate paging ...beyond infinity wrote: Write some handler for exception 0x14.
And just for the tip: i used to switch the background colour or the overscan color of the screen before and after a 'cruxial' operation of pmode set up so that i can always get a trace of what was wrong even if video memory access is screwed up.
Check out VGA registers to be sure, but iirc it looks something like
Code: Select all
setbg 0,0,63
now_try_something_nasty
setbg 0,0,0
%macro setbg 3
xor al,al
mov dx,0x3c8
out dx,al ; select color 0 (background)
inc dx
mov al,%1
out dx,al ; red value
mov al,%2
out dx,al ; green value
mov al,%3
out dx,al ; blue value
%endmacro
Re:Printf on paggin mode.
@pype: thanks for correcting, that's a plain typo. Writing 0x and thinking in decimal is not the most recommendable way to write a tip.
*feels ashamed for that ...*
*feels ashamed for that ...*