NAME

pm_change_caps - change the capabilities associated with a physical page

SYNOPSIS

#include <charm.h>

Status pm_change_caps( int pfn, Cap writecap, Cap readcap, Cap managecap, Cap authcap );

PARAMETERS

pfn specifies the physical page frame whose capabilities are being altered.

writecap the write capability which must be presented for future operations on this frame.

readcap the read capability which must be presented for future operations on this frame.

managecap the capability which must be presented for future physical page management operations.

authcap the current managecap capability for the frame.

DESCRIPTION

This function changes the capabilities associated with a frame of physical memory. Since there is only 1 writecap, readcap and managecap associated with each physical page, previous capabilities are revoked by this call.

RETURN VALUES

Upon the successful completion, the pm_change_caps() function returns [SUCCEED] to indicate that the capability associated with the physical page frame has been changed.

ERRORS

[PM_CAP_INVALID] the capability presented in parameter authcap is invalid.

[PFN_INVALID] the page frame specified is invalid.

RELATED INFORMATION

vm_bind_l1(), vm_bind_l2(), vm_flush().

Notes for Gurus

There are three capabilities for each physical page frame: a write cap, a read cap and an authorisation cap. The last of these is required for operations on the capabilities the first two control access to the page frames from address spaces. The capabilities are segregated from the core map to enforce security.

On bootstrap the kernel reserves some pages for itself and marks these with its own capability. The others are marked with a known authorisation capability (say zero). These may be set by arbitrary user level memory managers to implement whatever policies are desired.

last updated: 11/2/99