summary refs log tree commit diff stats
path: root/include/hw/elf_ops.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-01-30 14:18:45 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-01-30 14:18:45 +0000
commit204aa60b37c23a89e690d418f49787d274303ca7 (patch)
tree902d059da93888c408d17ede0d92a1038cd4ff67 /include/hw/elf_ops.h
parenta09a2b5a4d85d4bf2f04b0e503d7dd7905967148 (diff)
parent99029be1c2875cd857614397674bbf563ddb6f91 (diff)
downloadfocaccia-qemu-204aa60b37c23a89e690d418f49787d274303ca7.tar.gz
focaccia-qemu-204aa60b37c23a89e690d418f49787d274303ca7.zip
Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jan-29-2020' into staging
MIPS queue for January 29th, 2020

# gpg: Signature made Wed 29 Jan 2020 18:29:43 GMT
# gpg:                using RSA key D4972A8967F75A65
# gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>" [full]
# Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65

* remotes/amarkovic/tags/mips-queue-jan-29-2020:
  target/mips: Add implementation of GINVT instruction
  target/mips: Amend CP0 WatchHi register implementation
  hw/core/loader: Let load_elf() populate a field with CPU-specific flags
  target/mips: semihosting: Remove 'uhi_done' label in helper_do_semihosting()
  disas: Add a field for target-dependant data to disassemble_info
  target/mips: Rectify documentation on deprecating MIPS r4k machine

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/elf_ops.h')
-rw-r--r--include/hw/elf_ops.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/hw/elf_ops.h b/include/hw/elf_ops.h
index e07d276df7..a1411bfcab 100644
--- a/include/hw/elf_ops.h
+++ b/include/hw/elf_ops.h
@@ -316,7 +316,8 @@ static int glue(load_elf, SZ)(const char *name, int fd,
                               void *translate_opaque,
                               int must_swab, uint64_t *pentry,
                               uint64_t *lowaddr, uint64_t *highaddr,
-                              int elf_machine, int clear_lsb, int data_swab,
+                              uint32_t *pflags, int elf_machine,
+                              int clear_lsb, int data_swab,
                               AddressSpace *as, bool load_rom,
                               symbol_fn_t sym_cb)
 {
@@ -389,6 +390,9 @@ static int glue(load_elf, SZ)(const char *name, int fd,
             }
     }
 
+    if (pflags) {
+        *pflags = (elf_word)ehdr.e_flags;
+    }
     if (pentry)
         *pentry = (uint64_t)(elf_sword)ehdr.e_entry;