mirror of https://github.com/xemu-project/xemu.git
RISC-V: QEMU 2.13 Minor Fixes
* Require libfdt when configuring for 'riscv*-softmmu' * Increase HTIF priority and allow zero base address -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQR8mZMOsXzYugc9Xvpr8dezV+8+TwUCWvLKRQAKCRBr8dezV+8+ TyOrAKCBiArCoNOD0lIvSdgu8Dv7dKOUaQCeMfS/FkM9wSTOnZgOPKPEZ3xreLY= =wUet -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/riscv/tags/riscv-qemu-2.13-minor-fixes-3' into staging RISC-V: QEMU 2.13 Minor Fixes * Require libfdt when configuring for 'riscv*-softmmu' * Increase HTIF priority and allow zero base address # gpg: Signature made Wed 09 May 2018 11:15:33 BST # gpg: using DSA key 6BF1D7B357EF3E4F # gpg: Good signature from "Michael Clark <michaeljclark@mac.com>" # gpg: aka "Michael Clark <mjc@sifive.com>" # gpg: aka "Michael Clark <michael@metaparadigm.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 7C99 930E B17C D8BA 073D 5EFA 6BF1 D7B3 57EF 3E4F * remotes/riscv/tags/riscv-qemu-2.13-minor-fixes-3: riscv: requires libfdt riscv: htif: increase the priority of the htif subregion riscv: spike: allow base == 0 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
a8a94ef726
|
@ -3761,7 +3761,7 @@ fi
|
||||||
fdt_required=no
|
fdt_required=no
|
||||||
for target in $target_list; do
|
for target in $target_list; do
|
||||||
case $target in
|
case $target in
|
||||||
aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu)
|
aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
|
||||||
fdt_required=yes
|
fdt_required=yes
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -41,17 +41,20 @@
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static uint64_t fromhost_addr, tohost_addr;
|
static uint64_t fromhost_addr, tohost_addr;
|
||||||
|
static int address_symbol_set;
|
||||||
|
|
||||||
void htif_symbol_callback(const char *st_name, int st_info, uint64_t st_value,
|
void htif_symbol_callback(const char *st_name, int st_info, uint64_t st_value,
|
||||||
uint64_t st_size)
|
uint64_t st_size)
|
||||||
{
|
{
|
||||||
if (strcmp("fromhost", st_name) == 0) {
|
if (strcmp("fromhost", st_name) == 0) {
|
||||||
|
address_symbol_set |= 1;
|
||||||
fromhost_addr = st_value;
|
fromhost_addr = st_value;
|
||||||
if (st_size != 8) {
|
if (st_size != 8) {
|
||||||
error_report("HTIF fromhost must be 8 bytes");
|
error_report("HTIF fromhost must be 8 bytes");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
} else if (strcmp("tohost", st_name) == 0) {
|
} else if (strcmp("tohost", st_name) == 0) {
|
||||||
|
address_symbol_set |= 2;
|
||||||
tohost_addr = st_value;
|
tohost_addr = st_value;
|
||||||
if (st_size != 8) {
|
if (st_size != 8) {
|
||||||
error_report("HTIF tohost must be 8 bytes");
|
error_report("HTIF tohost must be 8 bytes");
|
||||||
|
@ -248,10 +251,11 @@ HTIFState *htif_mm_init(MemoryRegion *address_space, MemoryRegion *main_mem,
|
||||||
qemu_chr_fe_init(&s->chr, chr, &error_abort);
|
qemu_chr_fe_init(&s->chr, chr, &error_abort);
|
||||||
qemu_chr_fe_set_handlers(&s->chr, htif_can_recv, htif_recv, htif_event,
|
qemu_chr_fe_set_handlers(&s->chr, htif_can_recv, htif_recv, htif_event,
|
||||||
htif_be_change, s, NULL, true);
|
htif_be_change, s, NULL, true);
|
||||||
if (base) {
|
if (address_symbol_set == 3) {
|
||||||
memory_region_init_io(&s->mmio, NULL, &htif_mm_ops, s,
|
memory_region_init_io(&s->mmio, NULL, &htif_mm_ops, s,
|
||||||
TYPE_HTIF_UART, size);
|
TYPE_HTIF_UART, size);
|
||||||
memory_region_add_subregion(address_space, base, &s->mmio);
|
memory_region_add_subregion_overlap(address_space, base,
|
||||||
|
&s->mmio, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
|
Loading…
Reference in New Issue