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.

64-bit-enabled drivers make the global kernel service replacements provided in<br />

Table 13.<br />

Table 13. Old and New Kernel Services Used by Device Drivers<br />

Old Kernel Service<br />

copyin()<br />

copyout()<br />

xmattach()<br />

pinu()<br />

unpinu()<br />

New Kernel Service<br />

copyin64()<br />

copyout64()<br />

xmattach64()<br />

xmempin()<br />

xmemunpin()<br />

The xmempin()/xmemunpin() calls use the same arguments as pinu()/unpinu(),<br />

with the exception that the third argument for xmempin()/xmemunpin() is the<br />

address of the cross memory descriptor from xmattach()/xmattach64() instead of<br />

a segflag. The xmattach64() call uses the same arguments as xmattach(), with<br />

the exception that the first argument for xmattach() is of type unsigned long long<br />

(ptr64) instead of type char *.<br />

Note: xmattach64() enables xmempin(), so that the 64-bit address can be recast<br />

as a 32-bit address when passed to xmempin(). The xmdetach() call is used to<br />

undo xmattach64().<br />

3.2.5 Loader<br />

For <strong>AIX</strong> <strong>4.3</strong>, the same basic loader system calls are provided to 64-bit programs.<br />

That is, there are 64-bit versions of execve(), fork(), exit(), load(), and unload()<br />

that are aware of the 64-bit user address space. There are also 64-bit versions of<br />

knlist() and sysconfig(), although these just interface to the existing 32-bit<br />

services. There is no 64-bit version of ptrace(), but 64-bit processes can be<br />

debugged by 32-bit debuggers. Finally, the loadquery(), loadbind(), and __loadx()<br />

functions are no longer system calls for 64-bit programs but are implemented in<br />

libc.a.<br />

Four new external functions are added to the loader in <strong>AIX</strong> <strong>4.3</strong> to support 64-bit<br />

processing:<br />

• ldr_init64()<br />

This function is called during kernel initialization when a 64-bit system boots.<br />

• ldr_config64()<br />

This function is called by sysconfig() when a 64-bit machine is configured to<br />

run 64-bit processes.<br />

• ldr_gettextusage64()<br />

This function computes the number of real memory pages used by the main<br />

executable of a process. It only needs to be called if the main executable is<br />

loaded in multiple working segments.<br />

• ldr64()<br />

This is a new system call exported to the special 64-bit process that relocates<br />

shared objects. No other process has access to this system call.<br />

64-Bit Enablement 51

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

Saved successfully!

Ooh no, something went wrong!