VxWorks API Reference : OS Libraries

vmArch36Lib

NAME

vmArch36Lib - VM (VxVMI) library for PentiumPro/2/3/4 36 bit mode

ROUTINES

vmArch36LibInit( ) - initialize the arch specific unbundled VM library (VxVMI Option)
vmArch36Map( ) - map 36bit physical space into 32bit virtual space (VxVMI Option)
vmArch36Translate( ) - translate a 32bit virtual address to a 36bit physical address (VxVMI Option)

DESCRIPTION

The 36 bit physical addressing mechanism of P6 (Pentium II and III) family processors and P7 (Pentium4) family processors are supported by this library. This library provides the virtual memory mapping and virtual address translation that works with the unbundled VM library VxVMI. The architecture specific VM library APIs are linked in automatically when INCLUDE_MMU_FULL and INCLUDE_MMU_P6_36BIT are both defined in the BSP. The provided APIs are vmArch36Map( ) and vmArch36Translate( ).

The 4KB-page and 2MB-page are supported. The page size is configurable by VM_PAGE_SIZE macro in the BSP.

The memory description table sysPhysMemDesc[] in sysLib.c has not changed and only allows 32 bit virtual and physical address mapping description. Thus the first 4GB 32 bit address space of the 36 bit physical address is used at the initialization/boot time. Then, the physical address beyond the 4GB can be mapped in somewhere outside of the system memory pool in the 32 bit virtual address space with above APIs.

INCLUDE FILES

mmuPro36Lib.h

SEE ALSO

vmLib, Intel Architecture Software Developer's Manual


OS Libraries : Routines

vmArch36LibInit( )

NAME

vmArch36LibInit( ) - initialize the arch specific unbundled VM library (VxVMI Option)

SYNOPSIS

void vmArch36LibInit (void)

DESCRIPTION

This routine links the arch specific unbundled VM library into the VxWorks system. It is called automatically when INCLUDE_MMU_FULL and INCLUDE_MMU_P6_36BIT are both defined in the BSP.

RETURNS

N/A

SEE ALSO

vmArch36Lib


OS Libraries : Routines

vmArch36Map( )

NAME

vmArch36Map( ) - map 36bit physical space into 32bit virtual space (VxVMI Option)

SYNOPSIS

STATUS vmArch36Map
    (
    VM_CONTEXT_ID context,    /* context - NULL == currentContext */
    void *        virtAddr,   /* 32bit virtual address */
    LL_INT        physAddr,   /* 36bit physical address */
    UINT32        stateMask,  /* state mask */
    UINT32        state,      /* state */
    UINT32        len         /* len of virtual and physical spaces */
    )

DESCRIPTION

vmArch36Map maps 36bit physical pages into a contiguous block of 32bit virtual memory. virtAddr and physAddr must be on page boundaries, and len must be evenly divisible by the page size. After the mapping the specified state is set to all pages in the newly mapped virtual memory.

The vmArch36Map( ) routine can fail if the specified virtual address space conflicts with the translation tables of the global virtual memory space. The global virtual address space is initialized at boot time. If a conflict results, errno is set to S_vmLib_ADDR_IN_GLOBAL_SPACE. To avoid this conflict, use vmGlobalInfoGet( ) to ascertain which portions of the virtual address space are reserved for the global virtual address space. If context is specified as NULL, the current virtual memory context is used.

This routine should not be called from interrupt level.

AVAILABILITY

This routine is distributed as a component of the unbundled virtual memory support option, VxVMI.

RETURNS

OK, or ERROR if virtAddr or physAddr are not on page boundaries, len is not a multiple of the page size, the validation fails, or the mapping fails.

ERRNO

S_vmLib_NOT_PAGE_ALIGNED, S_vmLib_ADDR_IN_GLOBAL_SPACE

SEE ALSO

vmArch36Lib


OS Libraries : Routines

vmArch36Translate( )

NAME

vmArch36Translate( ) - translate a 32bit virtual address to a 36bit physical address (VxVMI Option)

SYNOPSIS

STATUS vmArch36Translate
    (
    VM_CONTEXT_ID context,    /* context - NULL == currentContext */
    void *        virtAddr,   /* 32bit virtual address */
    LL_INT *      physAddr    /* place to put 36bit result */
    )

DESCRIPTION

vmArch36Translate retrieves mapping information for a 32bit virtual address from the page translation tables. If the specified virtual address has never been mapped, the returned status is ERROR. If context is specified as NULL, the current context is used.

This routine is callable from interrupt level.

AVAILABILITY

This routine is distributed as a component of the unbundled virtual memory support option, VxVMI.

RETURNS

OK, or ERROR if the validation or translation fails.

SEE ALSO

vmArch36Lib