summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-02-15 16:36:40 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-02-15 16:36:40 +0000
commit078a1c37cad0d11d93ff8102f7653ce6109bb62d (patch)
tree51da43cbb304e6d8476aae5ba2db2b237e4821b9 /hw
parent44e3a39f30377e96f6a1f3a21f6b1c8b40b28baf (diff)
parent88c1ee73d3231c74ff90bcfc084a7589670ec244 (diff)
downloadqemu-078a1c37cad0d11d93ff8102f7653ce6109bb62d.tar.gz
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-15' into staging
trivial patches for 2014-02-15 # gpg: Signature made Sat 15 Feb 2014 12:10:46 GMT using RSA key ID 74F0C838 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # 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: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: E190 8639 3B10 B51B AC2C 8B73 5253 C5AD 74F0 C838 * remotes/mjt/tags/trivial-patches-2014-02-15: char/serial: Fix emptyness check gitignore: anchor all ignored names vl: trim includes vl: remove old, long-unused defines net: declare struct iovec in checksum.h to fix compiler warning linux-user: refactor do_socketcall() configure: add hints to a remedy for feature_not_found errors configure: add hint of libfdt to DTC dependency not found message sparc/leon3: Initialize stack pointer misc: Fix case Qemu -> QEMU Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/char/serial.c2
-rw-r--r--hw/sparc/leon3.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/hw/char/serial.c b/hw/char/serial.c
index 27dab7d9d6..6d3b5aff8b 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -225,7 +225,7 @@ static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
if (s->tsr_retry <= 0) {
if (s->fcr & UART_FCR_FE) {
- s->tsr = fifo8_is_full(&s->xmit_fifo) ?
+ s->tsr = fifo8_is_empty(&s->xmit_fifo) ?
0 : fifo8_pop(&s->xmit_fifo);
if (!s->xmit_fifo.num) {
s->lsr |= UART_LSR_THRE;
diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index c583c3d0c5..c16e9e4c81 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -45,6 +45,7 @@
typedef struct ResetData {
SPARCCPU *cpu;
uint32_t entry; /* save kernel entry in case of reset */
+ target_ulong sp; /* initial stack pointer */
} ResetData;
static void main_cpu_reset(void *opaque)
@@ -58,6 +59,7 @@ static void main_cpu_reset(void *opaque)
cpu->halted = 0;
env->pc = s->entry;
env->npc = s->entry + 4;
+ env->regbase[6] = s->sp;
}
void leon3_irq_ack(void *irq_manager, int intno)
@@ -133,6 +135,7 @@ static void leon3_generic_hw_init(QEMUMachineInitArgs *args)
/* Reset data */
reset_info = g_malloc0(sizeof(ResetData));
reset_info->cpu = cpu;
+ reset_info->sp = 0x40000000 + ram_size;
qemu_register_reset(main_cpu_reset, reset_info);
/* Allocate IRQ manager */