Changeset 0882a9a in mainline for arch/ia32/include/mm/page.h


Ignore:
Timestamp:
2006-02-10T16:11:14Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ecbdc724
Parents:
d0a0f12
Message:

Make use of one unused bit in PTE formats of amd64, ia32 and mips32 to store 1 in valid mappings.
This helps to distinguish valid entries from not present entries with 0 content (i.e. not present
entries with PFN 0 and other bits cleared).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/mm/page.h

    rd0a0f12 r0882a9a  
    7878#include <typedefs.h>
    7979
     80/** Page Table Entry. */
    8081struct page_specifier {
    8182        unsigned present : 1;
     
    8889        unsigned pat : 1;
    8990        unsigned global : 1;
    90         unsigned avl : 3;
     91        unsigned soft_valid : 1;        /**< Valid content even if the present bit is not set. */
     92        unsigned avl : 2;
    9193        unsigned frame_address : 20;
    9294} __attribute__ ((packed));
     
    116118        p->writeable = (flags & PAGE_WRITE) != 0;
    117119        p->global = (flags & PAGE_GLOBAL) != 0;
     120       
     121        /*
     122         * Ensure that there is at least one bit set even if the present bit is cleared.
     123         */
     124        p->soft_valid = true;
    118125}
    119126
Note: See TracChangeset for help on using the changeset viewer.