Reset when i enable paging

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
paulbarker

Re:Reset when i enable paging

Post by paulbarker »

Thanks Brendan, that makes things a lot clearer.

From the multiboot spec:
If bit 0 in the `flags' word is set, then the `mem_*' fields are
valid. `mem_lower' and `mem_upper' indicate the amount of lower and
upper memory, respectively, in kilobytes. Lower memory starts at
address 0, and upper memory starts at address 1 megabyte. The maximum
possible value for lower memory is 640 kilobytes. The value returned for
upper memory is maximally the address of the first upper memory hole
minus 1 megabyte. It is not guaranteed to be this value.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Reset when i enable paging

Post by Candy »

Brendan wrote: Basically the ISA bus itself only has 20 address lines, which means anything on that bus can only access the first 16 MB of physical addresses. This means if you've got an ISA card that supports some sort of memory mapped I/O (e.g. an ISA video card with linear frame buffer support), then it's memory mapped I/O region must be below 16 MB.
*cough* ISA has 24 address bits, which amounts to 16MB. 20 address bits amount to 1MB, which also explains why you need to enable A20 (address line 20, the 21st line) to access more than one MB.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Reset when i enable paging

Post by Brendan »

Hi,
Candy wrote:*cough* ISA has 24 address bits, which amounts to 16MB. 20 address bits amount to 1MB, which also explains why you need to enable A20 (address line 20, the 21st line) to access more than one MB.
Doh - sorry, I must've mis-counted. ::)

I just wish there was a "15 year rule", where any bad hardware descisions from 15 years or more ago is dropped from the architecture. That way would could get rid of ISA, the ISA holes and A20 gate completely (and possibly even get rid of the PIC, floppy drive controller and ISA DMA chips too).

I can imagine someone in the year 3006 trying to explain why the A20 gate, etc still exists...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Reset when i enable paging

Post by Candy »

Brendan wrote: Doh - sorry, I must've mis-counted. ::)
That's ok, happens to me all the time.
I just wish there was a "15 year rule", where any bad hardware descisions from 15 years or more ago is dropped from the architecture. That way would could get rid of ISA, the ISA holes and A20 gate completely (and possibly even get rid of the PIC, floppy drive controller and ISA DMA chips too).

I can imagine someone in the year 3006 trying to explain why the A20 gate, etc still exists...
I'm designing my OS for purely new technology that'll be common in some 5-10 years for most computers. That way, you plain ignore the old quirky stuff. Add to that a boot loader that abstracts this odd stuff to a normal layer and you've reduced the OS creation story to a short one.

Hardware items I'm going to support directly:
AC97 audio
not decided on video yet, probably one ATI and one Nvidia driver (no intel, don't have any computers with intel video cards and they don't make chipsets for amd processors)
Realtek 8139/8169 network (responsible for a large portion of network cards, and if you don't have one they're cheap as chips)
AMD64 only (so everything can be handled the exact way I want it to, such as the IST handling etc.)
USB keyboard and mouse (no ps2, no quirky stuff)
USB storage (SCSI RBC and ATAPI), harddisks and ATAPI devices (mainly cdrom/dvdrom etc).

That should be the full list. Note that it doesn't include any really legacy hardware. It is a list that pretty much describes a new computer as bought by the average consumer, which is what I'll be aiming for to have a released OS for in 2010.


In short, make your own limit what you won't support, because the legacy old stuff will only become older and more legacy.
B.E

Re:Reset when i enable paging

Post by B.E »

Brendan wrote: I just wish there was a "15 year rule", where any bad hardware descisions from 15 years or more ago is dropped from the architecture. That way would could get rid of ISA, the ISA holes and A20 gate completely (and possibly even get rid of the PIC, floppy drive controller and ISA DMA chips too).
add to that list 16-bit bios. it is about time we moved into a 32-bit bios.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Reset when i enable paging

Post by Brendan »

Hi,

@Candy: That means none of my computers will run your OS... :)
B.E wrote:add to that list 16-bit bios. it is about time we moved into a 32-bit bios.
16-bit BIOSs aren't obsolete yet - even Vista will require one.

The 16-bit BIOS will become obsolete in between 5 and 10 years. When this happens we'll all need to shift to EFI, and there'll be optional "legacy" BIOSs that we can all ignore...

Of course Apple have skipped ahead, but they aren't restricted to "PC compatible" hardware and don't need to care about supporting "legacy" software or hardware. :)


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re:Reset when i enable paging

Post by Candy »

Brendan wrote: @Candy: That means none of my computers will run your OS... :)
Not to worry, none of my computers can run my OS atm. I'm saving up for a 64-bit system conversion.

I'm aiming my os at the computer age when it will be done, not the leftovers when I started coding.
omin0us

Re:Reset when i enable paging

Post by omin0us »

hmm...i still cant figure this out :(
everything looks like it should to me.
PatrickBic

Re:Reset when i enable paging

Post by PatrickBic »

when i enable paging (mapping the first 4mb of mem) and i enter some commands into my debugging shell i get a invalid opcode or a out of bounds exception (reported through my exception handler) after entering the second command.

when i dont enable paging i can enter as much commands as i like because there arent any problems.
Post Reply