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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

All of the following services are exported:<br />

unsigned long long as_att64(vmhandle_t srval, int offset)<br />

int<br />

as_det64(unsigned long long addr64)<br />

vmhandle_t as_geth64(unsigned long long addr64)<br />

vmhandle_t as_getsrval64(unsigned long long addr64)<br />

int<br />

as_puth64(unsigned long long addr64, vmhandle_t srval)<br />

int<br />

as_seth64(unsigned long long addr64, vmhandle_t srval)<br />

int<br />

IS64U<br />

The address space programming model for 64-bit introduces a copy of all the<br />

32-bit interfaces appropriately scaled for 64-bit addresses. All of the 64-bit<br />

services work properly under a 32-bit user address space or under a kproc as<br />

well as a 64-bit user address space:<br />

One additional non-exported service is provided:<br />

adspace_t *getadsp64(unsigned long addr64)<br />

The getadsp64() service exists to provide a bridge between the 64-bit and 32-bit<br />

services. The adspace_t returned by getadsp64() may be passed to any of the<br />

32-bit services, and it will work properly. The one exception to the example is that<br />

32-bit as_att() will not support attaching anywhere other than the first adspace_t.<br />

The advantage of using getadsp64() is the performance improvement of only<br />

computing an adspace_t once per system call.<br />

The concept of an adspace_t really does not exist with the new 64-bit interfaces;<br />

getadsp64() is the only exception, and it is only for use with the 32-bit interfaces<br />

internal to the kernel. The advantage of not having an adspace_t externalized is<br />

that the width of an adspace_t is no longer surfaced to extensions. This saves the<br />

extensions the overhead of having to compute another adspace_t every 4 GB.<br />

Kernel extensions writing new code to enable 64-bit support that need the<br />

address space services, should use the new *64 services instead of the current<br />

32-bit services. The *64 services handle all the general cases for 64-bit and<br />

32-bit address spaces. The 32-bit services will only work for addresses less than<br />

4 GB outside the kernel.<br />

How to Determine if this is a 64-Bit Address Space<br />

The IS64U macro will return true if the user address space for the current process<br />

is 64-bits. This macro is valid only in kernel mode. If used inside the kernel, this<br />

will return the value of U.U_64bit directly. If used outside the kernel in an<br />

extension, this will generate a subroutine call to the new kernel service:<br />

_as_is64(). _as_is64() will simply return the value of the variable. U.U_64bit is<br />

managed by exec() in vm_makeme64/32. IS64U is defined in user.h.<br />

3.2.6.3 Shared Memory Management<br />

The shared memory code is impacted for 64-bit support since it must attach<br />

shared memory segments at large addresses. The functions shmat() and mmap()<br />

will behave as follows regarding segment number (ESID) allocation:<br />

• If no fixed address is specified, then allocation takes place from the<br />

shmat()/mmap() pool at ESIDs: 0x70000000 - 0x7FFFFFFF.<br />

• If a fixed address is specified by the user, then the allocation will be allowed<br />

as long as the ESID is less than 0x80000000 and is not ESID 0-2,13, or 15.<br />

54 <strong>AIX</strong> <strong>Version</strong> <strong>4.3</strong> <strong>Differences</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!