Specifications
Operating System Routines
LDR$DEALLOC_PT
LDR$DEALLOC_PT
Deallocates the specified system page-table entries (SPTEs).
Module
PTALLOC
Input
Location Contents
R1 Address of first SPTE to be deallocated
R2 Number of SPTEs to be deallocated
LDR$GL_SPTBASE Base of system page table
LDR$GL_FREE_PT Offset to first free SPTE
Output
Location Contents
R0 SS$_NORMAL, SS$_BADPARAM, or LOADER$_
PTE_NOT_EMPTY
R1 Address of first allocated SPTE
R2 Destroyed
Synchronization
Because LDR$DEALLOC_PT executes at IPL$_SYNCH and obtains the MMG
spinlock in a multiprocessing environment, its caller cannot be executing above
IPL$_SYNCH or hold any higher ranked spinlocks. (For instance, a driver fork
process executing at IPL$_SYNCH holding the IOLOCK8 fork lock can call
LDR$DEALLOC_PT.) LDR$DEALLOC_PT returns control to its caller at the
caller’s IPL. The caller retains any spinlocks it held at the time of the call.
Description
LDR$DEALLOC_PT deallocates the number of system page-table entries
(SPTEs) specified in R2, starting at the one indicated by the contents of R1.
LDR$DEALLOC_PT adjusts the pool of free SPTEs to reflect the addition of the
deallocated SPTEs.
If R2 contains a zero, LDR$DEALLOC_PT returns SS$_BADPARAM status in R0
and clears R1.
It is the caller’s responsibility to ensure that the SPTEs to be deallocated are
empty (set to zero).
5
If they are not, LDR$DEALLOC_PT returns LOADER$_
PTE_NOT_EMPTY status in R0.
5
Modifications to valid SPTEs require that these SPTEs be flushed from the system’s
translation buffers. See the description of the INVALIDATE_TB macro in Chapter 2.
3–147