次の方法で共有


VirtualSetPageFlags (Windows Embedded CE 6.0)

1/5/2010

This function maps the VSPF_* flags to SH4 virtual page attribute flags and sets the flags for all pages in the range specified by the lpvAddress and cbSize parameters.

These flags correspond to bits in the page table entry assistance register. VirtualSetPageFlags should only be called by the SH4 PCMCIA driver.

Syntax

BOOL VirtualSetPageFlags(
  LPVOID lpvAddress, 
  DWORD cbSize, 
  DWORD dwFlags, 
  LPDWORD lpdwOldFlags 
);

Parameters

  • lpvAddress
    [in] Starting virtual address of the memory region affected by VirtualSetPageFlags.
  • cbSize
    [in] Size of the lpvAddress memory region.
  • dwFlags
    [in] Contains the page flags to be applied to the memory region.

    The following table shows the valid flags.

    Flag Description

    VSPF_NONE

    Flag equal to 0.

    VSPF_8BIT

    Flag equal to 0 (default).

    VSPF_VARIABLE

    PCMCIA I/O space, data width is determined by the IOIS#16 signal.

    VSPF_IOSPACE

    PCMCIA I/O space, 8-bit data path width.

    VSPF_COMMON

    8-bit PCMCIA common memory space.

    VSPF_ATTRIBUTE

    8-bit PCMCIA attribute memory space.

    VSPF_16BIT

    Use in combination with another flag to implement 16-bit data path width.

    The following table shows the flag can be used with the flags in the previous table.

    Flag Description

    VSPF_TC

    Timing control for PCMCIA areas 5 and 6.

    If VSPF_TC is specified, timing control register 1 is used to control timing for the region. If VSPF_TC is not specified, timing control register 0 is used. The PCMCIA driver does not use VSPF_TC.

    The following table shows other valid flag combinations.

    Flag Description

    VSPF_IOSPACE | VSPF_16BIT

    PCMCIA I/O space 16-bit data path width.

    VSPF_COMMON | VSPF_16BIT

    16-bit PCMCIA common memory space.

    VSPF_ATTRIBUTE | VSPF_16BIT

    16-bit PCMCIA attribute memory space.

  • lpdwOldFlags
    [out] Pointer to a DWORD to receive the previous set of page flags for the memory region so they can be restored if needed.

Return Value

If this function succeeds, it returns TRUE.

If this function fails, it returns FALSE.

Remarks

The PCMCIA driver uses combinations of VSPF_IOSPACE, VSPF_COMMON, VSPF_ATTRIBUTE, VSPF_16BIT, VSPF_VARIABLE and VSPF_8BIT to map pages in the three PCMCIA memory spaces using 8-bit or 16-bit data path widths.

Requirements

Header pkfuncs.h
Library coredll.lib
Windows Embedded CE Windows CE 3.0 and later

See Also

Reference

Other OAL Functions

Other Resources