Page 1 of 3
Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 11:19 am
by MrXon
There?s something I dont understand about page tables, or the page table descriptors. Each descriptor is 4 bytes long. and it should hold two things; the physicall address And some attributes. But how can this be done with only 4 bytes (since you mabye need 32 bits to point the page to an physical address, and then you also need some bits to set some attributes)
Re:Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 11:26 am
by MrXon
OR can I just "point" a page to a physicall adress that looks like:
4096 * x (x = arbitrary number)
and with a number like this, the "lowest bits" will never change (always be zero) and therefore used to set attributes (the CPU believes that the lowest bits wont matter and simply work as they are all zeros)
Re:Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 11:26 am
by Curufir
Because the pages are aligned on 4k boundaries, so you don't need all the bits to determine the start address of a page.
Re:Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 11:38 am
by MrXon
You mean like I wrote some seconds before you answered me? So it doesnt make any difference if I point a page to
0x3000 and 0x3005 (but the attributes will change)?
Re:Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 12:19 pm
by Curufir
MrXon wrote:
You mean like I wrote some seconds before you answered me?
Oddly enough I'm not sufficiently clairvoyant to guess that you're writing a response to your own question whilst writing a response of my own.
From the Intel manual (Describing page table entries).
Code: Select all
Page base address, bits 12 through 32
(Page-table entries for 4-KByte pages.) Specifies the physical address of the
first byte of a 4-KByte page. The bits in this field are interpreted as the 20 mostsignificant
bits of the physical address, which forces pages to be aligned on
4-KByte boundaries.
ONLY the 20 most significant bits are relevant. The others are assumed 0 as pages
MUST be aligned on a 4k boundary. You
CANNOT make a page's base address non-aligned.
Re:Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 12:46 pm
by MrXon
Thank you

Hee-Hee I thought that if I?ve figured the answer out by myself it would be to bad to let someone write a long explanation if all I needed was an "yes", and since I?m no member yet it was impossible for me to just edit my first message.
Re:Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 3:10 pm
by Curufir
Yeah, sorry about that. Maybe I should try decaff

.
Re:Page tables, 4 bytes?
Posted: Wed Aug 11, 2004 3:35 pm
by MrXon
No, dont do so, I though OS:es were built of caffein? ;D
Re:Page tables, 4 bytes?
Posted: Thu Aug 12, 2004 3:10 am
by Pype.Clicker
MrXon wrote:
No, dont do so, I though OS:es were built of caffein? ;D
Clicker is 100% minth-thee. No caffeine involved (except in old craps in ASM that were tossed as soon as i get rid of CocaCola addiction

)
Re:Page tables, 4 bytes?
Posted: Thu Aug 12, 2004 3:38 am
by distantvoices
Hmmm ... blueillusion is buildt on 100 % pure coffee. Don't drink Coca Cola for thats way too sweet - et par ailleurs (it's long ago I've used *this* word the last time), moi, etant d'origin viennoise, is coffee addict per se. It's in our viennese blood to be more or less coffee addict *gg*
erm, Pype - are you sure you don't have relatives in some british stone circle village Asterix has paid a visit to in another century? minth-tea sounds so toroughly british ];->

Re:Page tables, 4 bytes?
Posted: Thu Aug 12, 2004 6:00 am
by MrXon
Doesnt tee contains caffein? Then I?ve wasted lots and lots of time one that drink
beyond infinity: sweet?s the right word, I?ve lost almost 10 kg (22 pounds) during thi summer after gettin out of my cola addiction

Re:Page tables, 4 bytes?
Posted: Thu Aug 12, 2004 7:11 am
by Curufir
Coffee and tea are pretty much equivalent in terms of caffeine.
Of course how strong you take it, and what variety is used can make a lot of difference, but you really shouldn't think of tea as being significantly lower in caffeine.
As for coca-cola...the dentists call it "liquid candy" and I tend to agree. It is entirely too sickly sweet for my taste.
I'm also a tea person. Earl Grey or Darjeeling

.
Re:Page tables, 4 bytes?
Posted: Thu Aug 12, 2004 7:34 am
by MrXon
The taste of Coke is a gift from God but it?s not good for you

Re:Page tables, 4 bytes?
Posted: Thu Aug 12, 2004 7:46 am
by BI lazy
A gift from the gods?
Nah, then the gods themselves have bad taste *rofl* and you should look up the translation of 'gift' from german to english *dg*
At worst it is, when the damned stuff gets warm *igitt*
Re:Page tables, 4 bytes?
Posted: Thu Aug 12, 2004 7:51 am
by MrXon
Hehe what does gift mean in german? In Sweden, gift?s the word for poison
Yes it should be enjoyed ice cold. And an opened bottle will only remain drinkable (spelling?) for one day or so, then the carbonate is gone