Merge remote-tracking branch 'kwolf/for-anthony' into staging
[qemu-kvm.git] / hw / xtensa_bootparam.h
blob38ef32bdb6e006a577893f7b0117afac337f804c
1 #ifndef HW_XTENSA_BOOTPARAM
2 #define HW_XTENSA_BOOTPARAM
4 typedef struct BpTag {
5 uint16_t tag;
6 uint16_t size;
7 } BpTag;
9 static inline ram_addr_t put_tag(ram_addr_t addr, uint16_t tag,
10 size_t size, const void *data)
12 BpTag bp_tag = {
13 .tag = tswap16(tag),
14 .size = tswap16((size + 3) & ~3),
17 cpu_physical_memory_write(addr, &bp_tag, sizeof(bp_tag));
18 addr += sizeof(bp_tag);
19 cpu_physical_memory_write(addr, data, size);
20 addr += (size + 3) & ~3;
22 return addr;
25 #endif