diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2011-11-02 20:52:23 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-11-02 20:52:23 +0000 |
commit | 932eacc158c064935c7bab920c88a93a629e1ca4 (patch) | |
tree | 9ef2c78808c180bf937fc1905073ee93ce3b601f /hw/xtensa_bootparam.h | |
parent | c51d9cb5b6e2fde9878d2be23dab389c2882de93 (diff) | |
parent | 556ba6684547f5f0aae60aaa2a16e39e43f9739d (diff) |
Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa
* 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa:
xtensa_lx60: fix build date code and change memory region names
xtensa_lx60: pass kernel arguments from -append
xtensa_lx60: add FLASH support
target-xtensa: raise an exception for invalid and reserved opcodes
target-xtensa: handle cache options in the overlay tool
target-xtensa: mask out undefined bits of WINDOWSTART SR
Diffstat (limited to 'hw/xtensa_bootparam.h')
-rw-r--r-- | hw/xtensa_bootparam.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/hw/xtensa_bootparam.h b/hw/xtensa_bootparam.h new file mode 100644 index 0000000000..38ef32bdb6 --- /dev/null +++ b/hw/xtensa_bootparam.h @@ -0,0 +1,25 @@ +#ifndef HW_XTENSA_BOOTPARAM +#define HW_XTENSA_BOOTPARAM + +typedef struct BpTag { + uint16_t tag; + uint16_t size; +} BpTag; + +static inline ram_addr_t put_tag(ram_addr_t addr, uint16_t tag, + size_t size, const void *data) +{ + BpTag bp_tag = { + .tag = tswap16(tag), + .size = tswap16((size + 3) & ~3), + }; + + cpu_physical_memory_write(addr, &bp_tag, sizeof(bp_tag)); + addr += sizeof(bp_tag); + cpu_physical_memory_write(addr, data, size); + addr += (size + 3) & ~3; + + return addr; +} + +#endif |