]sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget1/translations/zh_CN/driver-api/firmware/efi/indexmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/zh_TW/driver-api/firmware/efi/indexmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/it_IT/driver-api/firmware/efi/indexmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ja_JP/driver-api/firmware/efi/indexmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/ko_KR/driver-api/firmware/efi/indexmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget1/translations/sp_SP/driver-api/firmware/efi/indexmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhK/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index.rsthKubhsection)}(hhh](htitle)}(h4Unified Extensible Firmware Interface (UEFI) Supporth]h4Unified Extensible Firmware Interface (UEFI) Support}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hUEFI stub library functionsh]hUEFI stub library functions}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleefi_get_memory_map (C function)c.efi_get_memory_maphNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(hTefi_status_t efi_get_memory_map (struct efi_boot_memmap **map, bool install_cfg_tbl)h]hdesc_signature_line)}(hSefi_status_t efi_get_memory_map(struct efi_boot_memmap **map, bool install_cfg_tbl)h](h)}(hhh]h desc_sig_name)}(h efi_status_th]h efi_status_t}(hjhhhNhNubah}(h]h ]nah"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&] refdomaincreftype identifier reftargetjmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data]j ASTIdentifier)}jefi_get_memory_mapsbc.efi_get_memory_mapasbuh1hhhhhhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chK ubhdesc_sig_space)}(h h]h }(hj/hhhNhNubah}(h]h ]wah"]h$]h&]uh1j-hhhhhj,hK ubh desc_name)}(hefi_get_memory_maph]j)}(hj)h]hefi_get_memory_map}(hjDhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj@ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j>hhhhhj,hK ubhdesc_parameterlist)}(h4(struct efi_boot_memmap **map, bool install_cfg_tbl)h](hdesc_parameter)}(hstruct efi_boot_memmap **maph](hdesc_sig_keyword)}(hstructh]hstruct}(hjghhhNhNubah}(h]h ]kah"]h$]h&]uh1jehjaubj.)}(h h]h }(hjvhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjaubh)}(hhh]j)}(hefi_boot_memmaph]hefi_boot_memmap}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetjmodnameN classnameNjj )}j#]j'c.efi_get_memory_mapasbuh1hhjaubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjaubhdesc_sig_punctuation)}(h*h]h*}(hjhhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjaubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjaubj)}(hmaph]hmap}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjaubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj[ubj`)}(hbool install_cfg_tblh](hdesc_sig_keyword_type)}(hboolh]hbool}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hinstall_cfg_tblh]hinstall_cfg_tbl}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj[ubeh}(h]h ]h"]h$]h&]hhuh1jYhhhhhj,hK ubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1hsphinx_line_type declaratorhhhhhj,hK ubah}(h]hah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1hhj,hK hhhhubh desc_content)}(hhh]h paragraph)}(hget memory maph]hget memory map}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chK hj:hhubah}(h]h ]h"]h$]h&]uh1j8hhhhhj,hK ubeh}(h]h ](jfunctioneh"]h$]h&]domainjobjtypejWdesctypejWnoindex noindexentrynocontentsentryuh1hhhhhhNhNubh container)}(hX**Parameters** ``struct efi_boot_memmap **map`` pointer to memory map pointer to which to assign the newly allocated memory map ``bool install_cfg_tbl`` whether or not to install the boot memory map as a configuration table **Description** Retrieve the UEFI memory map. The allocated memory leaves room for up to EFI_MMAP_NR_SLACK_SLOTS additional memory map entries. **Return** status codeh](j>)}(h**Parameters**h]hstrong)}(hjih]h Parameters}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjgubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chK hjcubhdefinition_list)}(hhh](hdefinition_list_item)}(hq``struct efi_boot_memmap **map`` pointer to memory map pointer to which to assign the newly allocated memory map h](hterm)}(h ``struct efi_boot_memmap **map``h]hliteral)}(hjh]hstruct efi_boot_memmap **map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chK hjubh definition)}(hhh]j>)}(hOpointer to memory map pointer to which to assign the newly allocated memory maph]hOpointer to memory map pointer to which to assign the newly allocated memory map}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK hjubj)}(h```bool install_cfg_tbl`` whether or not to install the boot memory map as a configuration table h](j)}(h``bool install_cfg_tbl``h]j)}(hjh]hbool install_cfg_tbl}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chK hjubj)}(hhh]j>)}(hFwhether or not to install the boot memory map as a configuration tableh]hFwhether or not to install the boot memory map as a configuration table}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chK hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhK hjubeh}(h]h ]h"]h$]h&]uh1jhjcubj>)}(h**Description**h]jl)}(hj h]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKhjcubj>)}(hRetrieve the UEFI memory map. The allocated memory leaves room for up to EFI_MMAP_NR_SLACK_SLOTS additional memory map entries.h]hRetrieve the UEFI memory map. The allocated memory leaves room for up to EFI_MMAP_NR_SLACK_SLOTS additional memory map entries.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKhjcubj>)}(h **Return**h]jl)}(hj1h]hReturn}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhj/ubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKhjcubj>)}(h status codeh]h status code}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKhjcubeh}(h]h ] kernelindentah"]h$]h&]uh1jahhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hefi_allocate_pages (C function)c.efi_allocate_pageshNtauh1hhhhhhNhNubh)}(hhh](h)}(h\efi_status_t efi_allocate_pages (unsigned long size, unsigned long *addr, unsigned long max)h]h)}(h[efi_status_t efi_allocate_pages(unsigned long size, unsigned long *addr, unsigned long max)h](h)}(hhh]j)}(h efi_status_th]h efi_status_t}(hjyhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjvubah}(h]h ]h"]h$]h&] refdomainjreftypej reftargetj{modnameN classnameNjj )}j#]j&)}jefi_allocate_pagessbc.efi_allocate_pagesasbuh1hhjrhhhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKDubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjrhhhjhKDubj?)}(hefi_allocate_pagesh]j)}(hjh]hefi_allocate_pages}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubah}(h]h ](jTjUeh"]h$]h&]hhuh1j>hjrhhhjhKDubjZ)}(h<(unsigned long size, unsigned long *addr, unsigned long max)h](j`)}(hunsigned long sizeh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hjubj`)}(hunsigned long *addrh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hj'hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hlongh]hlong}(hj5hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjChhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hjh]h*}(hjQhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(haddrh]haddr}(hj^hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hjubj`)}(hunsigned long maxh](j)}(hunsignedh]hunsigned}(hjwhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjsubj)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjsubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjsubj)}(hmaxh]hmax}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjsubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hjubeh}(h]h ]h"]h$]h&]hhuh1jYhjrhhhjhKDubeh}(h]h ]h"]h$]h&]hhj*uh1hj+j,hjnhhhjhKDubah}(h]jiah ](j0j1eh"]h$]h&]j5j6)j7huh1hhjhKDhjkhhubj9)}(hhh]j>)}(hAllocate memory pagesh]hAllocate memory pages}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKDhjhhubah}(h]h ]h"]h$]h&]uh1j8hjkhhhjhKDubeh}(h]h ](jfunctioneh"]h$]h&]j[jj\jj]jj^j_j`uh1hhhhhhNhNubjb)}(hXA**Parameters** ``unsigned long size`` minimum number of bytes to allocate ``unsigned long *addr`` On return the address of the first allocated page. The first allocated page has alignment EFI_ALLOC_ALIGN which is an architecture dependent multiple of the page size. ``unsigned long max`` the address that the last allocated memory page shall not exceed **Description** Allocate pages as EFI_LOADER_DATA. The allocated pages are aligned according to EFI_ALLOC_ALIGN. The last allocated page will not exceed the address given by **max**. **Return** status codeh](j>)}(h**Parameters**h]jl)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKHhjubj)}(hhh](j)}(h;``unsigned long size`` minimum number of bytes to allocate h](j)}(h``unsigned long size``h]j)}(hjh]hunsigned long size}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKEhjubj)}(hhh]j>)}(h#minimum number of bytes to allocateh]h#minimum number of bytes to allocate}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj/hKEhj0ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj/hKEhjubj)}(h``unsigned long *addr`` On return the address of the first allocated page. The first allocated page has alignment EFI_ALLOC_ALIGN which is an architecture dependent multiple of the page size. h](j)}(h``unsigned long *addr``h]j)}(hjSh]hunsigned long *addr}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjQubah}(h]h ]h"]h$]h&]uh1jhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKHhjMubj)}(hhh]j>)}(hOn return the address of the first allocated page. The first allocated page has alignment EFI_ALLOC_ALIGN which is an architecture dependent multiple of the page size.h]hOn return the address of the first allocated page. The first allocated page has alignment EFI_ALLOC_ALIGN which is an architecture dependent multiple of the page size.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKFhjiubah}(h]h ]h"]h$]h&]uh1jhjMubeh}(h]h ]h"]h$]h&]uh1jhjhhKHhjubj)}(hW``unsigned long max`` the address that the last allocated memory page shall not exceed h](j)}(h``unsigned long max``h]j)}(hjh]hunsigned long max}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKJhjubj)}(hhh]j>)}(h@the address that the last allocated memory page shall not exceedh]h@the address that the last allocated memory page shall not exceed}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKIhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKJhjubeh}(h]h ]h"]h$]h&]uh1jhjubj>)}(h**Description**h]jl)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKLhjubj>)}(hAllocate pages as EFI_LOADER_DATA. The allocated pages are aligned according to EFI_ALLOC_ALIGN. The last allocated page will not exceed the address given by **max**.h](hAllocate pages as EFI_LOADER_DATA. The allocated pages are aligned according to EFI_ALLOC_ALIGN. The last allocated page will not exceed the address given by }(hjhhhNhNubjl)}(h**max**h]hmax}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKKhjubj>)}(h **Return**h]jl)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKOhjubj>)}(h status codeh]h status code}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKPhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jahhhhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hefi_free (C function) c.efi_freehNtauh1hhhhhhNhNubh)}(hhh](h)}(h6void efi_free (unsigned long size, unsigned long addr)h]h)}(h5void efi_free(unsigned long size, unsigned long addr)h](j)}(hvoidh]hvoid}(hjGhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjChhhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKkubj.)}(h h]h }(hjVhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjChhhjUhKkubj?)}(hefi_freeh]j)}(hefi_freeh]hefi_free}(hjhhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjdubah}(h]h ](jTjUeh"]h$]h&]hhuh1j>hjChhhjUhKkubjZ)}(h((unsigned long size, unsigned long addr)h](j`)}(hunsigned long sizeh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hsizeh]hsize}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj|ubj`)}(hunsigned long addrh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hlongh]hlong}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(haddrh]haddr}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj|ubeh}(h]h ]h"]h$]h&]hhuh1jYhjChhhjUhKkubeh}(h]h ]h"]h$]h&]hhj*uh1hj+j,hj?hhhjUhKkubah}(h]j:ah ](j0j1eh"]h$]h&]j5j6)j7huh1hhjUhKkhj<hhubj9)}(hhh]j>)}(hfree memory pagesh]hfree memory pages}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKkhj4hhubah}(h]h ]h"]h$]h&]uh1j8hj<hhhjUhKkubeh}(h]h ](jfunctioneh"]h$]h&]j[jj\jOj]jOj^j_j`uh1hhhhhhNhNubjb)}(hX**Parameters** ``unsigned long size`` size of the memory area to free in bytes ``unsigned long addr`` start of the memory area to free (must be EFI_PAGE_SIZE aligned) **Description** **size** is rounded up to a multiple of EFI_ALLOC_ALIGN which is an architecture specific multiple of EFI_PAGE_SIZE. So this function should only be used to return pages allocated with efi_allocate_pages() or efi_low_alloc_above().h](j>)}(h**Parameters**h]jl)}(hjYh]h Parameters}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjWubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKohjSubj)}(hhh](j)}(h@``unsigned long size`` size of the memory area to free in bytes h](j)}(h``unsigned long size``h]j)}(hjxh]hunsigned long size}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubah}(h]h ]h"]h$]h&]uh1jhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKlhjrubj)}(hhh]j>)}(h(size of the memory area to free in bytesh]h(size of the memory area to free in bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjhKlhjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jhjhKlhjoubj)}(hX``unsigned long addr`` start of the memory area to free (must be EFI_PAGE_SIZE aligned) h](j)}(h``unsigned long addr``h]j)}(hjh]hunsigned long addr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKnhjubj)}(hhh]j>)}(h@start of the memory area to free (must be EFI_PAGE_SIZE aligned)h]h@start of the memory area to free (must be EFI_PAGE_SIZE aligned)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKmhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKnhjoubeh}(h]h ]h"]h$]h&]uh1jhjSubj>)}(h**Description**h]jl)}(hjh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKphjSubj>)}(h**size** is rounded up to a multiple of EFI_ALLOC_ALIGN which is an architecture specific multiple of EFI_PAGE_SIZE. So this function should only be used to return pages allocated with efi_allocate_pages() or efi_low_alloc_above().h](jl)}(h**size**h]hsize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubh is rounded up to a multiple of EFI_ALLOC_ALIGN which is an architecture specific multiple of EFI_PAGE_SIZE. So this function should only be used to return pages allocated with efi_allocate_pages() or efi_low_alloc_above().}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j=hp/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:10: ./drivers/firmware/efi/libstub/mem.chKohjSubeh}(h]h ] kernelindentah"]h$]h&]uh1jahhhhhNhNubeh}(h]uefi-stub-library-functionsah ]h"]uefi stub library functionsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h2UEFI Common Platform Error Record (CPER) functionsh]h2UEFI Common Platform Error Record (CPER) functions}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhKubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hcper_print_bits (C function)c.cper_print_bitshNtauh1hhj/hhhNhNubh)}(hhh](h)}(hlvoid cper_print_bits (const char *pfx, unsigned int bits, const char * const strs[], unsigned int strs_size)h]h)}(hjvoid cper_print_bits(const char *pfx, unsigned int bits, const char *const strs[], unsigned int strs_size)h](j)}(hvoidh]hvoid}(hjYhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjUhhhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKJubj.)}(h h]h }(hjhhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjUhhhjghKJubj?)}(hcper_print_bitsh]j)}(hcper_print_bitsh]hcper_print_bits}(hjzhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjvubah}(h]h ](jTjUeh"]h$]h&]hhuh1j>hjUhhhjghKJubjZ)}(hV(const char *pfx, unsigned int bits, const char *const strs[], unsigned int strs_size)h](j`)}(hconst char *pfxh](jf)}(hconsth]hconst}(hjhhhNhNubah}(h]h ]jrah"]h$]h&]uh1jehjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hjhhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hjh]h*}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj)}(hpfxh]hpfx}(hjhhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hjubj`)}(hunsigned int bitsh](j)}(hunsignedh]hunsigned}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjubj)}(hbitsh]hbits}(hj, hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hjubj`)}(hconst char *const strs[]h](jf)}(hjh]hconst}(hjE hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jehjA ubj.)}(h h]h }(hjR hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjA ubj)}(hcharh]hchar}(hj` hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA ubj.)}(h h]h }(hjn hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjA ubj)}(hjh]h*}(hj| hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA ubjf)}(hjh]hconst}(hj hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jehjA ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjA ubj)}(hstrsh]hstrs}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjA ubj)}(h[h]h[}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA ubj)}(h]h]h]}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjA ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hjubj`)}(hunsigned int strs_sizeh](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj ubj)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj ubj)}(h strs_sizeh]h strs_size}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hjubeh}(h]h ]h"]h$]h&]hhuh1jYhjUhhhjghKJubeh}(h]h ]h"]h$]h&]hhj*uh1hj+j,hjQhhhjghKJubah}(h]jLah ](j0j1eh"]h$]h&]j5j6)j7huh1hhjghKJhjNhhubj9)}(hhh]j>)}(hprint strings for set bitsh]hprint strings for set bits}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKJhj8 hhubah}(h]h ]h"]h$]h&]uh1j8hjNhhhjghKJubeh}(h]h ](jfunctioneh"]h$]h&]j[jj\jS j]jS j^j_j`uh1hhhhj/hNhNubjb)}(hX**Parameters** ``const char *pfx`` prefix for each line, including log level and prefix string ``unsigned int bits`` bit mask ``const char * const strs[]`` string array, indexed by bit position ``unsigned int strs_size`` size of the string array: **strs** **Description** For each set bit in **bits**, print the corresponding string in **strs**. If the output length is longer than 80, multiple line will be printed, with **pfx** is printed at the beginning of each line.h](j>)}(h**Parameters**h]jl)}(hj] h]h Parameters}(hj_ hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhj[ ubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKNhjW ubj)}(hhh](j)}(hP``const char *pfx`` prefix for each line, including log level and prefix string h](j)}(h``const char *pfx``h]j)}(hj| h]hconst char *pfx}(hj~ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjz ubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKKhjv ubj)}(hhh]j>)}(h;prefix for each line, including log level and prefix stringh]h;prefix for each line, including log level and prefix string}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj hKKhj ubah}(h]h ]h"]h$]h&]uh1jhjv ubeh}(h]h ]h"]h$]h&]uh1jhj hKKhjs ubj)}(h``unsigned int bits`` bit mask h](j)}(h``unsigned int bits``h]j)}(hj h]hunsigned int bits}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKLhj ubj)}(hhh]j>)}(hbit maskh]hbit mask}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj hKLhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKLhjs ubj)}(hD``const char * const strs[]`` string array, indexed by bit position h](j)}(h``const char * const strs[]``h]j)}(hj h]hconst char * const strs[]}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKMhj ubj)}(hhh]j>)}(h%string array, indexed by bit positionh]h%string array, indexed by bit position}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj hKMhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj hKMhjs ubj)}(h>``unsigned int strs_size`` size of the string array: **strs** h](j)}(h``unsigned int strs_size``h]j)}(hj' h]hunsigned int strs_size}(hj) hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj% ubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKNhj! ubj)}(hhh]j>)}(h"size of the string array: **strs**h](hsize of the string array: }(hj@ hhhNhNubjl)}(h**strs**h]hstrs}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhj@ ubeh}(h]h ]h"]h$]h&]uh1j=hj< hKNhj= ubah}(h]h ]h"]h$]h&]uh1jhj! ubeh}(h]h ]h"]h$]h&]uh1jhj< hKNhjs ubeh}(h]h ]h"]h$]h&]uh1jhjW ubj>)}(h**Description**h]jl)}(hjp h]h Description}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjn ubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKPhjW ubj>)}(hFor each set bit in **bits**, print the corresponding string in **strs**. If the output length is longer than 80, multiple line will be printed, with **pfx** is printed at the beginning of each line.h](hFor each set bit in }(hj hhhNhNubjl)}(h**bits**h]hbits}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhj ubh$, print the corresponding string in }(hj hhhNhNubjl)}(h**strs**h]hstrs}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhj ubhN. If the output length is longer than 80, multiple line will be printed, with }(hj hhhNhNubjl)}(h**pfx**h]hpfx}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhj ubh* is printed at the beginning of each line.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKOhjW ubeh}(h]h ] kernelindentah"]h$]h&]uh1jahj/hhhNhNubh)}(hhh]h}(h]h ]h"]h$]h&]entries](hcper_bits_to_str (C function)c.cper_bits_to_strhNtauh1hhj/hhhNhNubh)}(hhh](h)}(huint cper_bits_to_str (char *buf, int buf_size, unsigned long bits, const char * const strs[], unsigned int strs_size)h]h)}(hsint cper_bits_to_str(char *buf, int buf_size, unsigned long bits, const char *const strs[], unsigned int strs_size)h](j)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj hhhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKoubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj hhhj hKoubj?)}(hcper_bits_to_strh]j)}(hcper_bits_to_strh]hcper_bits_to_str}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj ubah}(h]h ](jTjUeh"]h$]h&]hhuh1j>hj hhhj hKoubjZ)}(h_(char *buf, int buf_size, unsigned long bits, const char *const strs[], unsigned int strs_size)h](j`)}(h char *bufh](j)}(hcharh]hchar}(hj( hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ ubj.)}(h h]h }(hj6 hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj$ ubj)}(hjh]h*}(hjD hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj$ ubj)}(hbufh]hbuf}(hjQ hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj$ ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj ubj`)}(h int buf_sizeh](j)}(hinth]hint}(hjj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjf ubj.)}(h h]h }(hjx hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hjf ubj)}(hbuf_sizeh]hbuf_size}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhjf ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj ubj`)}(hunsigned long bitsh](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj ubj)}(hlongh]hlong}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj ubj)}(hbitsh]hbits}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj ubj`)}(hconst char *const strs[]h](jf)}(hjh]hconst}(hj hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jehj ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj ubj)}(hcharh]hchar}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj ubj)}(hjh]h*}(hj' hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubjf)}(hjh]hconst}(hj4 hhhNhNubah}(h]h ]jrah"]h$]h&]uh1jehj ubj.)}(h h]h }(hjA hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj ubj)}(hstrsh]hstrs}(hjO hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj ubj)}(hj h]h[}(hj] hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubj)}(hj h]h]}(hjj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj ubj`)}(hunsigned int strs_sizeh](j)}(hunsignedh]hunsigned}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj~ ubj)}(hinth]hint}(hj hhhNhNubah}(h]h ]jah"]h$]h&]uh1jhj~ ubj.)}(h h]h }(hj hhhNhNubah}(h]h ]j:ah"]h$]h&]uh1j-hj~ ubj)}(h strs_sizeh]h strs_size}(hj hhhNhNubah}(h]h ]j ah"]h$]h&]uh1hhj~ ubeh}(h]h ]h"]h$]h&]noemphhhuh1j_hj ubeh}(h]h ]h"]h$]h&]hhuh1jYhj hhhj hKoubeh}(h]h ]h"]h$]h&]hhj*uh1hj+j,hj hhhj hKoubah}(h]j ah ](j0j1eh"]h$]h&]j5j6)j7huh1hhj hKohj hhubj9)}(hhh]j>)}(hreturn a string for set bitsh]hreturn a string for set bits}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKohj hhubah}(h]h ]h"]h$]h&]uh1j8hj hhhj hKoubeh}(h]h ](jfunctioneh"]h$]h&]j[jj\j j]j j^j_j`uh1hhhhj/hNhNubjb)}(hX**Parameters** ``char *buf`` buffer to store the output string ``int buf_size`` size of the output string buffer ``unsigned long bits`` bit mask ``const char * const strs[]`` string array, indexed by bit position ``unsigned int strs_size`` size of the string array: **strs** **Description** Add to **buf** the bitmask in hexadecimal. Then, for each set bit in **bits**, add the corresponding string describing the bit in **strs** to **buf**. A typical example is:: const char * const bits[] = { "bit 3 name", "bit 4 name", "bit 5 name", }; char str[120]; unsigned int bitmask = BIT(3) | BIT(5); #define MASK GENMASK(5,3) cper_bits_to_str(str, sizeof(str), FIELD_GET(MASK, bitmask), bits, ARRAY_SIZE(bits)); The above code fills the string ``str`` with ``bit 3 name|bit 5 name``. **Return** number of bytes stored or an error code if lower than zero.h](j>)}(h**Parameters**h]jl)}(hjh]h Parameters}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKshjubj)}(hhh](j)}(h0``char *buf`` buffer to store the output string h](j)}(h ``char *buf``h]j)}(hj%h]h char *buf}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKphjubj)}(hhh]j>)}(h!buffer to store the output stringh]h!buffer to store the output string}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hj:hKphj;ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj:hKphjubj)}(h2``int buf_size`` size of the output string buffer h](j)}(h``int buf_size``h]j)}(hj^h]h int buf_size}(hj`hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj\ubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKqhjXubj)}(hhh]j>)}(h size of the output string bufferh]h size of the output string buffer}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjshKqhjtubah}(h]h ]h"]h$]h&]uh1jhjXubeh}(h]h ]h"]h$]h&]uh1jhjshKqhjubj)}(h ``unsigned long bits`` bit mask h](j)}(h``unsigned long bits``h]j)}(hjh]hunsigned long bits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKrhjubj)}(hhh]j>)}(hbit maskh]hbit mask}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjhKrhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKrhjubj)}(hD``const char * const strs[]`` string array, indexed by bit position h](j)}(h``const char * const strs[]``h]j)}(hjh]hconst char * const strs[]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKshjubj)}(hhh]j>)}(h%string array, indexed by bit positionh]h%string array, indexed by bit position}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hjhKshjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKshjubj)}(h>``unsigned int strs_size`` size of the string array: **strs** h](j)}(h``unsigned int strs_size``h]j)}(hj h]hunsigned int strs_size}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKthjubj)}(hhh]j>)}(h"size of the string array: **strs**h](hsize of the string array: }(hj"hhhNhNubjl)}(h**strs**h]hstrs}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jkhj"ubeh}(h]h ]h"]h$]h&]uh1j=hjhKthjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjhKthjubeh}(h]h ]h"]h$]h&]uh1jhjubj>)}(h**Description**h]jl)}(hjRh]h Description}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjPubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKvhjubj>)}(hAdd to **buf** the bitmask in hexadecimal. Then, for each set bit in **bits**, add the corresponding string describing the bit in **strs** to **buf**.h](hAdd to }(hjhhhhNhNubjl)}(h**buf**h]hbuf}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjhubh7 the bitmask in hexadecimal. Then, for each set bit in }(hjhhhhNhNubjl)}(h**bits**h]hbits}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjhubh5, add the corresponding string describing the bit in }(hjhhhhNhNubjl)}(h**strs**h]hstrs}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjhubh to }(hjhhhhNhNubjl)}(h**buf**h]hbuf}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjhubh.}(hjhhhhNhNubeh}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKuhjubj>)}(hA typical example is::h]hA typical example is:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKxhjubh literal_block)}(hXconst char * const bits[] = { "bit 3 name", "bit 4 name", "bit 5 name", }; char str[120]; unsigned int bitmask = BIT(3) | BIT(5); #define MASK GENMASK(5,3) cper_bits_to_str(str, sizeof(str), FIELD_GET(MASK, bitmask), bits, ARRAY_SIZE(bits));h]hXconst char * const bits[] = { "bit 3 name", "bit 4 name", "bit 5 name", }; char str[120]; unsigned int bitmask = BIT(3) | BIT(5); #define MASK GENMASK(5,3) cper_bits_to_str(str, sizeof(str), FIELD_GET(MASK, bitmask), bits, ARRAY_SIZE(bits));}hjsbah}(h]h ]h"]h$]h&]hhuh1jhi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKzhjubj>)}(hGThe above code fills the string ``str`` with ``bit 3 name|bit 5 name``.h](h The above code fills the string }(hjhhhNhNubj)}(h``str``h]hstr}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh with }(hjhhhNhNubj)}(h``bit 3 name|bit 5 name``h]hbit 3 name|bit 5 name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKhjubj>)}(h **Return**h]jl)}(hjh]hReturn}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jkhjubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKhjubj>)}(h;number of bytes stored or an error code if lower than zero.h]h;number of bytes stored or an error code if lower than zero.}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1j=hi/var/lib/git/docbuild/linux/Documentation/driver-api/firmware/efi/index:16: ./drivers/firmware/efi/cper.chKhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jahj/hhhNhNubeh}(h]0uefi-common-platform-error-record-cper-functionsah ]h"]2uefi common platform error record (cper) functionsah$]h&]uh1hhhhhhhhKubeh}(h]2unified-extensible-firmware-interface-uefi-supportah ]h"]4unified extensible firmware interface (uefi) supportah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_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_handlerjserror_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}(jMjJj,j)jEjBu nametypes}(jMj,jEuh}(jJhj)hhhjijnj:j?jBj/jLjQj j u 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.