Firstly, bochs is TELLING me that:
Code: Select all
[CPU0 ] prefetch: EIP [00010000] > CS.limit [0000ffff]
My code segment limit IS 0xffff.
I went to my GDT and was reminded that there is only room to set a limit to 1 word, max. So, I naturally assumed that because I set the code segment limit to < 1 word in the GDT, that that's what was restricting me from jumping to my kernel. However, you tell me that if I have the granularity bit set ( and it is set... you've all seen my GDT ), that that extends the code segment limit... Okay, great! Bochs disagrees. I have the granularity bit set and yet I still get the prefetch error.
Other things:
Ah, k, didnt know that. You mentioned in your first post that with the GDT code limit to 0xffff [which is incorrect] it prevents you from 'jumping to your kernel' so I was suspecting that you were loading your kernel above that.
Okay, I don't think I've been very clear... The A20 line enables addressing over the 1Mb line: 0x100000 (that's a 1 with 5 zeros). Something else, (I suspect my GDT) is limiting my code segment range to BELOW one word: 0x10000 (a 1 with 4 zeros, so 0xffff and under is okay). I know that this "something else" factor is limiting me because of the prefetch message I get from Bochs. I actually >am< loading my kernel above 0xffff, but that's still below the A20 line, which is at 0x100000, not 0x10000.
0x1000000 (A20 limitation) > 0x10000 (kernel load location) > 0xffff (code segment limit)
I'm loading the kernel in that area on purpose, to test one thing at a time. Once I get the code segment limit to cooperate, then I'll test the A20 line.
Also:
Even 0xfffff, more than one word. And with the granularity bit you can make 00xfffff fff - fffff(limit) fff(added by setting the G bit)
I'm not fully understanding what you're saying here, but if the gist of it is that by setting the granularity bit, I can extend my code segment range, I have to remind you that the granularity bit IS set, yet Bochs is still throwing a complaint at me...
Again, thanks for the help/replies guys,
Brodeur235