From a9a28591fbd4dc20d19b6408361b45c9b7300434 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Sat, 21 Jun 2014 13:10:38 +0400 Subject: hw/xtensa/xtfpga: refactor bootparameters filling Separate filling first/last tag and size calculation from the kernel command line setup. Signed-off-by: Max Filippov --- hw/xtensa/bootparam.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'hw/xtensa/bootparam.h') diff --git a/hw/xtensa/bootparam.h b/hw/xtensa/bootparam.h index e6cf3b1..e839bee 100644 --- a/hw/xtensa/bootparam.h +++ b/hw/xtensa/bootparam.h @@ -16,6 +16,11 @@ typedef struct BpTag { uint16_t size; } BpTag; +static inline size_t get_tag_size(size_t data_size) +{ + return data_size + sizeof(BpTag) + 4; +} + static inline ram_addr_t put_tag(ram_addr_t addr, uint16_t tag, size_t size, const void *data) { -- cgit v1.1