€•Å6Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ0/translations/zh_CN/arch/riscv/boot-image-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/zh_TW/arch/riscv/boot-image-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/it_IT/arch/riscv/boot-image-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ja_JP/arch/riscv/boot-image-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/ko_KR/arch/riscv/boot-image-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ0/translations/sp_SP/arch/riscv/boot-image-header”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ!Boot image header in RISC-V Linux”h]”hŒ!Boot image header in RISC-V Linux”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒJ/var/lib/git/docbuild/linux/Documentation/arch/riscv/boot-image-header.rst”h KubhŒ field_list”“”)”}”(hhh]”(hŒfield”“”)”}”(hhh]”(hŒ field_name”“”)”}”(hŒAuthor”h]”hŒAuthor”…””}”(hhÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÁhh¾hŸh¶h KubhŒ field_body”“”)”}”(hŒ!Atish Patra ”h]”hŒ paragraph”“”)”}”(hhÕh]”(hŒ Atish Patra <”…””}”(hhÙhžhhŸNh NubhŒ reference”“”)”}”(hŒatish.patra@wdc.com”h]”hŒatish.patra@wdc.com”…””}”(hhâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”Œmailto:atish.patra@wdc.com”uh1hàhhÙubhŒ>”…””}”(hhÙhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h KhhÓubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑhh¾ubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h Khh¹hžhubh½)”}”(hhh]”(hÂ)”}”(hŒDate”h]”hŒDate”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÁhjhŸh¶h KubhÒ)”}”(hŒ 20 May 2019 ”h]”hØ)”}”(hŒ 20 May 2019”h]”hŒ 20 May 2019”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÑhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1h¼hŸh¶h Khh¹hžhubeh}”(h]”h ]”h"]”h$]”h&]”uh1h·hh£hžhhŸh¶h KubhØ)”}”(hŒLThis document only describes the boot image header details for RISC-V Linux.”h]”hŒLThis document only describes the boot image header details for RISC-V Linux.”…””}”(hj=hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khh£hžhubhØ)”}”(hŒLThe following 64-byte header is present in decompressed Linux kernel image::”h]”hŒKThe following 64-byte header is present in decompressed Linux kernel image:”…””}”(hjKhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K hh£hžhubhŒ literal_block”“”)”}”(hXsu32 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 */ u32 version; /* Version of this header */ u32 res1 = 0; /* Reserved */ u64 res2 = 0; /* Reserved */ u64 magic = 0x5643534952; /* Magic number, little endian, "RISCV" */ u32 magic2 = 0x05435352; /* Magic number 2, little endian, "RSC\x05" */ u32 res3; /* Reserved for PE COFF offset */”h]”hXsu32 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 */ u32 version; /* Version of this header */ u32 res1 = 0; /* Reserved */ u64 res2 = 0; /* Reserved */ u64 magic = 0x5643534952; /* Magic number, little endian, "RISCV" */ u32 magic2 = 0x05435352; /* Magic number 2, little endian, "RSC\x05" */ u32 res3; /* Reserved for PE COFF offset */”…””}”hj[sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jYhŸh¶h K hh£hžhubhØ)”}”(hŒ®This header format is compliant with PE/COFF header and largely inspired from ARM64 header. Thus, both ARM64 & RISC-V header can be combined into one common header in future.”h]”hŒ®This header format is compliant with PE/COFF header and largely inspired from ARM64 header. Thus, both ARM64 & RISC-V header can be combined into one common header in future.”…””}”(hjkhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khh£hžhubh¢)”}”(hhh]”(h§)”}”(hŒNotes”h]”hŒNotes”…””}”(hj|hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjyhžhhŸh¶h KubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hXBThis header is also reused to support EFI stub for RISC-V. EFI specification needs PE/COFF image header in the beginning of the kernel image in order to load it as an EFI application. In order to support EFI stub, code0 is replaced with "MZ" magic string and res3(at offset 0x3c) points to the rest of the PE/COFF header. ”h]”hØ)”}”(hXAThis header is also reused to support EFI stub for RISC-V. EFI specification needs PE/COFF image header in the beginning of the kernel image in order to load it as an EFI application. In order to support EFI stub, code0 is replaced with "MZ" magic string and res3(at offset 0x3c) points to the rest of the PE/COFF header.”h]”hXEThis header is also reused to support EFI stub for RISC-V. EFI specification needs PE/COFF image header in the beginning of the kernel image in order to load it as an EFI application. In order to support EFI stub, code0 is replaced with “MZ†magic string and res3(at offset 0x3c) points to the rest of the PE/COFF header.”…””}”(hj•hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h Khj‘ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŒhžhhŸh¶h Nubj)”}”(hX!version field indicate header version number ========== ============= Bits 0:15 Minor version Bits 16:31 Major version ========== ============= This preserves compatibility across newer and older version of the header. The current version is defined as 0.2. ”h]”(hØ)”}”(hŒ,version field indicate header version number”h]”hŒ,version field indicate header version number”…””}”(hj­hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K%hj©ubhŒ block_quote”“”)”}”(hŒh========== ============= Bits 0:15 Minor version Bits 16:31 Major version ========== ============= ”h]”hŒtable”“”)”}”(hhh]”hŒtgroup”“”)”}”(hhh]”(hŒcolspec”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jËhjÈubjÌ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K uh1jËhjÈubhŒtbody”“”)”}”(hhh]”(hŒrow”“”)”}”(hhh]”(hŒentry”“”)”}”(hhh]”hØ)”}”(hŒ Bits 0:15”h]”hŒ Bits 0:15”…””}”(hjðhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K(hjíubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhjèubjì)”}”(hhh]”hØ)”}”(hŒ Minor version”h]”hŒ Minor version”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K(hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhjèubeh}”(h]”h ]”h"]”h$]”h&]”uh1jæhjãubjç)”}”(hhh]”(jì)”}”(hhh]”hØ)”}”(hŒ Bits 16:31”h]”hŒ Bits 16:31”…””}”(hj'hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K)hj$ubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhj!ubjì)”}”(hhh]”hØ)”}”(hŒ Major version”h]”hŒ Major version”…””}”(hj>hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K)hj;ubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhj!ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jæhjãubeh}”(h]”h ]”h"]”h$]”h&]”uh1jáhjÈubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jÆhjÃubah}”(h]”h ]”h"]”h$]”h&]”uh1jÁhj½ubah}”(h]”h ]”h"]”h$]”h&]”uh1j»hŸh¶h K'hj©ubhØ)”}”(hŒqThis preserves compatibility across newer and older version of the header. The current version is defined as 0.2.”h]”hŒqThis preserves compatibility across newer and older version of the header. The current version is defined as 0.2.”…””}”(hjqhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K,hj©ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjŒhžhhŸh¶h Nubj)”}”(hXThe "magic" field is deprecated as of version 0.2. In a future release, it may be removed. This originally should have matched up with the ARM64 header "magic" field, but unfortunately does not. The "magic2" field replaces it, matching up with the ARM64 header. ”h]”hØ)”}”(hXThe "magic" field is deprecated as of version 0.2. In a future release, it may be removed. This originally should have matched up with the ARM64 header "magic" field, but unfortunately does not. The "magic2" field replaces it, matching up with the ARM64 header.”h]”hXThe “magic†field is deprecated as of version 0.2. In a future release, it may be removed. This originally should have matched up with the ARM64 header “magic†field, but unfortunately does not. The “magic2†field replaces it, matching up with the ARM64 header.”…””}”(hj‰hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K/hj…ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŒhžhhŸh¶h Nubj)”}”(hŒÎIn current header, the flags field has only one field. ===== ==================================== Bit 0 Kernel endianness. 1 if BE, 0 if LE. ===== ==================================== ”h]”(hØ)”}”(hŒ6In current header, the flags field has only one field.”h]”hŒ6In current header, the flags field has only one field.”…””}”(hj¡hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K4hjubj¼)”}”(hŒ„===== ==================================== Bit 0 Kernel endianness. 1 if BE, 0 if LE. ===== ==================================== ”h]”jÂ)”}”(hhh]”jÇ)”}”(hhh]”(jÌ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”Kuh1jËhj¶ubjÌ)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œcolwidth”K$uh1jËhj¶ubjâ)”}”(hhh]”jç)”}”(hhh]”(jì)”}”(hhh]”hØ)”}”(hŒBit 0”h]”hŒBit 0”…””}”(hjÖhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K7hjÓubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhjÐubjì)”}”(hhh]”hØ)”}”(hŒ$Kernel endianness. 1 if BE, 0 if LE.”h]”hŒ$Kernel endianness. 1 if BE, 0 if LE.”…””}”(hjíhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K7hjêubah}”(h]”h ]”h"]”h$]”h&]”uh1jëhjÐubeh}”(h]”h ]”h"]”h$]”h&]”uh1jæhjÍubah}”(h]”h ]”h"]”h$]”h&]”uh1jáhj¶ubeh}”(h]”h ]”h"]”h$]”h&]”Œcols”Kuh1jÆhj³ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÁhj¯ubah}”(h]”h ]”h"]”h$]”h&]”uh1j»hŸh¶h K6hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jhjŒhžhhŸh¶h Nubj)”}”(hŒZImage size is mandatory for boot loader to load kernel image. Booting will fail otherwise.”h]”hØ)”}”(hŒZImage size is mandatory for boot loader to load kernel image. Booting will fail otherwise.”h]”hŒZImage size is mandatory for boot loader to load kernel image. Booting will fail otherwise.”…””}”(hj*hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh¶h K:hj&ubah}”(h]”h ]”h"]”h$]”h&]”uh1jhjŒhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jŠhŸh¶h Khjyhžhubeh}”(h]”Œnotes”ah ]”h"]”Œnotes”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubeh}”(h]”Œ!boot-image-header-in-risc-v-linux”ah ]”h"]”Œ!boot image header in risc-v linux”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”jëŒfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jxŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jSjPjKjHuŒ nametypes”}”(jS‰jK‰uh}”(jPh£jHjyuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.