Compare commits
9 Commits
v1.5.0-rc3
...
qemu-1.5.0
Author | SHA1 | Date | |
---|---|---|---|
|
371386fb60 | ||
|
da4c1a7a85 | ||
|
3568ac2a6e | ||
|
fd2a2e1c55 | ||
|
08d0ab3fe6 | ||
|
b9b5df6f0c | ||
|
118d1e4f59 | ||
|
0ba365f4a9 | ||
|
489ed4bbae |
@@ -1157,7 +1157,7 @@ static int pl330_exec_cycle(PL330Chan *channel)
|
||||
if (PL330_ERR_DEBUG > 1) {
|
||||
DB_PRINT("PL330 read from memory @%08x (size = %08x):\n",
|
||||
q->addr, len);
|
||||
hexdump((char *)buf, stderr, "", len);
|
||||
qemu_hexdump((char *)buf, stderr, "", len);
|
||||
}
|
||||
fifo_res = pl330_fifo_push(&s->fifo, buf, len, q->tag);
|
||||
if (fifo_res == PL330_FIFO_OK) {
|
||||
@@ -1189,7 +1189,7 @@ static int pl330_exec_cycle(PL330Chan *channel)
|
||||
if (PL330_ERR_DEBUG > 1) {
|
||||
DB_PRINT("PL330 read from memory @%08x (size = %08x):\n",
|
||||
q->addr, len);
|
||||
hexdump((char *)buf, stderr, "", len);
|
||||
qemu_hexdump((char *)buf, stderr, "", len);
|
||||
}
|
||||
if (q->inc) {
|
||||
q->addr += len;
|
||||
|
@@ -144,7 +144,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret)
|
||||
break;
|
||||
case IDE_DMA_TRIM:
|
||||
m->aiocb = dma_bdrv_io(s->bs, &s->sg, sector_num,
|
||||
ide_issue_trim, pmac_ide_transfer_cb, s,
|
||||
ide_issue_trim, pmac_ide_transfer_cb, io,
|
||||
DMA_DIRECTION_TO_DEVICE);
|
||||
break;
|
||||
}
|
||||
|
@@ -443,7 +443,7 @@ int mod_utf8_codepoint(const char *s, size_t n, char **end);
|
||||
* Hexdump a buffer to a file. An optional string prefix is added to every line
|
||||
*/
|
||||
|
||||
void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
|
||||
void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size);
|
||||
|
||||
/* vector definitions */
|
||||
#ifdef __ALTIVEC__
|
||||
|
@@ -3210,7 +3210,7 @@
|
||||
'*telnet' : 'bool' } }
|
||||
|
||||
##
|
||||
# @ChardevDgram:
|
||||
# @ChardevUdp:
|
||||
#
|
||||
# Configuration info for datagram socket chardevs.
|
||||
#
|
||||
@@ -3219,8 +3219,8 @@
|
||||
#
|
||||
# Since: 1.5
|
||||
##
|
||||
{ 'type': 'ChardevDgram', 'data': { 'remote' : 'SocketAddress',
|
||||
'*local' : 'SocketAddress' } }
|
||||
{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
|
||||
'*local' : 'SocketAddress' } }
|
||||
|
||||
##
|
||||
# @ChardevMux:
|
||||
@@ -3310,7 +3310,7 @@
|
||||
'parallel': 'ChardevHostdev',
|
||||
'pipe' : 'ChardevHostdev',
|
||||
'socket' : 'ChardevSocket',
|
||||
'dgram' : 'ChardevDgram',
|
||||
'udp' : 'ChardevUdp',
|
||||
'pty' : 'ChardevDummy',
|
||||
'null' : 'ChardevDummy',
|
||||
'mux' : 'ChardevMux',
|
||||
|
10
qemu-char.c
10
qemu-char.c
@@ -3698,12 +3698,12 @@ static CharDriverState *qmp_chardev_open_socket(ChardevSocket *sock,
|
||||
is_telnet, is_waitconnect, errp);
|
||||
}
|
||||
|
||||
static CharDriverState *qmp_chardev_open_dgram(ChardevDgram *dgram,
|
||||
Error **errp)
|
||||
static CharDriverState *qmp_chardev_open_udp(ChardevUdp *udp,
|
||||
Error **errp)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = socket_dgram(dgram->remote, dgram->local, errp);
|
||||
fd = socket_dgram(udp->remote, udp->local, errp);
|
||||
if (error_is_set(errp)) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -3739,8 +3739,8 @@ ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,
|
||||
case CHARDEV_BACKEND_KIND_SOCKET:
|
||||
chr = qmp_chardev_open_socket(backend->socket, errp);
|
||||
break;
|
||||
case CHARDEV_BACKEND_KIND_DGRAM:
|
||||
chr = qmp_chardev_open_dgram(backend->dgram, errp);
|
||||
case CHARDEV_BACKEND_KIND_UDP:
|
||||
chr = qmp_chardev_open_udp(backend->udp, errp);
|
||||
break;
|
||||
#ifdef HAVE_CHARDEV_TTY
|
||||
case CHARDEV_BACKEND_KIND_PTY:
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "cpu.h"
|
||||
#include "helper.h"
|
||||
#include "qemu/bitops.h"
|
||||
|
||||
/* As the byte ordering doesn't matter, i.e. all columns are treated
|
||||
identically, these unions can be used directly. */
|
||||
@@ -53,9 +54,10 @@ static inline void set_DSPControl_overflow_flag(uint32_t flag, int position,
|
||||
env->active_tc.DSPControl |= (target_ulong)flag << position;
|
||||
}
|
||||
|
||||
static inline void set_DSPControl_carryflag(uint32_t flag, CPUMIPSState *env)
|
||||
static inline void set_DSPControl_carryflag(bool flag, CPUMIPSState *env)
|
||||
{
|
||||
env->active_tc.DSPControl |= (target_ulong)flag << 13;
|
||||
env->active_tc.DSPControl &= ~(1 << 13);
|
||||
env->active_tc.DSPControl |= flag << 13;
|
||||
}
|
||||
|
||||
static inline uint32_t get_DSPControl_carryflag(CPUMIPSState *env)
|
||||
@@ -90,10 +92,10 @@ static inline void set_DSPControl_pos(uint32_t pos, CPUMIPSState *env)
|
||||
dspc = env->active_tc.DSPControl;
|
||||
#ifndef TARGET_MIPS64
|
||||
dspc = dspc & 0xFFFFFFC0;
|
||||
dspc |= pos;
|
||||
dspc |= (pos & 0x3F);
|
||||
#else
|
||||
dspc = dspc & 0xFFFFFF80;
|
||||
dspc |= pos;
|
||||
dspc |= (pos & 0x7F);
|
||||
#endif
|
||||
env->active_tc.DSPControl = dspc;
|
||||
}
|
||||
@@ -1266,7 +1268,7 @@ SUBUH_QB(subuh_r, 1);
|
||||
target_ulong helper_addsc(target_ulong rs, target_ulong rt, CPUMIPSState *env)
|
||||
{
|
||||
uint64_t temp, tempRs, tempRt;
|
||||
int32_t flag;
|
||||
bool flag;
|
||||
|
||||
tempRs = (uint64_t)rs & MIPSDSP_LLO;
|
||||
tempRt = (uint64_t)rt & MIPSDSP_LLO;
|
||||
@@ -3415,8 +3417,7 @@ target_ulong helper_extp(target_ulong ac, target_ulong size, CPUMIPSState *env)
|
||||
if (sub >= -1) {
|
||||
acc = ((uint64_t)env->active_tc.HI[ac] << 32) |
|
||||
((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO);
|
||||
temp = (acc >> (start_pos - size)) &
|
||||
(((uint32_t)0x01 << (size + 1)) - 1);
|
||||
temp = (acc >> (start_pos - size)) & (~0U >> (31 - size));
|
||||
set_DSPControl_efi(0, env);
|
||||
} else {
|
||||
set_DSPControl_efi(1, env);
|
||||
@@ -3440,10 +3441,9 @@ target_ulong helper_extpdp(target_ulong ac, target_ulong size,
|
||||
if (sub >= -1) {
|
||||
acc = ((uint64_t)env->active_tc.HI[ac] << 32) |
|
||||
((uint64_t)env->active_tc.LO[ac] & MIPSDSP_LLO);
|
||||
temp = (acc >> (start_pos - size)) &
|
||||
(((uint32_t)0x01 << (size + 1)) - 1);
|
||||
temp = extract64(acc, start_pos - size, size + 1);
|
||||
|
||||
set_DSPControl_pos(start_pos - (size + 1), env);
|
||||
set_DSPControl_pos(sub, env);
|
||||
set_DSPControl_efi(0, env);
|
||||
} else {
|
||||
set_DSPControl_efi(1, env);
|
||||
|
@@ -40,5 +40,23 @@ int main()
|
||||
dsp = (dsp >> 14) & 0x01;
|
||||
assert(dsp == 1);
|
||||
|
||||
ach = 0;
|
||||
acl = 0x80000001;
|
||||
dsp = 0x1F;
|
||||
result = 0x80000001;
|
||||
|
||||
__asm
|
||||
("wrdsp %1\n\t"
|
||||
"mthi %2, $ac2\n\t"
|
||||
"mtlo %3, $ac2\n\t"
|
||||
"extp %0, $ac2, 0x1F\n\t"
|
||||
"rddsp %1\n\t"
|
||||
: "=r"(rt), "+r"(dsp)
|
||||
: "r"(ach), "r"(acl)
|
||||
);
|
||||
dsp = (dsp >> 14) & 0x01;
|
||||
assert(dsp == 0);
|
||||
assert(result == rt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -42,5 +42,23 @@ int main()
|
||||
efi = (dsp >> 14) & 0x01;
|
||||
assert(efi == 1);
|
||||
|
||||
|
||||
ach = 0;
|
||||
acl = 0;
|
||||
dsp = 0;
|
||||
result = 0;
|
||||
|
||||
__asm
|
||||
("wrdsp %1\n\t"
|
||||
"mthi %2, $ac1\n\t"
|
||||
"mtlo %3, $ac1\n\t"
|
||||
"extpdp %0, $ac1, 0x00\n\t"
|
||||
"rddsp %1\n\t"
|
||||
: "=r"(rt), "+r"(dsp)
|
||||
: "r"(ach), "r"(acl)
|
||||
);
|
||||
assert(dsp == 0x3F);
|
||||
assert(result == rt);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -34,7 +34,7 @@ g_free(void *ptr) "ptr %p"
|
||||
qemu_memalign(size_t alignment, size_t size, void *ptr) "alignment %zu size %zu ptr %p"
|
||||
qemu_anon_ram_alloc(size_t size, void *ptr) "size %zu ptr %p"
|
||||
qemu_vfree(void *ptr) "ptr %p"
|
||||
qemu_anon_ram_free(void *ptr, size_t size) "size %zu ptr %p"
|
||||
qemu_anon_ram_free(void *ptr, size_t size) "ptr %p size %zu"
|
||||
|
||||
# hw/virtio.c
|
||||
virtqueue_fill(void *vq, const void *elem, unsigned int len, unsigned int idx) "vq %p elem %p len %u idx %u"
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
||||
#include "qemu-common.h"
|
||||
|
||||
void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size)
|
||||
void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size)
|
||||
{
|
||||
unsigned int b;
|
||||
|
||||
|
@@ -225,7 +225,7 @@ void iov_hexdump(const struct iovec *iov, const unsigned int iov_cnt,
|
||||
size = size > limit ? limit : size;
|
||||
buf = g_malloc(size);
|
||||
iov_to_buf(iov, iov_cnt, 0, buf, size);
|
||||
hexdump(buf, fp, prefix, size);
|
||||
qemu_hexdump(buf, fp, prefix, size);
|
||||
g_free(buf);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user