hsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/arch/arm64/bootingmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/arch/arm64/bootingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/arch/arm64/bootingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/arch/arm64/bootingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/arch/arm64/bootingmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/arch/arm64/bootingmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hBooting AArch64 Linuxh]hBooting AArch64 Linux}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/arch/arm64/booting.rsthKubh paragraph)}(h)Author: Will Deacon h](hAuthor: Will Deacon <}(hhhhhNhNubh reference)}(hwill.deacon@arm.comh]hwill.deacon@arm.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refurimailto:will.deacon@arm.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hDate : 07 September 2012h]hDate : 07 September 2012}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThis document is based on the ARM booting document by Russell King and is relevant to all public releases of the AArch64 Linux kernel.h]hThis document is based on the ARM booting document by Russell King and is relevant to all public releases of the AArch64 Linux kernel.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXThe AArch64 exception model is made up of a number of exception levels (EL0 - EL3), with EL0, EL1 and EL2 having a secure and a non-secure counterpart. EL2 is the hypervisor level, EL3 is the highest priority level and exists only in secure mode. Both are architecturally optional.h]hXThe AArch64 exception model is made up of a number of exception levels (EL0 - EL3), with EL0, EL1 and EL2 having a secure and a non-secure counterpart. EL2 is the hypervisor level, EL3 is the highest priority level and exists only in secure mode. Both are architecturally optional.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hX9For the purposes of this document, we will use the term `boot loader` simply to define all software that executes on the CPU(s) before control is passed to the Linux kernel. This may include secure monitor and hypervisor code, or it may just be a handful of instructions for preparing a minimal boot environment.h](h8For the purposes of this document, we will use the term }(hjhhhNhNubhtitle_reference)}(h `boot loader`h]h boot loader}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh simply to define all software that executes on the CPU(s) before control is passed to the Linux kernel. This may include secure monitor and hypervisor code, or it may just be a handful of instructions for preparing a minimal boot environment.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hIEssentially, the boot loader should provide (as a minimum) the following:h]hIEssentially, the boot loader should provide (as a minimum) the following:}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhenumerated_list)}(hhh](h list_item)}(hSetup and initialise the RAMh]h)}(hj@h]hSetup and initialise the RAM}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj>ubah}(h]h ]h"]h$]h&]uh1j<hj9hhhhhNubj=)}(hSetup the device treeh]h)}(hjWh]hSetup the device tree}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjUubah}(h]h ]h"]h$]h&]uh1j<hj9hhhhhNubj=)}(hDecompress the kernel imageh]h)}(hjnh]hDecompress the kernel image}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjlubah}(h]h ]h"]h$]h&]uh1j<hj9hhhhhNubj=)}(hCall the kernel image h]h)}(hCall the kernel imageh]hCall the kernel image}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hj9hhhhhNubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1j7hhhhhhhKubh)}(hhh](h)}(h1. Setup and initialise RAMh]h1. Setup and initialise RAM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK!ubh)}(hRequirement: MANDATORYh]hRequirement: MANDATORY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjhhubh)}(hXcThe boot loader is expected to find and initialise all RAM that the kernel will use for volatile data storage in the system. It performs this in a machine dependent manner. (It may use internal algorithms to automatically locate and size all RAM, or it may use knowledge of the RAM in the machine, or any other method the boot loader designer sees fit.)h]hXcThe boot loader is expected to find and initialise all RAM that the kernel will use for volatile data storage in the system. It performs this in a machine dependent manner. (It may use internal algorithms to automatically locate and size all RAM, or it may use knowledge of the RAM in the machine, or any other method the boot loader designer sees fit.)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjhhubh)}(hyFor Arm Confidential Compute Realms this includes ensuring that all protected RAM has a Realm IPA state (RIPAS) of "RAM".h]h}For Arm Confidential Compute Realms this includes ensuring that all protected RAM has a Realm IPA state (RIPAS) of “RAM”.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjhhubeh}(h]setup-and-initialise-ramah ]h"]1. setup and initialise ramah$]h&]uh1hhhhhhhhK!ubh)}(hhh](h)}(h2. Setup the device treeh]h2. Setup the device tree}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK1ubh)}(hRequirement: MANDATORYh]hRequirement: MANDATORY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjhhubh)}(hXThe device tree blob (dtb) must be placed on an 8-byte boundary and must not exceed 2 megabytes in size. Since the dtb will be mapped cacheable using blocks of up to 2 megabytes in size, it must not be placed within any 2M region which must be mapped with any specific attributes.h]hXThe device tree blob (dtb) must be placed on an 8-byte boundary and must not exceed 2 megabytes in size. Since the dtb will be mapped cacheable using blocks of up to 2 megabytes in size, it must not be placed within any 2M region which must be mapped with any specific attributes.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubh)}(hNOTE: versions prior to v4.2 also require that the DTB be placed within the 512 MB region starting at text_offset bytes below the kernel Image.h]hNOTE: versions prior to v4.2 also require that the DTB be placed within the 512 MB region starting at text_offset bytes below the kernel Image.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjhhubeh}(h]setup-the-device-treeah ]h"]2. setup the device treeah$]h&]uh1hhhhhhhhK1ubh)}(hhh](h)}(h3. Decompress the kernel imageh]h3. Decompress the kernel image}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhK>ubh)}(hRequirement: OPTIONALh]hRequirement: OPTIONAL}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hj,hhubh)}(hX3The AArch64 kernel does not currently provide a decompressor and therefore requires decompression (gzip etc.) to be performed by the boot loader if a compressed Image target (e.g. Image.gz) is used. For bootloaders that do not implement this requirement, the uncompressed Image target is available instead.h]hX3The AArch64 kernel does not currently provide a decompressor and therefore requires decompression (gzip etc.) to be performed by the boot loader if a compressed Image target (e.g. Image.gz) is used. For bootloaders that do not implement this requirement, the uncompressed Image target is available instead.}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhj,hhubeh}(h]decompress-the-kernel-imageah ]h"]3. decompress the kernel imageah$]h&]uh1hhhhhhhhK>ubh)}(hhh](h)}(h4. Call the kernel imageh]h4. Call the kernel image}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjahhhhhKJubh)}(hRequirement: MANDATORYh]hRequirement: MANDATORY}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjahhubh)}(hDThe decompressed kernel image contains a 64-byte header as follows::h]hCThe decompressed kernel image contains a 64-byte header as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjahhubh literal_block)}(hXMu32 code0; /* Executable code */ u32 code1; /* Executable code */ u64 text_offset; /* Image load offset, little endian */ u64 image_size; /* Effective Image size, little endian */ u64 flags; /* kernel flags, little endian */ u64 res2 = 0; /* reserved */ u64 res3 = 0; /* reserved */ u64 res4 = 0; /* reserved */ u32 magic = 0x644d5241; /* Magic number, little endian, "ARM\x64" */ u32 res5; /* reserved (used for PE COFF offset) */h]hXMu32 code0; /* Executable code */ u32 code1; /* Executable code */ u64 text_offset; /* Image load offset, little endian */ u64 image_size; /* Effective Image size, little endian */ u64 flags; /* kernel flags, little endian */ u64 res2 = 0; /* reserved */ u64 res3 = 0; /* reserved */ u64 res4 = 0; /* reserved */ u32 magic = 0x644d5241; /* Magic number, little endian, "ARM\x64" */ u32 res5; /* reserved (used for PE COFF offset) */}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhKPhjahhubh)}(h Header notes:h]h Header notes:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hjahhubh bullet_list)}(hhh](j=)}(hCAs of v3.17, all fields are little endian unless stated otherwise. h]h)}(hBAs of v3.17, all fields are little endian unless stated otherwise.h]hBAs of v3.17, all fields are little endian unless stated otherwise.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjubah}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(h4code0/code1 are responsible for branching to stext. h]h)}(h3code0/code1 are responsible for branching to stext.h]h3code0/code1 are responsible for branching to stext.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjubah}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hwhen booting through EFI, code0/code1 are initially skipped. res5 is an offset to the PE header and the PE header has the EFI entry point (efi_stub_entry). When the stub has done its work, it jumps to code0 to resume the normal boot process. h]h)}(hwhen booting through EFI, code0/code1 are initially skipped. res5 is an offset to the PE header and the PE header has the EFI entry point (efi_stub_entry). When the stub has done its work, it jumps to code0 to resume the normal boot process.h]hwhen booting through EFI, code0/code1 are initially skipped. res5 is an offset to the PE header and the PE header has the EFI entry point (efi_stub_entry). When the stub has done its work, it jumps to code0 to resume the normal boot process.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhjubah}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hX6Prior to v3.17, the endianness of text_offset was not specified. In these cases image_size is zero and text_offset is 0x80000 in the endianness of the kernel. Where image_size is non-zero image_size is little-endian and must be respected. Where image_size is zero, text_offset can be assumed to be 0x80000. h]h)}(hX5Prior to v3.17, the endianness of text_offset was not specified. In these cases image_size is zero and text_offset is 0x80000 in the endianness of the kernel. Where image_size is non-zero image_size is little-endian and must be respected. Where image_size is zero, text_offset can be assumed to be 0x80000.h]hX5Prior to v3.17, the endianness of text_offset was not specified. In these cases image_size is zero and text_offset is 0x80000 in the endianness of the kernel. Where image_size is non-zero image_size is little-endian and must be respected. Where image_size is zero, text_offset can be assumed to be 0x80000.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hXThe flags field (introduced in v3.17) is a little-endian 64-bit field composed as follows: ============= =============================================================== Bit 0 Kernel endianness. 1 if BE, 0 if LE. Bit 1-2 Kernel Page size. * 0 - Unspecified. * 1 - 4K * 2 - 16K * 3 - 64K Bit 3 Kernel physical placement 0 2MB aligned base should be as close as possible to the base of DRAM, since memory below it is not accessible via the linear mapping 1 2MB aligned base such that all image_size bytes counted from the start of the image are within the 48-bit addressable range of physical memory Bits 4-63 Reserved. ============= =============================================================== h](h)}(hZThe flags field (introduced in v3.17) is a little-endian 64-bit field composed as follows:h]hZThe flags field (introduced in v3.17) is a little-endian 64-bit field composed as follows:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1j/hj,ubj0)}(hhh]h}(h]h ]h"]h$]h&]colwidthK?uh1j/hj,ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hBit 0h]hBit 0}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjQubah}(h]h ]h"]h$]h&]uh1jOhjLubjP)}(hhh]h)}(h%Kernel endianness. 1 if BE, 0 if LE.h]h%Kernel endianness. 1 if BE, 0 if LE.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjhubah}(h]h ]h"]h$]h&]uh1jOhjLubeh}(h]h ]h"]h$]h&]uh1jJhjGubjK)}(hhh](jP)}(hhh]h)}(hBit 1-2h]hBit 1-2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jOhjubjP)}(hhh](h)}(hKernel Page size.h]hKernel Page size.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubh block_quote)}(h/* 0 - Unspecified. * 1 - 4K * 2 - 16K * 3 - 64Kh]j)}(hhh](j=)}(h0 - Unspecified.h]h)}(hjh]h0 - Unspecified.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h1 - 4Kh]h)}(hjh]h1 - 4K}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h2 - 16Kh]h)}(hjh]h2 - 16K}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h3 - 64Kh]h)}(hjh]h3 - 64K}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]bullet*uh1jhhhKthjubah}(h]h ]h"]h$]h&]uh1jhhhKthjubeh}(h]h ]h"]h$]h&]uh1jOhjubeh}(h]h ]h"]h$]h&]uh1jJhjGubjK)}(hhh](jP)}(hhh]h)}(hBit 3h]hBit 3}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj2ubah}(h]h ]h"]h$]h&]uh1jOhj/ubjP)}(hhh](h)}(hKernel physical placementh]hKernel physical placement}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjIubj)}(hX"0 2MB aligned base should be as close as possible to the base of DRAM, since memory below it is not accessible via the linear mapping 1 2MB aligned base such that all image_size bytes counted from the start of the image are within the 48-bit addressable range of physical memoryh]hdefinition_list)}(hhh](hdefinition_list_item)}(h0 2MB aligned base should be as close as possible to the base of DRAM, since memory below it is not accessible via the linear mappingh](hterm)}(h0h]h0}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1jihhhK|hjeubh definition)}(hhh]h)}(h2MB aligned base should be as close as possible to the base of DRAM, since memory below it is not accessible via the linear mappingh]h2MB aligned base should be as close as possible to the base of DRAM, since memory below it is not accessible via the linear mapping}(hj~hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK{hj{ubah}(h]h ]h"]h$]h&]uh1jyhjeubeh}(h]h ]h"]h$]h&]uh1jchhhK|hj`ubjd)}(h1 2MB aligned base such that all image_size bytes counted from the start of the image are within the 48-bit addressable range of physical memoryh](jj)}(h1h]h1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jihhhKhjubjz)}(hhh]h)}(h2MB aligned base such that all image_size bytes counted from the start of the image are within the 48-bit addressable range of physical memoryh]h2MB aligned base such that all image_size bytes counted from the start of the image are within the 48-bit addressable range of physical memory}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jyhjubeh}(h]h ]h"]h$]h&]uh1jchhhKhj`ubeh}(h]h ]h"]h$]h&]uh1j^hjZubah}(h]h ]h"]h$]h&]uh1jhhhKzhjIubeh}(h]h ]h"]h$]h&]uh1jOhj/ubeh}(h]h ]h"]h$]h&]uh1jJhjGubjK)}(hhh](jP)}(hhh]h)}(h Bits 4-63h]h Bits 4-63}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jOhjubjP)}(hhh]h)}(h Reserved.h]h Reserved.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jOhjubeh}(h]h ]h"]h$]h&]uh1jJhjGubeh}(h]h ]h"]h$]h&]uh1jEhj,ubeh}(h]h ]h"]h$]h&]colsKuh1j*hj'ubah}(h]h ]h"]h$]h&]uh1j%hjubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hXWhen image_size is zero, a bootloader should attempt to keep as much memory as possible free for use by the kernel immediately after the end of the kernel image. The amount of space required will vary depending on selected features, and is effectively unbound. h]h)}(hXWhen image_size is zero, a bootloader should attempt to keep as much memory as possible free for use by the kernel immediately after the end of the kernel image. The amount of space required will vary depending on selected features, and is effectively unbound.h]hXWhen image_size is zero, a bootloader should attempt to keep as much memory as possible free for use by the kernel immediately after the end of the kernel image. The amount of space required will vary depending on selected features, and is effectively unbound.}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj/ubah}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubeh}(h]h ]h"]h$]h&]j-uh1jhhhK^hjahhubh)}(hX,The Image must be placed text_offset bytes from a 2MB aligned base address anywhere in usable system RAM and called there. The region between the 2 MB aligned base address and the start of the image has no special significance to the kernel, and may be used for other purposes. At least image_size bytes from the start of the image must be free for use by the kernel. NOTE: versions prior to v4.6 cannot make use of memory below the physical offset of the Image so it is recommended that the Image be placed as close as possible to the start of system RAM.h]hX,The Image must be placed text_offset bytes from a 2MB aligned base address anywhere in usable system RAM and called there. The region between the 2 MB aligned base address and the start of the image has no special significance to the kernel, and may be used for other purposes. At least image_size bytes from the start of the image must be free for use by the kernel. NOTE: versions prior to v4.6 cannot make use of memory below the physical offset of the Image so it is recommended that the Image be placed as close as possible to the start of system RAM.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjahhubh)}(hIf an initrd/initramfs is passed to the kernel at boot, it must reside entirely within a 1 GB aligned physical memory window of up to 32 GB in size that fully covers the kernel Image as well.h]hIf an initrd/initramfs is passed to the kernel at boot, it must reside entirely within a 1 GB aligned physical memory window of up to 32 GB in size that fully covers the kernel Image as well.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjahhubh)}(hAny memory described to the kernel (even that below the start of the image) which is not marked as reserved from the kernel (e.g., with a memreserve region in the device tree) will be considered as available to the kernel.h]hAny memory described to the kernel (even that below the start of the image) which is not marked as reserved from the kernel (e.g., with a memreserve region in the device tree) will be considered as available to the kernel.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjahhubh)}(hEBefore jumping into the kernel, the following conditions must be met:h]hEBefore jumping into the kernel, the following conditions must be met:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjahhubj)}(hhh](j=)}(hQuiesce all DMA capable devices so that memory does not get corrupted by bogus network packets or disk data. This will save you many hours of debug. h]h)}(hQuiesce all DMA capable devices so that memory does not get corrupted by bogus network packets or disk data. This will save you many hours of debug.h]hQuiesce all DMA capable devices so that memory does not get corrupted by bogus network packets or disk data. This will save you many hours of debug.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hPrimary CPU general-purpose register settings: - x0 = physical address of device tree blob (dtb) in system RAM. - x1 = 0 (reserved for future use) - x2 = 0 (reserved for future use) - x3 = 0 (reserved for future use) h](h)}(h.Primary CPU general-purpose register settings:h]h.Primary CPU general-purpose register settings:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h- x0 = physical address of device tree blob (dtb) in system RAM. - x1 = 0 (reserved for future use) - x2 = 0 (reserved for future use) - x3 = 0 (reserved for future use) h]j)}(hhh](j=)}(h>x0 = physical address of device tree blob (dtb) in system RAM.h]h)}(hjh]h>x0 = physical address of device tree blob (dtb) in system RAM.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h x1 = 0 (reserved for future use)h]h)}(hjh]h x1 = 0 (reserved for future use)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h x2 = 0 (reserved for future use)h]h)}(hjh]h x2 = 0 (reserved for future use)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h!x3 = 0 (reserved for future use) h]h)}(h x3 = 0 (reserved for future use)h]h x3 = 0 (reserved for future use)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]jjMuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hCPU mode All forms of interrupts must be masked in PSTATE.DAIF (Debug, SError, IRQ and FIQ). The CPU must be in non-secure state, either in EL2 (RECOMMENDED in order to have access to the virtualisation extensions), or in EL1. h](h)}(hCPU modeh]hCPU mode}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)ubh)}(hAll forms of interrupts must be masked in PSTATE.DAIF (Debug, SError, IRQ and FIQ). The CPU must be in non-secure state, either in EL2 (RECOMMENDED in order to have access to the virtualisation extensions), or in EL1.h]hAll forms of interrupts must be masked in PSTATE.DAIF (Debug, SError, IRQ and FIQ). The CPU must be in non-secure state, either in EL2 (RECOMMENDED in order to have access to the virtualisation extensions), or in EL1.}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj)ubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hXCaches, MMUs The MMU must be off. The instruction cache may be on or off, and must not hold any stale entries corresponding to the loaded kernel image. The address range corresponding to the loaded kernel image must be cleaned to the PoC. In the presence of a system cache or other coherent masters with caches enabled, this will typically require cache maintenance by VA rather than set/way operations. System caches which respect the architected cache maintenance by VA operations must be configured and may be enabled. System caches which do not respect architected cache maintenance by VA operations (not recommended) must be configured and disabled. h](h)}(h Caches, MMUsh]h Caches, MMUs}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOubh)}(hThe MMU must be off.h]hThe MMU must be off.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOubh)}(huThe instruction cache may be on or off, and must not hold any stale entries corresponding to the loaded kernel image.h]huThe instruction cache may be on or off, and must not hold any stale entries corresponding to the loaded kernel image.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOubh)}(hXThe address range corresponding to the loaded kernel image must be cleaned to the PoC. In the presence of a system cache or other coherent masters with caches enabled, this will typically require cache maintenance by VA rather than set/way operations. System caches which respect the architected cache maintenance by VA operations must be configured and may be enabled. System caches which do not respect architected cache maintenance by VA operations (not recommended) must be configured and disabled.h]hXThe address range corresponding to the loaded kernel image must be cleaned to the PoC. In the presence of a system cache or other coherent masters with caches enabled, this will typically require cache maintenance by VA rather than set/way operations. System caches which respect the architected cache maintenance by VA operations must be configured and may be enabled. System caches which do not respect architected cache maintenance by VA operations (not recommended) must be configured and disabled.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hArchitected timers CNTFRQ must be programmed with the timer frequency and CNTVOFF must be programmed with a consistent value on all CPUs. If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where available. h](h)}(hArchitected timersh]hArchitected timers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hCNTFRQ must be programmed with the timer frequency and CNTVOFF must be programmed with a consistent value on all CPUs. If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where available.h]hCNTFRQ must be programmed with the timer frequency and CNTVOFF must be programmed with a consistent value on all CPUs. If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where available.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hCoherency All CPUs to be booted by the kernel must be part of the same coherency domain on entry to the kernel. This may require IMPLEMENTATION DEFINED initialisation to enable the receiving of maintenance operations on each CPU. h](h)}(h Coherencyh]h Coherency}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hAll CPUs to be booted by the kernel must be part of the same coherency domain on entry to the kernel. This may require IMPLEMENTATION DEFINED initialisation to enable the receiving of maintenance operations on each CPU.h]hAll CPUs to be booted by the kernel must be part of the same coherency domain on entry to the kernel. This may require IMPLEMENTATION DEFINED initialisation to enable the receiving of maintenance operations on each CPU.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hXSystem registers All writable architected system registers at or below the exception level where the kernel image will be entered must be initialised by software at a higher exception level to prevent execution in an UNKNOWN state. For all systems: - If EL3 is present: - SCR_EL3.FIQ must have the same value across all CPUs the kernel is executing on. - The value of SCR_EL3.FIQ must be the same as the one present at boot time whenever the kernel is executing. - If EL3 is present and the kernel is entered at EL2: - SCR_EL3.HCE (bit 8) must be initialised to 0b1. For systems with a GICv3 interrupt controller to be used in v3 mode: - If EL3 is present: - ICC_SRE_EL3.Enable (bit 3) must be initialised to 0b1. - ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1. - ICC_CTLR_EL3.PMHE (bit 6) must be set to the same value across all CPUs the kernel is executing on, and must stay constant for the lifetime of the kernel. - If the kernel is entered at EL1: - ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1 - ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. - The DT or ACPI tables must describe a GICv3 interrupt controller. For systems with a GICv3 interrupt controller to be used in compatibility (v2) mode: - If EL3 is present: ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0. - If the kernel is entered at EL1: ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0. - The DT or ACPI tables must describe a GICv2 interrupt controller. For CPUs with pointer authentication functionality: - If EL3 is present: - SCR_EL3.APK (bit 16) must be initialised to 0b1 - SCR_EL3.API (bit 17) must be initialised to 0b1 - If the kernel is entered at EL1: - HCR_EL2.APK (bit 40) must be initialised to 0b1 - HCR_EL2.API (bit 41) must be initialised to 0b1 For CPUs with Activity Monitors Unit v1 (AMUv1) extension present: - If EL3 is present: - CPTR_EL3.TAM (bit 30) must be initialised to 0b0 - CPTR_EL2.TAM (bit 30) must be initialised to 0b0 - AMCNTENSET0_EL0 must be initialised to 0b1111 - AMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present. - If the kernel is entered at EL1: - AMCNTENSET0_EL0 must be initialised to 0b1111 - AMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present. For CPUs with the Fine Grained Traps (FEAT_FGT) extension present: - If EL3 is present and the kernel is entered at EL2: - SCR_EL3.FGTEn (bit 27) must be initialised to 0b1. For CPUs with the Fine Grained Traps 2 (FEAT_FGT2) extension present: - If EL3 is present and the kernel is entered at EL2: - SCR_EL3.FGTEn2 (bit 59) must be initialised to 0b1. For CPUs with support for HCRX_EL2 (FEAT_HCX) present: - If EL3 is present and the kernel is entered at EL2: - SCR_EL3.HXEn (bit 38) must be initialised to 0b1. For CPUs with Advanced SIMD and floating point support: - If EL3 is present: - CPTR_EL3.TFP (bit 10) must be initialised to 0b0. - If EL2 is present and the kernel is entered at EL1: - CPTR_EL2.TFP (bit 10) must be initialised to 0b0. For CPUs with the Scalable Vector Extension (FEAT_SVE) present: - if EL3 is present: - CPTR_EL3.EZ (bit 8) must be initialised to 0b1. - ZCR_EL3.LEN must be initialised to the same value for all CPUs the kernel is executed on. - If the kernel is entered at EL1 and EL2 is present: - CPTR_EL2.TZ (bit 8) must be initialised to 0b0. - CPTR_EL2.ZEN (bits 17:16) must be initialised to 0b11. - ZCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on. For CPUs with the Scalable Matrix Extension (FEAT_SME): - If EL3 is present: - CPTR_EL3.ESM (bit 12) must be initialised to 0b1. - SCR_EL3.EnTP2 (bit 41) must be initialised to 0b1. - SMCR_EL3.LEN must be initialised to the same value for all CPUs the kernel will execute on. h](h)}(hSystem registersh]hSystem registers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(hAll writable architected system registers at or below the exception level where the kernel image will be entered must be initialised by software at a higher exception level to prevent execution in an UNKNOWN state.h]hAll writable architected system registers at or below the exception level where the kernel image will be entered must be initialised by software at a higher exception level to prevent execution in an UNKNOWN state.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubh)}(h%For all systems: - If EL3 is present:h]h%For all systems: - If EL3 is present:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h- SCR_EL3.FIQ must have the same value across all CPUs the kernel is executing on. - The value of SCR_EL3.FIQ must be the same as the one present at boot time whenever the kernel is executing. h]j)}(hhh](j=)}(hPSCR_EL3.FIQ must have the same value across all CPUs the kernel is executing on.h]h)}(hPSCR_EL3.FIQ must have the same value across all CPUs the kernel is executing on.h]hPSCR_EL3.FIQ must have the same value across all CPUs the kernel is executing on.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hlThe value of SCR_EL3.FIQ must be the same as the one present at boot time whenever the kernel is executing. h]h)}(hkThe value of SCR_EL3.FIQ must be the same as the one present at boot time whenever the kernel is executing.h]hkThe value of SCR_EL3.FIQ must be the same as the one present at boot time whenever the kernel is executing.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj*ubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]jjMuh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]j=)}(hgIf EL3 is present and the kernel is entered at EL2: - SCR_EL3.HCE (bit 8) must be initialised to 0b1. h](h)}(h3If EL3 is present and the kernel is entered at EL2:h]h3If EL3 is present and the kernel is entered at EL2:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQubj)}(hhh]j=)}(h0SCR_EL3.HCE (bit 8) must be initialised to 0b1. h]h)}(h/SCR_EL3.HCE (bit 8) must be initialised to 0b1.h]h/SCR_EL3.HCE (bit 8) must be initialised to 0b1.}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjfubah}(h]h ]h"]h$]h&]uh1j<hjcubah}(h]h ]h"]h$]h&]jjMuh1jhhhKhjQubeh}(h]h ]h"]h$]h&]uh1j<hjNubah}(h]h ]h"]h$]h&]jjMuh1jhhhKhjubh)}(hYFor systems with a GICv3 interrupt controller to be used in v3 mode: - If EL3 is present:h]hYFor systems with a GICv3 interrupt controller to be used in v3 mode: - If EL3 is present:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hX- ICC_SRE_EL3.Enable (bit 3) must be initialised to 0b1. - ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1. - ICC_CTLR_EL3.PMHE (bit 6) must be set to the same value across all CPUs the kernel is executing on, and must stay constant for the lifetime of the kernel. h]j)}(hhh](j=)}(h6ICC_SRE_EL3.Enable (bit 3) must be initialised to 0b1.h]h)}(hjh]h6ICC_SRE_EL3.Enable (bit 3) must be initialised to 0b1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h3ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.h]h)}(hjh]h3ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hICC_CTLR_EL3.PMHE (bit 6) must be set to the same value across all CPUs the kernel is executing on, and must stay constant for the lifetime of the kernel. h]h)}(hICC_CTLR_EL3.PMHE (bit 6) must be set to the same value across all CPUs the kernel is executing on, and must stay constant for the lifetime of the kernel.h]hICC_CTLR_EL3.PMHE (bit 6) must be set to the same value across all CPUs the kernel is executing on, and must stay constant for the lifetime of the kernel.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]jjMuh1jhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh](j=)}(hIf the kernel is entered at EL1: - ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1 - ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. h](h)}(h If the kernel is entered at EL1:h]h If the kernel is entered at EL1:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hn- ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1 - ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. h]j)}(hhh](j=)}(h5ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1h]h)}(hjh]h5ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h4ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. h]h)}(h3ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.h]h3ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj*ubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]jjMuh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hBThe DT or ACPI tables must describe a GICv3 interrupt controller. h]h)}(hAThe DT or ACPI tables must describe a GICv3 interrupt controller.h]hAThe DT or ACPI tables must describe a GICv3 interrupt controller.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjTubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]jjMuh1jhhhKhjubh)}(hTFor systems with a GICv3 interrupt controller to be used in compatibility (v2) mode:h]hTFor systems with a GICv3 interrupt controller to be used in compatibility (v2) mode:}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](j=)}(hJIf EL3 is present: ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0. h](h)}(hIf EL3 is present:h]hIf EL3 is present:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h4ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0. h]h)}(h3ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0.h]h3ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hXIf the kernel is entered at EL1: ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0. h](h)}(h If the kernel is entered at EL1:h]h If the kernel is entered at EL1:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(h4ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0. h]h)}(h3ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0.h]h3ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubeh}(h]h ]h"]h$]h&]uh1j<hjubj=)}(hBThe DT or ACPI tables must describe a GICv2 interrupt controller. h]h)}(hAThe DT or ACPI tables must describe a GICv2 interrupt controller.h]hAThe DT or ACPI tables must describe a GICv2 interrupt controller.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]jjMuh1jhhhKhjubh)}(h3For CPUs with pointer authentication functionality:h]h3For CPUs with pointer authentication functionality:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubj)}(hhh](j=)}(hxIf EL3 is present: - SCR_EL3.APK (bit 16) must be initialised to 0b1 - SCR_EL3.API (bit 17) must be initialised to 0b1 h](h)}(hIf EL3 is present:h]hIf EL3 is present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh](j=)}(h/SCR_EL3.APK (bit 16) must be initialised to 0b1h]h)}(hj) h]h/SCR_EL3.APK (bit 16) must be initialised to 0b1}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj' ubah}(h]h ]h"]h$]h&]uh1j<hj$ ubj=)}(h0SCR_EL3.API (bit 17) must be initialised to 0b1 h]h)}(h/SCR_EL3.API (bit 17) must be initialised to 0b1h]h/SCR_EL3.API (bit 17) must be initialised to 0b1}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj> ubah}(h]h ]h"]h$]h&]uh1j<hj$ ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(hIf the kernel is entered at EL1: - HCR_EL2.APK (bit 40) must be initialised to 0b1 - HCR_EL2.API (bit 41) must be initialised to 0b1 h](h)}(h If the kernel is entered at EL1:h]h If the kernel is entered at EL1:}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjb ubj)}(hhh](j=)}(h/HCR_EL2.APK (bit 40) must be initialised to 0b1h]h)}(hjy h]h/HCR_EL2.APK (bit 40) must be initialised to 0b1}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjw ubah}(h]h ]h"]h$]h&]uh1j<hjt ubj=)}(h0HCR_EL2.API (bit 41) must be initialised to 0b1 h]h)}(h/HCR_EL2.API (bit 41) must be initialised to 0b1h]h/HCR_EL2.API (bit 41) must be initialised to 0b1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1j<hjt ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhjb ubeh}(h]h ]h"]h$]h&]uh1j<hj ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhjubh)}(hBFor CPUs with Activity Monitors Unit v1 (AMUv1) extension present:h]hBFor CPUs with Activity Monitors Unit v1 (AMUv1) extension present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubj)}(hhh](j=)}(hXFIf EL3 is present: - CPTR_EL3.TAM (bit 30) must be initialised to 0b0 - CPTR_EL2.TAM (bit 30) must be initialised to 0b0 - AMCNTENSET0_EL0 must be initialised to 0b1111 - AMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present. h](h)}(hIf EL3 is present:h]hIf EL3 is present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubj)}(hhh](j=)}(h0CPTR_EL3.TAM (bit 30) must be initialised to 0b0h]h)}(hj h]h0CPTR_EL3.TAM (bit 30) must be initialised to 0b0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h0CPTR_EL2.TAM (bit 30) must be initialised to 0b0h]h)}(hj h]h0CPTR_EL2.TAM (bit 30) must be initialised to 0b0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h-AMCNTENSET0_EL0 must be initialised to 0b1111h]h)}(hj h]h-AMCNTENSET0_EL0 must be initialised to 0b1111}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(hAMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present. h]h)}(hAMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present.h]hAMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present.}(hj' hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj# ubah}(h]h ]h"]h$]h&]uh1j<hj ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhj ubeh}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(hIf the kernel is entered at EL1: - AMCNTENSET0_EL0 must be initialised to 0b1111 - AMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present. h](h)}(h If the kernel is entered at EL1:h]h If the kernel is entered at EL1:}(hjK hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjG ubj)}(hhh](j=)}(h-AMCNTENSET0_EL0 must be initialised to 0b1111h]h)}(hj^ h]h-AMCNTENSET0_EL0 must be initialised to 0b1111}(hj` hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj\ ubah}(h]h ]h"]h$]h&]uh1j<hjY ubj=)}(hAMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present. h]h)}(hAMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present.h]hAMCNTENSET1_EL0 must be initialised to a platform specific value having 0b1 set for the corresponding bit for each of the auxiliary counters present.}(hjw hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjs ubah}(h]h ]h"]h$]h&]uh1j<hjY ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhjG ubeh}(h]h ]h"]h$]h&]uh1j<hj ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhM hjubh)}(hBFor CPUs with the Fine Grained Traps (FEAT_FGT) extension present:h]hBFor CPUs with the Fine Grained Traps (FEAT_FGT) extension present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh]j=)}(hjIf EL3 is present and the kernel is entered at EL2: - SCR_EL3.FGTEn (bit 27) must be initialised to 0b1. h](h)}(h3If EL3 is present and the kernel is entered at EL2:h]h3If EL3 is present and the kernel is entered at EL2:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubj)}(hhh]j=)}(h3SCR_EL3.FGTEn (bit 27) must be initialised to 0b1. h]h)}(h2SCR_EL3.FGTEn (bit 27) must be initialised to 0b1.h]h2SCR_EL3.FGTEn (bit 27) must be initialised to 0b1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hj ubah}(h]h ]h"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&]jjMuh1jhhhM!hj ubeh}(h]h ]h"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&]jjMuh1jhhhMhjubh)}(hEFor CPUs with the Fine Grained Traps 2 (FEAT_FGT2) extension present:h]hEFor CPUs with the Fine Grained Traps 2 (FEAT_FGT2) extension present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubj)}(hhh]j=)}(hkIf EL3 is present and the kernel is entered at EL2: - SCR_EL3.FGTEn2 (bit 59) must be initialised to 0b1. h](h)}(h3If EL3 is present and the kernel is entered at EL2:h]h3If EL3 is present and the kernel is entered at EL2:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hj ubj)}(hhh]j=)}(h4SCR_EL3.FGTEn2 (bit 59) must be initialised to 0b1. h]h)}(h3SCR_EL3.FGTEn2 (bit 59) must be initialised to 0b1.h]h3SCR_EL3.FGTEn2 (bit 59) must be initialised to 0b1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM'hj ubah}(h]h ]h"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&]jjMuh1jhhhM'hj ubeh}(h]h ]h"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&]jjMuh1jhhhM%hjubh)}(h6For CPUs with support for HCRX_EL2 (FEAT_HCX) present:h]h6For CPUs with support for HCRX_EL2 (FEAT_HCX) present:}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjubj)}(hhh]j=)}(hiIf EL3 is present and the kernel is entered at EL2: - SCR_EL3.HXEn (bit 38) must be initialised to 0b1. h](h)}(h3If EL3 is present and the kernel is entered at EL2:h]h3If EL3 is present and the kernel is entered at EL2:}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjN ubj)}(hhh]j=)}(h2SCR_EL3.HXEn (bit 38) must be initialised to 0b1. h]h)}(h1SCR_EL3.HXEn (bit 38) must be initialised to 0b1.h]h1SCR_EL3.HXEn (bit 38) must be initialised to 0b1.}(hjg hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hjc ubah}(h]h ]h"]h$]h&]uh1j<hj` ubah}(h]h ]h"]h$]h&]jjMuh1jhhhM-hjN ubeh}(h]h ]h"]h$]h&]uh1j<hjK ubah}(h]h ]h"]h$]h&]jjMuh1jhhhM+hjubh)}(h7For CPUs with Advanced SIMD and floating point support:h]h7For CPUs with Advanced SIMD and floating point support:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjubj)}(hhh](j=)}(hHIf EL3 is present: - CPTR_EL3.TFP (bit 10) must be initialised to 0b0. h](h)}(hIf EL3 is present:h]hIf EL3 is present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hj ubj)}(hhh]j=)}(h2CPTR_EL3.TFP (bit 10) must be initialised to 0b0. h]h)}(h1CPTR_EL3.TFP (bit 10) must be initialised to 0b0.h]h1CPTR_EL3.TFP (bit 10) must be initialised to 0b0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hj ubah}(h]h ]h"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&]jjMuh1jhhhM3hj ubeh}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(hiIf EL2 is present and the kernel is entered at EL1: - CPTR_EL2.TFP (bit 10) must be initialised to 0b0. h](h)}(h3If EL2 is present and the kernel is entered at EL1:h]h3If EL2 is present and the kernel is entered at EL1:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hj ubj)}(hhh]j=)}(h2CPTR_EL2.TFP (bit 10) must be initialised to 0b0. h]h)}(h1CPTR_EL2.TFP (bit 10) must be initialised to 0b0.h]h1CPTR_EL2.TFP (bit 10) must be initialised to 0b0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hj ubah}(h]h ]h"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&]jjMuh1jhhhM7hj ubeh}(h]h ]h"]h$]h&]uh1j<hj ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhM1hjubh)}(h?For CPUs with the Scalable Vector Extension (FEAT_SVE) present:h]h?For CPUs with the Scalable Vector Extension (FEAT_SVE) present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM9hjubj)}(hhh](j=)}(hif EL3 is present: - CPTR_EL3.EZ (bit 8) must be initialised to 0b1. - ZCR_EL3.LEN must be initialised to the same value for all CPUs the kernel is executed on. h](h)}(hif EL3 is present:h]hif EL3 is present:}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hj' ubj)}(hhh](j=)}(h0CPTR_EL3.EZ (bit 8) must be initialised to 0b1. h]h)}(h/CPTR_EL3.EZ (bit 8) must be initialised to 0b1.h]h/CPTR_EL3.EZ (bit 8) must be initialised to 0b1.}(hj@ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hj< ubah}(h]h ]h"]h$]h&]uh1j<hj9 ubj=)}(hZZCR_EL3.LEN must be initialised to the same value for all CPUs the kernel is executed on. h]h)}(hYZCR_EL3.LEN must be initialised to the same value for all CPUs the kernel is executed on.h]hYZCR_EL3.LEN must be initialised to the same value for all CPUs the kernel is executed on.}(hjX hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjT ubah}(h]h ]h"]h$]h&]uh1j<hj9 ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhM=hj' ubeh}(h]h ]h"]h$]h&]uh1j<hj$ ubj=)}(hXIf the kernel is entered at EL1 and EL2 is present: - CPTR_EL2.TZ (bit 8) must be initialised to 0b0. - CPTR_EL2.ZEN (bits 17:16) must be initialised to 0b11. - ZCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on. h](h)}(h3If the kernel is entered at EL1 and EL2 is present:h]h3If the kernel is entered at EL1 and EL2 is present:}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjx ubj)}(hhh](j=)}(h0CPTR_EL2.TZ (bit 8) must be initialised to 0b0. h]h)}(h/CPTR_EL2.TZ (bit 8) must be initialised to 0b0.h]h/CPTR_EL2.TZ (bit 8) must be initialised to 0b0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h7CPTR_EL2.ZEN (bits 17:16) must be initialised to 0b11. h]h)}(h6CPTR_EL2.ZEN (bits 17:16) must be initialised to 0b11.h]h6CPTR_EL2.ZEN (bits 17:16) must be initialised to 0b11.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMFhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h[ZCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on. h]h)}(hZZCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on.h]hZZCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMDhjx ubeh}(h]h ]h"]h$]h&]uh1j<hj$ ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhM;hjubh)}(h7For CPUs with the Scalable Matrix Extension (FEAT_SME):h]h7For CPUs with the Scalable Matrix Extension (FEAT_SME):}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubj)}(hhh]j=)}(hIf EL3 is present: - CPTR_EL3.ESM (bit 12) must be initialised to 0b1. - SCR_EL3.EnTP2 (bit 41) must be initialised to 0b1. - SMCR_EL3.LEN must be initialised to the same value for all CPUs the kernel will execute on. h](h)}(hIf EL3 is present:h]hIf EL3 is present:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj ubj)}(hhh](j=)}(h2CPTR_EL3.ESM (bit 12) must be initialised to 0b1. h]h)}(h1CPTR_EL3.ESM (bit 12) must be initialised to 0b1.h]h1CPTR_EL3.ESM (bit 12) must be initialised to 0b1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h3SCR_EL3.EnTP2 (bit 41) must be initialised to 0b1. h]h)}(h2SCR_EL3.EnTP2 (bit 41) must be initialised to 0b1.h]h2SCR_EL3.EnTP2 (bit 41) must be initialised to 0b1.}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj% ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h\SMCR_EL3.LEN must be initialised to the same value for all CPUs the kernel will execute on. h]h)}(h[SMCR_EL3.LEN must be initialised to the same value for all CPUs the kernel will execute on.h]h[SMCR_EL3.LEN must be initialised to the same value for all CPUs the kernel will execute on.}(hjA hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj= ubah}(h]h ]h"]h$]h&]uh1j<hj ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMOhj ubeh}(h]h ]h"]h$]h&]uh1j<hj ubah}(h]h ]h"]h$]h&]jjMuh1jhhhMMhjubeh}(h]h ]h"]h$]h&]uh1j<hjhhhNhNubeh}(h]h ]h"]h$]h&]jjMuh1jhhhKhjahhubj)}(hX:- If the kernel is entered at EL1 and EL2 is present: - CPTR_EL2.TSM (bit 12) must be initialised to 0b0. - CPTR_EL2.SMEN (bits 25:24) must be initialised to 0b11. - SCTLR_EL2.EnTP2 (bit 60) must be initialised to 0b1. - SMCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on. - HWFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. - HWFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. - HWFGRTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01. - HWFGWTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01. For CPUs with the Scalable Matrix Extension FA64 feature (FEAT_SME_FA64): - If EL3 is present: - SMCR_EL3.FA64 (bit 31) must be initialised to 0b1. - If the kernel is entered at EL1 and EL2 is present: - SMCR_EL2.FA64 (bit 31) must be initialised to 0b1. For CPUs with the Memory Tagging Extension feature (FEAT_MTE2): - If EL3 is present: - SCR_EL3.ATA (bit 26) must be initialised to 0b1. - If the kernel is entered at EL1 and EL2 is present: - HCR_EL2.ATA (bit 56) must be initialised to 0b1. For CPUs with the Scalable Matrix Extension version 2 (FEAT_SME2): - If EL3 is present: - SMCR_EL3.EZT0 (bit 30) must be initialised to 0b1. - If the kernel is entered at EL1 and EL2 is present: - SMCR_EL2.EZT0 (bit 30) must be initialised to 0b1. For CPUs with the Performance Monitors Extension (FEAT_PMUv3p9): - If EL3 is present: - MDCR_EL3.EnPM2 (bit 7) must be initialised to 0b1. - If the kernel is entered at EL1 and EL2 is present: - HDFGRTR2_EL2.nPMICNTR_EL0 (bit 2) must be initialised to 0b1. - HDFGRTR2_EL2.nPMICFILTR_EL0 (bit 3) must be initialised to 0b1. - HDFGRTR2_EL2.nPMUACR_EL1 (bit 4) must be initialised to 0b1. - HDFGWTR2_EL2.nPMICNTR_EL0 (bit 2) must be initialised to 0b1. - HDFGWTR2_EL2.nPMICFILTR_EL0 (bit 3) must be initialised to 0b1. - HDFGWTR2_EL2.nPMUACR_EL1 (bit 4) must be initialised to 0b1. For CPUs with Memory Copy and Memory Set instructions (FEAT_MOPS): - If the kernel is entered at EL1 and EL2 is present: - HCRX_EL2.MSCEn (bit 11) must be initialised to 0b1. - HCRX_EL2.MCE2 (bit 10) must be initialised to 0b1 and the hypervisor must handle MOPS exceptions as described in :ref:`arm64_mops_hyp`. For CPUs with the Extended Translation Control Register feature (FEAT_TCR2): - If EL3 is present: - SCR_EL3.TCR2En (bit 43) must be initialised to 0b1. - If the kernel is entered at EL1 and EL2 is present: - HCRX_EL2.TCR2En (bit 14) must be initialised to 0b1. For CPUs with the Stage 1 Permission Indirection Extension feature (FEAT_S1PIE): - If EL3 is present: - SCR_EL3.PIEn (bit 45) must be initialised to 0b1. - If the kernel is entered at EL1 and EL2 is present: - HFGRTR_EL2.nPIR_EL1 (bit 58) must be initialised to 0b1. - HFGWTR_EL2.nPIR_EL1 (bit 58) must be initialised to 0b1. - HFGRTR_EL2.nPIRE0_EL1 (bit 57) must be initialised to 0b1. - HFGRWR_EL2.nPIRE0_EL1 (bit 57) must be initialised to 0b1. - For CPUs with Guarded Control Stacks (FEAT_GCS): - GCSCR_EL1 must be initialised to 0. - GCSCRE0_EL1 must be initialised to 0. - If EL3 is present: - SCR_EL3.GCSEn (bit 39) must be initialised to 0b1. - If EL2 is present: - GCSCR_EL2 must be initialised to 0. - If the kernel is entered at EL1 and EL2 is present: - HCRX_EL2.GCSEn must be initialised to 0b1. - HFGITR_EL2.nGCSEPP (bit 59) must be initialised to 0b1. - HFGITR_EL2.nGCSSTR_EL1 (bit 58) must be initialised to 0b1. - HFGITR_EL2.nGCSPUSHM_EL1 (bit 57) must be initialised to 0b1. - HFGRTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1. - HFGRTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1. - HFGWTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1. - HFGWTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1. - For CPUs with debug architecture i.e FEAT_Debugv8pN (all versions): - If EL3 is present: - MDCR_EL3.TDA (bit 9) must be initialized to 0b0 - For CPUs with FEAT_PMUv3: - If EL3 is present: - MDCR_EL3.TPM (bit 6) must be initialized to 0b0 h](j)}(hhh]j=)}(hXHIf the kernel is entered at EL1 and EL2 is present: - CPTR_EL2.TSM (bit 12) must be initialised to 0b0. - CPTR_EL2.SMEN (bits 25:24) must be initialised to 0b11. - SCTLR_EL2.EnTP2 (bit 60) must be initialised to 0b1. - SMCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on. - HWFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. - HWFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. - HWFGRTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01. - HWFGWTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01. h](h)}(h3If the kernel is entered at EL1 and EL2 is present:h]h3If the kernel is entered at EL1 and EL2 is present:}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjz ubj)}(hX - CPTR_EL2.TSM (bit 12) must be initialised to 0b0. - CPTR_EL2.SMEN (bits 25:24) must be initialised to 0b11. - SCTLR_EL2.EnTP2 (bit 60) must be initialised to 0b1. - SMCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on. - HWFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. - HWFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. - HWFGRTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01. - HWFGWTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01. h]j)}(hhh](j=)}(h2CPTR_EL2.TSM (bit 12) must be initialised to 0b0. h]h)}(h1CPTR_EL2.TSM (bit 12) must be initialised to 0b0.h]h1CPTR_EL2.TSM (bit 12) must be initialised to 0b0.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h8CPTR_EL2.SMEN (bits 25:24) must be initialised to 0b11. h]h)}(h7CPTR_EL2.SMEN (bits 25:24) must be initialised to 0b11.h]h7CPTR_EL2.SMEN (bits 25:24) must be initialised to 0b11.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h5SCTLR_EL2.EnTP2 (bit 60) must be initialised to 0b1. h]h)}(h4SCTLR_EL2.EnTP2 (bit 60) must be initialised to 0b1.h]h4SCTLR_EL2.EnTP2 (bit 60) must be initialised to 0b1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h\SMCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on. h]h)}(h[SMCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on.h]h[SMCR_EL2.LEN must be initialised to the same value for all CPUs the kernel will execute on.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h>HWFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. h]h)}(h=HWFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.h]h=HWFGRTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMahj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h>HWFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01. h]h)}(h=HWFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.h]h=HWFGWTR_EL2.nTPIDR2_EL0 (bit 55) must be initialised to 0b01.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMchj ubah}(h]h ]h"]h$]h&]uh1j<hj ubj=)}(h=HWFGRTR_EL2.nSMPRI_EL1 (bit 54) must be initialised to 0b01. h]h)}(hHFGITR_EL2.nGCSPUSHM_EL1 (bit 57) must be initialised to 0b1. h]h)}(h=HFGITR_EL2.nGCSPUSHM_EL1 (bit 57) must be initialised to 0b1.h]h=HFGITR_EL2.nGCSPUSHM_EL1 (bit 57) must be initialised to 0b1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hj\ubj=)}(h9HFGRTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1. h]h)}(h8HFGRTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1.h]h8HFGRTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hj\ubj=)}(h9HFGRTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1. h]h)}(h8HFGRTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1.h]h8HFGRTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hj\ubj=)}(h9HFGWTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1. h]h)}(h8HFGWTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1.h]h8HFGWTR_EL2.nGCS_EL1 (bit 53) must be initialised to 0b1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hj\ubj=)}(h9HFGWTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1. h]h)}(h8HFGWTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1.h]h8HFGWTR_EL2.nGCS_EL0 (bit 52) must be initialised to 0b1.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hj\ubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhjXubah}(h]h ]h"]h$]h&]uh1jhhhMhjFubeh}(h]h ]h"]h$]h&]uh1j<hjCubj=)}(hDFor CPUs with debug architecture i.e FEAT_Debugv8pN (all versions): h]h)}(hCFor CPUs with debug architecture i.e FEAT_Debugv8pN (all versions):h]hCFor CPUs with debug architecture i.e FEAT_Debugv8pN (all versions):}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj1ubah}(h]h ]h"]h$]h&]uh1j<hjCubj=)}(hFIf EL3 is present: - MDCR_EL3.TDA (bit 9) must be initialized to 0b0 h](h)}(hIf EL3 is present:h]hIf EL3 is present:}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjIubj)}(hhh]j=)}(h0MDCR_EL3.TDA (bit 9) must be initialized to 0b0 h]h)}(h/MDCR_EL3.TDA (bit 9) must be initialized to 0b0h]h/MDCR_EL3.TDA (bit 9) must be initialized to 0b0}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj^ubah}(h]h ]h"]h$]h&]uh1j<hj[ubah}(h]h ]h"]h$]h&]jjMuh1jhhhMhjIubeh}(h]h ]h"]h$]h&]uh1j<hjCubj=)}(hFor CPUs with FEAT_PMUv3: h]h)}(hFor CPUs with FEAT_PMUv3:h]hFor CPUs with FEAT_PMUv3:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hjCubj=)}(hFIf EL3 is present: - MDCR_EL3.TPM (bit 6) must be initialized to 0b0 h](h)}(hIf EL3 is present:h]hIf EL3 is present:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubj)}(hhh]j=)}(h0MDCR_EL3.TPM (bit 6) must be initialized to 0b0 h]h)}(h/MDCR_EL3.TPM (bit 6) must be initialized to 0b0h]h/MDCR_EL3.TPM (bit 6) must be initialized to 0b0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hjubah}(h]h ]h"]h$]h&]jjMuh1jhhhMhjubeh}(h]h ]h"]h$]h&]uh1j<hjCubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhjs ubeh}(h]h ]h"]h$]h&]uh1jhhhMVhjahhubh)}(hXThe requirements described above for CPU mode, caches, MMUs, architected timers, coherency and system registers apply to all CPUs. All CPUs must enter the kernel in the same exception level. Where the values documented disable traps it is permissible for these traps to be enabled so long as those traps are handled transparently by higher exception levels as though the values documented were set.h]hXThe requirements described above for CPU mode, caches, MMUs, architected timers, coherency and system registers apply to all CPUs. All CPUs must enter the kernel in the same exception level. Where the values documented disable traps it is permissible for these traps to be enabled so long as those traps are handled transparently by higher exception levels as though the values documented were set.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjahhubh)}(hTThe boot loader is expected to enter the kernel on each CPU in the following manner:h]hTThe boot loader is expected to enter the kernel on each CPU in the following manner:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjahhubj)}(hhh](j=)}(hXmThe primary CPU must jump directly to the first instruction of the kernel image. The device tree blob passed by this CPU must contain an 'enable-method' property for each cpu node. The supported enable-methods are described below. It is expected that the bootloader will generate these device tree properties and insert them into the blob prior to kernel entry. h](h)}(hThe primary CPU must jump directly to the first instruction of the kernel image. The device tree blob passed by this CPU must contain an 'enable-method' property for each cpu node. The supported enable-methods are described below.h]hThe primary CPU must jump directly to the first instruction of the kernel image. The device tree blob passed by this CPU must contain an ‘enable-method’ property for each cpu node. The supported enable-methods are described below.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubh)}(hIt is expected that the bootloader will generate these device tree properties and insert them into the blob prior to kernel entry.h]hIt is expected that the bootloader will generate these device tree properties and insert them into the blob prior to kernel entry.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hX0CPUs with a "spin-table" enable-method must have a 'cpu-release-addr' property in their cpu node. This property identifies a naturally-aligned 64-bit zero-initalised memory location. These CPUs should spin outside of the kernel in a reserved area of memory (communicated to the kernel by a /memreserve/ region in the device tree) polling their cpu-release-addr location, which must be contained in the reserved region. A wfe instruction may be inserted to reduce the overhead of the busy-loop and a sev will be issued by the primary CPU. When a read of the location pointed to by the cpu-release-addr returns a non-zero value, the CPU must jump to this value. The value will be written as a single 64-bit little-endian value, so CPUs must convert the read value to their native endianness before jumping to it. h](h)}(hCPUs with a "spin-table" enable-method must have a 'cpu-release-addr' property in their cpu node. This property identifies a naturally-aligned 64-bit zero-initalised memory location.h]hCPUs with a “spin-table” enable-method must have a ‘cpu-release-addr’ property in their cpu node. This property identifies a naturally-aligned 64-bit zero-initalised memory location.}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubh)}(hXvThese CPUs should spin outside of the kernel in a reserved area of memory (communicated to the kernel by a /memreserve/ region in the device tree) polling their cpu-release-addr location, which must be contained in the reserved region. A wfe instruction may be inserted to reduce the overhead of the busy-loop and a sev will be issued by the primary CPU. When a read of the location pointed to by the cpu-release-addr returns a non-zero value, the CPU must jump to this value. The value will be written as a single 64-bit little-endian value, so CPUs must convert the read value to their native endianness before jumping to it.h]hXvThese CPUs should spin outside of the kernel in a reserved area of memory (communicated to the kernel by a /memreserve/ region in the device tree) polling their cpu-release-addr location, which must be contained in the reserved region. A wfe instruction may be inserted to reduce the overhead of the busy-loop and a sev will be issued by the primary CPU. When a read of the location pointed to by the cpu-release-addr returns a non-zero value, the CPU must jump to this value. The value will be written as a single 64-bit little-endian value, so CPUs must convert the read value to their native endianness before jumping to it.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hX,CPUs with a "psci" enable method should remain outside of the kernel (i.e. outside of the regions of memory described to the kernel in the memory node, or in a reserved area of memory described to the kernel by a /memreserve/ region in the device tree). The kernel will issue CPU_ON calls as described in ARM document number ARM DEN 0022A ("Power State Coordination Interface System Software on ARM processors") to bring CPUs into the kernel. The device tree should contain a 'psci' node, as described in Documentation/devicetree/bindings/arm/psci.yaml. h](h)}(hXCPUs with a "psci" enable method should remain outside of the kernel (i.e. outside of the regions of memory described to the kernel in the memory node, or in a reserved area of memory described to the kernel by a /memreserve/ region in the device tree). The kernel will issue CPU_ON calls as described in ARM document number ARM DEN 0022A ("Power State Coordination Interface System Software on ARM processors") to bring CPUs into the kernel.h]hXCPUs with a “psci” enable method should remain outside of the kernel (i.e. outside of the regions of memory described to the kernel in the memory node, or in a reserved area of memory described to the kernel by a /memreserve/ region in the device tree). The kernel will issue CPU_ON calls as described in ARM document number ARM DEN 0022A (“Power State Coordination Interface System Software on ARM processors”) to bring CPUs into the kernel.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJubh)}(hnThe device tree should contain a 'psci' node, as described in Documentation/devicetree/bindings/arm/psci.yaml.h]hrThe device tree should contain a ‘psci’ node, as described in Documentation/devicetree/bindings/arm/psci.yaml.}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjJubeh}(h]h ]h"]h$]h&]uh1j<hjhhhhhNubj=)}(hSecondary CPU general-purpose register settings - x0 = 0 (reserved for future use) - x1 = 0 (reserved for future use) - x2 = 0 (reserved for future use) - x3 = 0 (reserved for future use)h](h)}(h/Secondary CPU general-purpose register settingsh]h/Secondary CPU general-purpose register settings}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjpubj)}(hhh](j=)}(h x0 = 0 (reserved for future use)h]h)}(hjh]h x0 = 0 (reserved for future use)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h x1 = 0 (reserved for future use)h]h)}(hjh]h x1 = 0 (reserved for future use)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h x2 = 0 (reserved for future use)h]h)}(hjh]h x2 = 0 (reserved for future use)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hjubj=)}(h x3 = 0 (reserved for future use)h]h)}(hjh]h x3 = 0 (reserved for future use)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1j<hjubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhjpubeh}(h]h ]h"]h$]h&]uh1j<hjhhhNhNubeh}(h]h ]h"]h$]h&]jjMuh1jhhhMhjahhubeh}(h]call-the-kernel-imageah ]h"]4. call the kernel imageah$]h&]uh1hhhhhhhhKJubeh}(h]booting-aarch64-linuxah ]h"]booting aarch64 linuxah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjOfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj%error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jjjjj)j&j^j[jju nametypes}(jjj)j^juh}(jhjjj&jj[j,jjau footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.