diff options
Diffstat (limited to 'tools/rkcommon.h')
-rw-r--r-- | tools/rkcommon.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/rkcommon.h b/tools/rkcommon.h index b4f6f327dc..3d645168c2 100644 --- a/tools/rkcommon.h +++ b/tools/rkcommon.h @@ -34,6 +34,19 @@ int rkcommon_check_params(struct image_tool_params *params); const char *rkcommon_get_spl_hdr(struct image_tool_params *params); /** + * rkcommon_get_spl_hdr_padto8() - check if we need to pad to 8 bytes + * + * Rockchip's bootrom starts execution right after the SPL header (i.e. + * at offset 4), but we can not reasonably align the test section of + * an AArch64 SPL at 4 bytes (as this would break natural alignment + * and any embedded constants might cause an alignment exception, which + * is illegal in privileged modes). + * + * Padding is (for now) assumed to occur with a single AArch64 'nop'. + */ +const bool rkcommon_get_spl_hdr_padto8(struct image_tool_params *params); + +/** * rkcommon_get_spl_size() - get spl size for a Rockchip boot image * * Different chip may have different sram size. And if we want to jump @@ -77,4 +90,14 @@ bool rkcommon_need_rc4_spl(struct image_tool_params *params); */ void rkcommon_rc4_encode_spl(void *buf, unsigned int offset, unsigned int size); +/** + * rkcommon_vrec_header() - allocate memory for the header + * + * @params: Pointer to the tool params structure + * @tparams: Pointer tot the image type structure (for setting + * the header and header_size) + */ +void rkcommon_vrec_header(struct image_tool_params *params, + struct image_type_params *tparams); + #endif |