xenguest_arm64.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. Xen guest ARM64 board
  3. =====================
  4. This board specification
  5. ------------------------
  6. This board is to be run as a virtual Xen [1] guest with U-boot as its primary
  7. bootloader. Xen is a type 1 hypervisor that allows multiple operating systems
  8. to run simultaneously on a single physical server. Xen is capable of running
  9. virtual machines in both full virtualization and para-virtualization (PV)
  10. modes. Xen runs virtual machines, which are called “domains”.
  11. Paravirtualized drivers are a special type of device drivers that are used in
  12. a guest system in the Xen domain and perform I/O operations using a special
  13. interface provided by the virtualization system and the host system.
  14. Xen support for U-boot is implemented by introducing a new Xen guest ARM64
  15. board and porting essential drivers from MiniOS [3] as well as some of the work
  16. previously done by NXP [4]:
  17. - PV block device frontend driver with XenStore based device enumeration and
  18. UCLASS_PVBLOCK class;
  19. - PV serial console device frontend driver;
  20. - Xen hypervisor support with minimal set of the essential headers adapted from
  21. the Linux kernel;
  22. - Xen grant table support;
  23. - Xen event channel support in polling mode;
  24. - XenBus support;
  25. - dynamic RAM size as defined in the device tree instead of the statically
  26. defined values;
  27. - position-independent pre-relocation code is used as we cannot statically
  28. define any start addresses at compile time which is up to Xen to choose at
  29. run-time;
  30. - new defconfig introduced: xenguest_arm64_defconfig.
  31. Board limitations
  32. -----------------
  33. 1. U-boot runs without MMU enabled at the early stages.
  34. According to Xen on ARM ABI (xen/include/public/arch-arm.h): all memory
  35. which is shared with other entities in the system (including the hypervisor
  36. and other guests) must reside in memory which is mapped as Normal Inner
  37. Write-Back Outer Write-Back Inner-Shareable.
  38. Thus, page attributes must be equally set for all the entities working with
  39. that page.
  40. Before MMU is set up the data cache is turned off and pages are seen by the
  41. vCPU and Xen in different ways - cacheable by Xen and non-cacheable by vCPU.
  42. So it means that manual data cache maintenance is required at the early
  43. stages.
  44. 2. No serial console until MMU is up.
  45. Because data cache maintenance is required until the MMU setup the
  46. early/debug serial console is not implemented. Therefore, we do not have
  47. usual prints like U-boot’s banner etc. until the serial driver is
  48. initialized.
  49. 3. Single RAM bank supported.
  50. If a Xen guest is given much memory it is possible that Xen allocates two
  51. memory banks for it. The first one is allocated under 4GB address space and
  52. in some cases may represent the whole guest’s memory. It is assumed that
  53. U-boot most likely won’t require high memory bank for its work andlaunching
  54. OS, so it is enough to take the first one.
  55. Board default configuration
  56. ---------------------------
  57. One can select the configuration as follows:
  58. - make xenguest_arm64_defconfig
  59. [1] - https://xenproject.org/
  60. [2] - https://wiki.xenproject.org/wiki/Paravirtualization_(PV)
  61. [3] - https://wiki.xenproject.org/wiki/Mini-OS
  62. [4] - https://source.codeaurora.org/external/imx/uboot-imx/tree/?h=imx_v2018.03_4.14.98_2.0.0_ga