<trclass="memdesc:a00356"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Memory region definition. <ahref="a00034.html#a00356">More...</a><br/></td></tr>
<trclass="memdesc:a00355"><tdclass="mdescLeft"> </td><tdclass="mdescRight">User-provided options passed into <aclass="el"href="a00034.html#ga5f9b4a7f5766e62a6352d9c36a929465"title="Initialize ROM API for a given operation. ">kb_init()</a>. <ahref="a00034.html#a00355">More...</a><br/></td></tr>
<trclass="memdesc:a00365"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Interface to memory operations for one region of memory. <ahref="a00034.html#a00365">More...</a><br/></td></tr>
<trclass="memdesc:a00364"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Structure of a memory map entry. <ahref="a00034.html#a00364">More...</a><br/></td></tr>
<trclass="memdesc:ga2f6872bd7834242f19fe55d3006756fd"><tdclass="mdescLeft"> </td><tdclass="mdescRight">ROM API status group number. <br/></td></tr>
<trclass="memdesc:gaf3d735bece2ebc5268e4c5453257ed1f"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Details of the operation to be performed by the ROM. <ahref="#gaf3d735bece2ebc5268e4c5453257ed1f">More...</a><br/></td></tr>
<trclass="memdesc:gaf136d8a683a753cabb3f5e67e394373e"><tdclass="mdescLeft"> </td><tdclass="mdescRight">User-provided options passed into <aclass="el"href="a00034.html#ga5f9b4a7f5766e62a6352d9c36a929465"title="Initialize ROM API for a given operation. ">kb_init()</a>. <ahref="#gaf136d8a683a753cabb3f5e67e394373e">More...</a><br/></td></tr>
<trclass="memdesc:ga3fa7251fa69dc7a652e86541d8414f3d"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Interface to memory operations for one region of memory. <br/></td></tr>
<trclass="memdesc:ga203b35c02c0cf762ffbb8783d35be7aa"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Structure of a memory map entry. <br/></td></tr>
<trclass="memdesc:gaaf105ae5beaca1dee30ae54530691fce"><tdclass="mdescLeft"> </td><tdclass="mdescRight">ROM API status codes. <ahref="a00034.html#gaaf105ae5beaca1dee30ae54530691fce">More...</a><br/></td></tr>
<trclass="memdesc:ga4580cee4f95179434414d5c959d4891a"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Details of the operation to be performed by the ROM. <ahref="a00034.html#ga4580cee4f95179434414d5c959d4891a">More...</a><br/></td></tr>
<trclass="memdesc:ga5f9b4a7f5766e62a6352d9c36a929465"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Initialize ROM API for a given operation. <ahref="#ga5f9b4a7f5766e62a6352d9c36a929465">More...</a><br/></td></tr>
<trclass="memdesc:ga7ecd834f6e019fb55cdcb80176c590e7"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Cleans up the ROM API context. <ahref="#ga7ecd834f6e019fb55cdcb80176c590e7">More...</a><br/></td></tr>
<trclass="memdesc:ga589fc0e337a92696431dea7ea91c1fd8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Perform the operation configured during init. <ahref="#ga589fc0e337a92696431dea7ea91c1fd8">More...</a><br/></td></tr>
<divclass="textblock"><p>The buffer field is a pointer to memory provided by the caller for use by Kboot during execution of the operation. Minimum size is the size of each certificate in the chain plus 432 bytes additional per certificate.</p>
<p>The profile field is a mask that specifies which features are required in the SB file or image being processed. This includes the minimum AES and RSA key sizes. See the _kb_security_profile enum for profile mask constants. The image being loaded or authenticated must match the profile or an error will be returned.</p>
<p>minBuildNumber is an optional field that can be used to prevent version rollback. The API will check the build number of the image, and if it is less than minBuildNumber will fail with an error.</p>
<p>maxImageLength is used to verify the offsetToCertificateBlockHeaderInBytes value at the beginning of a signed image. It should be set to the length of the SB file. If verifying an image in flash, it can be set to the internal flash size or a large number like 0x10000000.</p>
<p>userRHK can optionally be used by the user to override the RHK in IFR. If userRHK is not NULL, it points to a 32-byte array containing the SHA-256 of the root certificate's RSA public key.</p>
<p>The regions field points to an array of memory regions that the SB file being loaded is allowed to access. If regions is NULL, then all memory is accessible by the SB file. This feature is required to prevent a malicious image from erasing good code or RAM contents while it is being loaded, only for us to find that the image is inauthentic when we hit the end of the section.</p>
<p>overrideSBBootSectionID lets the caller override the default section of the SB file that is processed during a kKbootLoadSB operation. By default, the section specified in the firstBootableSectionID field of the SB header is loaded. If overrideSBBootSectionID is non-zero, then the section with the given ID will be loaded instead.</p>
<p>The userSBKEK field lets a user provide their own AES-256 key for unwrapping keys in an SB file during the kKbootLoadSB operation. userSBKEK should point to a 32-byte AES-256 key. If userSBKEK is NULL then the IFR SBKEK will be used. After <aclass="el"href="a00034.html#ga5f9b4a7f5766e62a6352d9c36a929465"title="Initialize ROM API for a given operation. ">kb_init()</a> returns, the caller should zero out the data pointed to by userSBKEK, as the API will have installed the key in the CAU3. </p>
<p>The <aclass="el"href="a00034.html#gga4580cee4f95179434414d5c959d4891aae426f3ed5a9db291df99023ebe7f7929"title="Authenticate a signed image. ">kRomAuthenticateImage</a> operation requires the entire signed image to be available to the application. </p>
<p>The buffer field is a pointer to memory provided by the caller for use by Kboot during execution of the operation. Minimum size is the size of each certificate in the chain plus 432 bytes additional per certificate.</p>
<p>The profile field is a mask that specifies which features are required in the SB file or image being processed. This includes the minimum AES and RSA key sizes. See the _kb_security_profile enum for profile mask constants. The image being loaded or authenticated must match the profile or an error will be returned.</p>
<p>minBuildNumber is an optional field that can be used to prevent version rollback. The API will check the build number of the image, and if it is less than minBuildNumber will fail with an error.</p>
<p>maxImageLength is used to verify the offsetToCertificateBlockHeaderInBytes value at the beginning of a signed image. It should be set to the length of the SB file. If verifying an image in flash, it can be set to the internal flash size or a large number like 0x10000000.</p>
<p>userRHK can optionally be used by the user to override the RHK in IFR. If userRHK is not NULL, it points to a 32-byte array containing the SHA-256 of the root certificate's RSA public key.</p>
<p>The regions field points to an array of memory regions that the SB file being loaded is allowed to access. If regions is NULL, then all memory is accessible by the SB file. This feature is required to prevent a malicious image from erasing good code or RAM contents while it is being loaded, only for us to find that the image is inauthentic when we hit the end of the section.</p>
<p>overrideSBBootSectionID lets the caller override the default section of the SB file that is processed during a kKbootLoadSB operation. By default, the section specified in the firstBootableSectionID field of the SB header is loaded. If overrideSBBootSectionID is non-zero, then the section with the given ID will be loaded instead.</p>
<p>The userSBKEK field lets a user provide their own AES-256 key for unwrapping keys in an SB file during the kKbootLoadSB operation. userSBKEK should point to a 32-byte AES-256 key. If userSBKEK is NULL then the IFR SBKEK will be used. After <aclass="el"href="a00034.html#ga5f9b4a7f5766e62a6352d9c36a929465"title="Initialize ROM API for a given operation. ">kb_init()</a> returns, the caller should zero out the data pointed to by userSBKEK, as the API will have installed the key in the CAU3. </p>
<p>The <aclass="el"href="a00034.html#gga4580cee4f95179434414d5c959d4891aae426f3ed5a9db291df99023ebe7f7929"title="Authenticate a signed image. ">kRomAuthenticateImage</a> operation requires the entire signed image to be available to the application. </p>
<p>Inits the ROM API based on the options provided by the application in the second argument. Every call to rom_init() should be paired with a call to rom_deinit().</p>
<tr><tdclass="paramname"><aclass="el"href="a00242.html#ggadf764cbdea00d65edcd07bb9953ad2b7a829bee76c6b02225d9c891ae8ef70881"title="Generic status for Success. ">kStatus_Success</a></td><td>API was executed successfully. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00242.html#ggadf764cbdea00d65edcd07bb9953ad2b7a9743ab3bec5065667c0b12510317e76c"title="Generic status for invalid argument check. ">kStatus_InvalidArgument</a></td><td>An invalid argument is provided. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00034.html#ggaaf105ae5beaca1dee30ae54530691fcea2d917ef1b351dc5d62d01b2bd83e7d7f"title="The user buffer is not enough for use by Kboot during execution of the operation. ...">kStatus_RomApiBufferSizeNotEnough</a></td><td>The user buffer is not enough for use by Kboot during execution of the operation. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00034.html#ggaaf105ae5beaca1dee30ae54530691fcea9b8ea7f097f5ac77e15187e0862916f7"title="The user buffer is not ok for sbloader or authentication. ">kStatus_RomApiInvalidBuffer</a></td><td>The user buffer is not ok for sbloader or authentication. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00263.html#gga6bfd6dd9281cf1736444d3d68194fe89a905a486e12679a5223f9824de2fa272d"title="PRINCE Fail. ">kStatus_SKBOOT_Fail</a></td><td>Return the failed status of secure boot. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00263.html#gga6bfd6dd9281cf1736444d3d68194fe89a7ca4bc728877b1f6c23e7dcbfa3ccf91"title="PRINCE Invalid marker. ">kStatus_SKBOOT_KeyStoreMarkerInvalid</a></td><td>The key code for the particular PRINCE region is not present in the keystore </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00263.html#gga6bfd6dd9281cf1736444d3d68194fe89a9f0ca718735dd60c0f6e2e103615f9bc"title="PRINCE Success. ">kStatus_SKBOOT_Success</a></td><td>Return the successful status of secure boot. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00242.html#ggadf764cbdea00d65edcd07bb9953ad2b7a829bee76c6b02225d9c891ae8ef70881"title="Generic status for Success. ">kStatus_Success</a></td><td>API was executed successfully </td></tr>
<p>This application must call this API repeatedly, passing in sequential chunks of data from the boot image (SB file) that is to be processed. The ROM will perform the selected operation on this data and return. The application may call this function with as much or as little data as it wishes, which can be used to select the granularity of time given to the application in between executing the operation.</p>
<tr><tdclass="paramname"><aclass="el"href="a00242.html#ggadf764cbdea00d65edcd07bb9953ad2b7a829bee76c6b02225d9c891ae8ef70881"title="Generic status for Success. ">kStatus_Success</a></td><td>ROM successfully process the part of sb file/boot image. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00034.html#ggaaf105ae5beaca1dee30ae54530691fcea343daee358f4d733cce97d0f10093a59"title="ROM successfully process the whole sb file/boot image. ">kStatus_RomApiExecuteCompleted</a></td><td>ROM successfully process the whole sb file/boot image. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00242.html#ggadf764cbdea00d65edcd07bb9953ad2b7a8692e71089c7e81bd5f4503ff55035db"title="Generic status for Fail. ">kStatus_Fail</a></td><td>An error occurred while executing the operation. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00034.html#ggaaf105ae5beaca1dee30ae54530691fcea1e6d2a8f8fe94cc1b0f0b575154bb232"title="ROM needs more data to continue processing the boot image. ">kStatus_RomApiNeedMoreData</a></td><td>No error occurred, but the ROM needs more data to continue processing the boot image. </td></tr>
<tr><tdclass="paramname"><aclass="el"href="a00034.html#ggaaf105ae5beaca1dee30ae54530691fcea2d917ef1b351dc5d62d01b2bd83e7d7f"title="The user buffer is not enough for use by Kboot during execution of the operation. ...">kStatus_RomApiBufferSizeNotEnough</a></td><td>user buffer is not enough for use by Kboot during execution of the operation. </td></tr>