x32-psabi.rst 2.0 KB

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