24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

address and marks the process as a 32-bit executable. The segstate structure is<br />

handled later by shm_asinit(), and the 64-bit u-block extension is freed in the<br />

subsequent call to vm_cleardata(). The vm_cleardata() call also initializes the<br />

sbreak value for the private segment and adjusts the storage protect key<br />

accordingly in the external page tables covering the user region. There is no<br />

service to re-initialize a 64-bit adspace to a newly-created 64-bit adspace, so it is<br />

necessary to call vm_makeme32, followed by vm_cleardata() and<br />

vm_makeme64(), when a 64-bit program exec()’s another 64-bit program.<br />

3.2.6.2 Address Space Management<br />

The address space management code is significantly impacted for 64-bits. The<br />

code was updated to understand segment numbers, or effective segment IDs,<br />

above the first sixteen IDs.<br />

32-Bit Address Space Programming Interfaces<br />

The following 32-bit services that operate on the process address space are<br />

exported to kernel extensions, so the <strong>AIX</strong> <strong>4.3</strong> versions of these services are<br />

binary-compatible with prior versions. For internal base kernel use, these address<br />

space services are extended to handle 64-bit address spaces but only by code<br />

that has been modified to be 64-bit aware. This means only by code that knows<br />

how to compute an appropriate adspace_t for a 64-bit address space:<br />

caddr_t as_att(adspace_t * adsp, vmhandle_t srval, caddr_t addr)<br />

int as_det(adspace_t * adsp, caddr_t addr)<br />

vmhandle_t as_geth(adspace_t * adsp, caddr_t addr)<br />

vmhandle_t as_getsrval(adspace_t * adsp, caddr_t addr)<br />

void as_puth(adspace_t *adsp, vmhandle_t srval)<br />

void as_seth(adspace_t * adsp, vmhandle_t srval, caddr_t addr)<br />

adspace_t *getadsp()<br />

To provide compatibility for 32-bit kernel extensions, the 32-bit getadsp() kernel<br />

service is modified to determine if it is running under a 64-bit user address space,<br />

and if so, it will return the first adspace_t. This represents ESIDS 0-15. This could<br />

enable some extensions to run under the 4 GB boundary for 64-bit.<br />

All of the 32-bit services listed may be used by a kernel extension or device<br />

driver, but they will only operate on addresses below 4 GB, even when under a<br />

64-bit process. The service to compute an adspace_t for 64-bit, getadsp64(), is<br />

not exported from the kernel. Thus, these routines are not enabled outside the<br />

kernel to operate above the 4 GB line.<br />

Kernel services and drivers should use the new 64-bit address space services<br />

described in the following.<br />

For 64-bit address spaces (internal to the kernel, where there is getadsp64()), the<br />

address arguments specified preceding as caddr_ts are actually 32-bit quantities<br />

that are treated as offsets into the appropriate adspace_t. The only reason for<br />

keeping enablement of these services for 64-bit inside the kernel is that, on some<br />

system calls, there should be some performance improvement by only computing<br />

an adspace_t once.<br />

64-Bit Address Space Programming Interfaces<br />

The following additional address space services are provided for use by the<br />

64-bit kernel extension and by other base kernel code that has been modified to<br />

be 64-bit aware.<br />

64-Bit Enablement 53

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!