mirror of https://github.com/xemu-project/xemu.git
consolidate user cpu_{in, out}[bwl] into ioport-user.c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
23e0affdd2
commit
5f65049560
|
@ -321,7 +321,8 @@ CFLAGS+=-p
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
|
obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
|
||||||
elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o
|
elfload.o linuxload.o uaccess.o envlist.o gdbstub.o gdbstub-xml.o \
|
||||||
|
ioport-user.o
|
||||||
LIBS+= $(PTHREADLIBS)
|
LIBS+= $(PTHREADLIBS)
|
||||||
LIBS+= $(CLOCKLIBS)
|
LIBS+= $(CLOCKLIBS)
|
||||||
obj-$(TARGET_HAS_BFLT) += flatload.o
|
obj-$(TARGET_HAS_BFLT) += flatload.o
|
||||||
|
@ -372,7 +373,7 @@ LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
|
||||||
LIBS+=-lmx
|
LIBS+=-lmx
|
||||||
|
|
||||||
obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
|
obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
|
||||||
gdbstub.o gdbstub-xml.o
|
gdbstub.o gdbstub-xml.o ioport-user.o
|
||||||
|
|
||||||
# Note: this is a workaround. The real fix is to avoid compiling
|
# Note: this is a workaround. The real fix is to avoid compiling
|
||||||
# cpu_signal_handler() in cpu-exec.c.
|
# cpu_signal_handler() in cpu-exec.c.
|
||||||
|
@ -471,7 +472,7 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
obj-y = main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \
|
obj-y = main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \
|
||||||
gdbstub.o gdbstub-xml.o
|
gdbstub.o gdbstub-xml.o ioport-user.o
|
||||||
obj-y += uaccess.o
|
obj-y += uaccess.o
|
||||||
|
|
||||||
# Note: this is a workaround. The real fix is to avoid compiling
|
# Note: this is a workaround. The real fix is to avoid compiling
|
||||||
|
|
|
@ -55,39 +55,6 @@ void gemu_log(const char *fmt, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_outb(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outb: port=0x%04x, data=%02x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outw(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outw: port=0x%04x, data=%04x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outl(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outl: port=0x%04x, data=%08x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inb(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inb: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inw(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inw: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inl(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inl: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(TARGET_I386)
|
#if defined(TARGET_I386)
|
||||||
int cpu_get_pic_interrupt(CPUState *env)
|
int cpu_get_pic_interrupt(CPUState *env)
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,39 +72,6 @@ void gemu_log(const char *fmt, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_outb(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outb: port=0x%04x, data=%02x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outw(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outw: port=0x%04x, data=%04x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outl(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outl: port=0x%04x, data=%08x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inb(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inb: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inw(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inw: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inl(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inl: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_get_pic_interrupt(CPUState *env)
|
int cpu_get_pic_interrupt(CPUState *env)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* qemu user ioport functions
|
||||||
|
*
|
||||||
|
* Copyright (c) 2003-2008 Fabrice Bellard
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "qemu.h"
|
||||||
|
#include "qemu-common.h"
|
||||||
|
#include "ioport.h"
|
||||||
|
|
||||||
|
void cpu_outb(CPUState *env, int addr, int val)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "outb: port=0x%04x, data=%02x\n", addr, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cpu_outw(CPUState *env, int addr, int val)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "outw: port=0x%04x, data=%04x\n", addr, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
void cpu_outl(CPUState *env, int addr, int val)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "outl: port=0x%04x, data=%08x\n", addr, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
int cpu_inb(CPUState *env, int addr)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "inb: port=0x%04x\n", addr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int cpu_inw(CPUState *env, int addr)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "inw: port=0x%04x\n", addr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int cpu_inl(CPUState *env, int addr)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "inl: port=0x%04x\n", addr);
|
||||||
|
return 0;
|
||||||
|
}
|
|
@ -85,39 +85,6 @@ void gemu_log(const char *fmt, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpu_outb(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outb: port=0x%04x, data=%02x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outw(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outw: port=0x%04x, data=%04x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outl(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outl: port=0x%04x, data=%08x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inb(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inb: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inw(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inw: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inl(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inl: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(TARGET_I386)
|
#if defined(TARGET_I386)
|
||||||
int cpu_get_pic_interrupt(CPUState *env)
|
int cpu_get_pic_interrupt(CPUState *env)
|
||||||
{
|
{
|
||||||
|
|
|
@ -78,9 +78,9 @@ runcom: runcom.c
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
|
||||||
|
|
||||||
# NOTE: -fomit-frame-pointer is currently needed : this is a bug in libqemu
|
# NOTE: -fomit-frame-pointer is currently needed : this is a bug in libqemu
|
||||||
qruncom: qruncom.c ../i386-user/libqemu.a
|
qruncom: qruncom.c ../ioport-user.c ../i386-user/libqemu.a
|
||||||
$(CC) $(CFLAGS) -fomit-frame-pointer $(LDFLAGS) -I../target-i386 -I.. -I../i386-user -I../fpu \
|
$(CC) $(CFLAGS) -fomit-frame-pointer $(LDFLAGS) -I../target-i386 -I.. -I../i386-user -I../fpu \
|
||||||
-o $@ $< -L../i386-user -lqemu -lm
|
-o $@ $(filter %.c, $^) -L../i386-user -lqemu -lm
|
||||||
|
|
||||||
# arm test
|
# arm test
|
||||||
hello-arm: hello-arm.o
|
hello-arm: hello-arm.o
|
||||||
|
|
|
@ -16,39 +16,6 @@
|
||||||
|
|
||||||
//#define SIGTEST
|
//#define SIGTEST
|
||||||
|
|
||||||
void cpu_outb(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outb: port=0x%04x, data=%02x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outw(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outw: port=0x%04x, data=%04x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cpu_outl(CPUState *env, int addr, int val)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "outl: port=0x%04x, data=%08x\n", addr, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inb(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inb: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inw(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inw: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_inl(CPUState *env, int addr)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "inl: port=0x%04x\n", addr);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int cpu_get_pic_interrupt(CPUState *env)
|
int cpu_get_pic_interrupt(CPUState *env)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue