PATH 
ADC Home > Documentation > Hardware > Device Managers and Drivers > PCI Card Services > Designing PCI Cards and Drivers for Power Macintosh Computers


  

GetPageInformation

OSStatus GetPageInformation(
                     AddressSpaceID theAddressSpace,
                     LogicalAddress theBase,
                     ByteCount theLength,
                     PBVersion theVersion,
                     PageInformation *thePageInfo);
--> theAddressSpace
ID of address space to be examined.
--> theBase
Starting address in address space.
--> theLength
Length of address range, in bytes.
--> theVersion
Version of the page information structure.
<-- thePageInfo
Pointer to the page information structure.
struct PageInformation
{
    AreaID                      area;
    ItemCount                   count;
    PageStateInformation        information [1];
};


typedef unsigned long PageStateInformation;
enum {
    kPageIsProtected                    = 0x00000001,
    kPageIsProtectedPrivileged          = 0x00000002,
    kPageIsModified                     = 0x00000004,
    kPageIsReferenced                   = 0x00000008,
    kPageIsLocked                       = 0x00000010,
    kPageIsResident                     = 0x00000020,
    kPageIsShared                       = 0x00000040,
    kPageIsWriteThroughCached           = 0x00000080,
    kPageIsCopyBackCached               = 0x00000100
};


typedef struct PageInformation PageInformation,
                     *PageInformationPtr;
DESCRIPTION

The GetPageInformation function returns information about each logical page in a specified range. Parameter theAddressSpace specifies the address space containing the range of interest. Parameter theBase is the first logical address of interest. Parameter theLength specifies the number of bytes of logical address space, starting at theBase, about which information is to be returned.

Parameter theVersion specifies the version number of the PageInformation type to be returned, thereby providing backward compatibility.

Parameter thePageInfo is filled in with information about each logical page. This buffer must be large enough to contain information about the entire range. The page information fields are the following:

The bits of PageStateInformation are the following:

RESULT CODES
noErr 0 No error
paramErr -50 Bad parameter
EXECUTION CONTEXT

GetPageInformation may be called only from task level, not from secondary or hardware interrupt level.


© 1999 Apple Computer, Inc. – (Last Updated 26 March 99)