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>
This commit is contained in:
Max Filippov 2014-06-21 13:10:38 +04:00
parent 62dbaede80
commit a9a28591fb
2 changed files with 22 additions and 13 deletions

View file

@ -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)
{