Changeset 0882a9a in mainline for arch/amd64/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/amd64/include/mm/page.h

    rd0a0f12 r0882a9a  
    7676#ifndef __ASM__
    7777
     78/** Page Table Entry. */
    7879struct page_specifier {
    7980        unsigned present : 1;
     
    8687        unsigned unused: 1;
    8788        unsigned global : 1;
    88         unsigned avl : 3;
     89        unsigned soft_valid : 1;                /**< Valid content even if present bit is cleared. */
     90        unsigned avl : 2;
    8991        unsigned addr_12_31 : 30;
    9092        unsigned addr_32_51 : 21;
     
    125127        p->no_execute = (flags & PAGE_EXEC) == 0;
    126128        p->global = (flags & PAGE_GLOBAL) != 0;
     129       
     130        /*
     131         * Ensure that there is at least one bit set even if the present bit is cleared.
     132         */
     133        p->soft_valid = 1;
    127134}
    128135
Note: See TracChangeset for help on using the changeset viewer.