summaryrefslogtreecommitdiff
path: root/hw/xtensa
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-03-18 17:36:02 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-04-08 18:13:16 +0200
commit47b43a1f414c5b3eb9eb7502d0b0be0d134259ba (patch)
tree9acfd03f458083a077ac79bd462d5360916f445f /hw/xtensa
parent8d8b636d28a97af7bf43c3267d07f87b9530939a (diff)
downloadqemu-47b43a1f414c5b3eb9eb7502d0b0be0d134259ba.tar.gz
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can be kept in hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/xtensa')
-rw-r--r--hw/xtensa/xtensa_bootparam.h25
-rw-r--r--hw/xtensa/xtensa_lx60.c2
2 files changed, 26 insertions, 1 deletions
diff --git a/hw/xtensa/xtensa_bootparam.h b/hw/xtensa/xtensa_bootparam.h
new file mode 100644
index 0000000000..38ef32bdb6
--- /dev/null
+++ b/hw/xtensa/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
diff --git a/hw/xtensa/xtensa_lx60.c b/hw/xtensa/xtensa_lx60.c
index 5695897b23..2682eda2ad 100644
--- a/hw/xtensa/xtensa_lx60.c
+++ b/hw/xtensa/xtensa_lx60.c
@@ -37,7 +37,7 @@
#include "hw/block/flash.h"
#include "sysemu/blockdev.h"
#include "char/char.h"
-#include "hw/xtensa_bootparam.h"
+#include "xtensa_bootparam.h"
typedef struct LxBoardDesc {
size_t flash_size;