blob: 92b1f96fa4e590ddd98cf00a2ccc1866a0fe7fd3 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Using x32 psABI
4***************
5
6x32 processor-specific Application Binary Interface (`x32
7psABI <https://software.intel.com/en-us/node/628948>`__) is a native
832-bit processor-specific ABI for Intel 64 (x86-64) architectures. An
9ABI defines the calling conventions between functions in a processing
10environment. The interface determines what registers are used and what
11the sizes are for various C data types.
12
13Some processing environments prefer using 32-bit applications even when
14running on Intel 64-bit platforms. Consider the i386 psABI, which is a
15very old 32-bit ABI for Intel 64-bit platforms. The i386 psABI does not
16provide efficient use and access of the Intel 64-bit processor
17resources, leaving the system underutilized. Now consider the x86_64
18psABI. This ABI is newer and uses 64-bits for data sizes and program
19pointers. The extra bits increase the footprint size of the programs,
20libraries, and also increases the memory and file system size
21requirements. Executing under the x32 psABI enables user programs to
22utilize CPU and system resources more efficiently while keeping the
23memory footprint of the applications low. Extra bits are used for
24registers but not for addressing mechanisms.
25
26The Yocto Project supports the final specifications of x32 psABI as
27follows:
28
29- You can create packages and images in x32 psABI format on x86_64
30 architecture targets.
31
32- You can successfully build recipes with the x32 toolchain.
33
34- You can create and boot ``core-image-minimal`` and
35 ``core-image-sato`` images.
36
37- There is RPM Package Manager (RPM) support for x32 binaries.
38
39- There is support for large images.
40
41To use the x32 psABI, you need to edit your ``conf/local.conf``
42configuration file as follows::
43
44 MACHINE = "qemux86-64"
45 DEFAULTTUNE = "x86-64-x32"
46 baselib = "${@d.getVar('BASE_LIB:tune-' + (d.getVar('DEFAULTTUNE') \
47 or 'INVALID')) or 'lib'}"
48
49Once you have set
50up your configuration file, use BitBake to build an image that supports
51the x32 psABI. Here is an example::
52
53 $ bitbake core-image-sato
54