Page 1 of 1

Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 5:29 am
by shedokan
Hi,
I was reading about BDA having valuable information and that I shouldn't overwrite it.
So I was thinking maybe it would be better to just relocate it to someplace(possibly a page that would be moved on disk).

And I also was thinking to overwrite the IVT since I am not going back to real mode anyways.

So are there any cons for overwriting the IVT or relocating the BDA?

Thanks

Re: Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 7:31 am
by Karlosoft
Only if you are in real mode. However there are some information that should't be erased, because in the future you could have to return in real mode in some way.

Re: Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 7:35 am
by shedokan
Karlosoft wrote:Only if you are in real mode. However there are some information that should't be erased, because in the future you could have to return in real mode in some way.
Well except for changing VGA mode I don't really think there is a reason to return to real mode(and for that too I can write a vga driver)

But what I am asking is - will there be side affects of doing this?

Re: Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 7:45 am
by Tosi
If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.

Re: Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 8:11 am
by shedokan
Tosi wrote:If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.
Thanks, I thought it was much complicated than that.

Re: Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 8:45 am
by Chandra
shedokan wrote:
Tosi wrote:If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.
Thanks, I thought it was much complicated than that.
"I have the word 'Complicated' ".(Just kidding)
Anyway, I don't see any reason to overwrite the BDA and the IVT even if you don't use them in the future.What is so annoying about just saving them? They don't even cost you any reasonable amount of memory.

Re: Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 9:50 am
by shedokan
Chandra wrote:
shedokan wrote:
Tosi wrote:If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.
Thanks, I thought it was much complicated than that.
"I have the word 'Complicated' ".(Just kidding)
Anyway, I don't see any reason to overwrite the BDA and the IVT even if you don't use them in the future.What is so annoying about just saving them? They don't even cost you any reasonable amount of memory.
I just want to have my system on 0:0 :)
that way everything's organized, it's not fair letting something I'm not going to use(or rarely) be on the memory before my kernel.

if the kernel is in control it should be placed at 0:0

Re: Should I overwrite the IVT and relocate the BDA?

Posted: Sat Feb 26, 2011 4:58 pm
by Chandra
Shedokan wrote: if the kernel is in control it should be placed at 0:0
Bad Idea. If your kernel grows in size significantly, then it'll write over the VRAM and you end up with a BROKEN OS.
A neatly written OS always organizes things so it's always best to load your kernel at 1Mb mark and leave the data below it untouched. You can then use paging to remap it to some higher addresses.