aboutsummaryrefslogtreecommitdiff
path: root/hw/xtensa/bootparam.h
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-06-21 13:10:38 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-06-29 02:32:42 +0400
commita9a28591fbd4dc20d19b6408361b45c9b7300434 (patch)
tree7c734a7912988a20f315ab557eeb568c6a81b9e4 /hw/xtensa/bootparam.h
parent62dbaede80b396aaae5394a9b6922b51be835e86 (diff)
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 <jcmvbkbc@gmail.com>
Diffstat (limited to 'hw/xtensa/bootparam.h')
-rw-r--r--hw/xtensa/bootparam.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/xtensa/bootparam.h b/hw/xtensa/bootparam.h
index e6cf3b1492..e839bee576 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)
{