Skip to content

Commit

Permalink
upstream 0c25743
Browse files Browse the repository at this point in the history
May 21, 2009
  • Loading branch information
gdwnldsKSC committed Feb 25, 2024
1 parent 87da671 commit 05232c8
Show file tree
Hide file tree
Showing 21 changed files with 108 additions and 48 deletions.
Binary file modified TESTFILES/WinQemu.dll
Binary file not shown.
Binary file modified TESTFILES/WinQemu.pdb
Binary file not shown.
7 changes: 7 additions & 0 deletions qemu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ endif

LIBS+=$(VDE_LIBS)

# xen backend driver support
XEN_OBJS := xen_backend.o xen_devconfig.o
XEN_OBJS += xen_console.o xenfb.o xen_disk.o xen_nic.o
ifdef CONFIG_XEN
OBJS += $(XEN_OBJS)
endif

cocoa.o: cocoa.m

keymaps.o: keymaps.c keymaps.h
Expand Down
8 changes: 7 additions & 1 deletion qemu/Makefile.hw
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ OBJS+= fw_cfg.o
OBJS+= watchdog.o
OBJS+= nand.o ecc.o

OBJS+= m48t59.o
OBJS+= m48t59.o escc.o

# PC style devices
OBJS+= fdc.o

# SCSI layer
OBJS+= lsi53c895a.o esp.o

OBJS+= dma-helpers.o sysbus.o

Expand Down
5 changes: 5 additions & 0 deletions qemu/configure
Original file line number Diff line number Diff line change
Expand Up @@ -1708,6 +1708,11 @@ else
exit 1
fi

if test "$xen" = "yes" ;
then
echo "CONFIG_XEN=yes" >> $config_mak
fi

tools=
if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
tools="qemu-img\$(EXESUF) $tools"
Expand Down
2 changes: 1 addition & 1 deletion qemu/hw/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ typedef struct QEMUMachine {
QEMUMachineInitFunc *init;
int use_scsi;
int max_cpus;
int is_default;
struct QEMUMachine *next;
} QEMUMachine;

int qemu_register_machine(QEMUMachine *m);
void register_machines(void);

extern QEMUMachine *current_machine;

Expand Down
1 change: 1 addition & 0 deletions qemu/hw/etraxfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ static QEMUMachine bareetraxfs_machine = {
.name = "bareetraxfs",
.desc = "Bare ETRAX FS board",
.init = bareetraxfs_init,
.is_default = 1,
};

static void bareetraxfs_machine_init(void)
Expand Down
2 changes: 1 addition & 1 deletion qemu/hw/fw_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
}
fw_cfg_add_bytes(s, FW_CFG_SIGNATURE, (uint8_t *)"QEMU", 4);
fw_cfg_add_bytes(s, FW_CFG_UUID, qemu_uuid, 16);
fw_cfg_add_i16(s, FW_CFG_NOGRAPHIC, (uint16_t)nographic);
fw_cfg_add_i16(s, FW_CFG_NOGRAPHIC, (uint16_t)(display_type == DT_NOGRAPHIC));
fw_cfg_add_i16(s, FW_CFG_NB_CPUS, (uint16_t)smp_cpus);

register_savevm("fw_cfg", -1, 1, fw_cfg_save, fw_cfg_load, s);
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/integratorcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ static QEMUMachine integratorcp_machine = {
.name = "integratorcp",
.desc = "ARM Integrator/CP (ARM926EJ-S)",
.init = integratorcp_init,
.is_default = 1,
};

static void integratorcp_machine_init(void)
Expand Down
5 changes: 3 additions & 2 deletions qemu/hw/lsi53c895a.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,14 +851,15 @@ static inline int32_t sxt24(int32_t n)
return (n << 8) >> 8;
}

#define LSI_BUF_SIZE 4096
static void lsi_memcpy(LSIState *s, uint32_t dest, uint32_t src, int count)
{
int n;
uint8_t buf[TARGET_PAGE_SIZE];
uint8_t buf[LSI_BUF_SIZE];

DPRINTF("memcpy dest 0x%08x src 0x%08x count %d\n", dest, src, count);
while (count) {
n = (count > TARGET_PAGE_SIZE) ? TARGET_PAGE_SIZE : count;
n = (count > LSI_BUF_SIZE) ? LSI_BUF_SIZE : count;
cpu_physical_memory_read(src, buf, n);
cpu_physical_memory_write(dest, buf, n);
src += n;
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/mcf5208.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ static QEMUMachine mcf5208evb_machine = {
.name = "mcf5208evb",
.desc = "MCF5206EVB",
.init = mcf5208evb_init,
.is_default = 1,
};

static void mcf5208evb_machine_init(void)
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/mips_malta.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ static QEMUMachine mips_malta_machine = {
.name = "malta",
.desc = "MIPS Malta Core LV",
.init = mips_malta_init,
.is_default = 1,
};

static void mips_malta_machine_init(void)
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,7 @@ static QEMUMachine pc_machine = {
.desc = "Standard PC",
.init = pc_init_pci,
.max_cpus = 255,
.is_default = 1,
};

static QEMUMachine isapc_machine = {
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/ppc_oldworld.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ static QEMUMachine heathrow_machine = {
.desc = "Heathrow based PowerMAC",
.init = ppc_heathrow_init,
.max_cpus = MAX_CPUS,
.is_default = 1,
};

static void heathrow_machine_init(void)
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/shix.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ static QEMUMachine shix_machine = {
.name = "shix",
.desc = "shix card",
.init = shix_init,
.is_default = 1,
};

static void shix_machine_init(void)
Expand Down
7 changes: 4 additions & 3 deletions qemu/hw/sun4m.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size,
slavio_cpu_irq, smp_cpus);

slavio_serial_ms_kbd_init(hwdef->ms_kb_base, slavio_irq[hwdef->ms_kb_irq],
nographic, ESCC_CLOCK, 1);
display_type == DT_NOGRAPHIC, ESCC_CLOCK, 1);
// Slavio TTYA (base+4, Linux ttyS0) is the first Qemu serial device
// Slavio TTYB (base+0, Linux ttyS1) is the second Qemu serial device
escc_init(hwdef->serial_base, slavio_irq[hwdef->ser_irq], slavio_irq[hwdef->ser_irq],
Expand Down Expand Up @@ -1037,6 +1037,7 @@ static QEMUMachine ss5_machine = {
.desc = "Sun4m platform, SPARCstation 5",
.init = ss5_init,
.use_scsi = 1,
.is_default = 1,
};

static QEMUMachine ss10_machine = {
Expand Down Expand Up @@ -1273,7 +1274,7 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size,
sbi_cpu_irq, smp_cpus);

slavio_serial_ms_kbd_init(hwdef->ms_kb_base, sbi_irq[hwdef->ms_kb_irq],
nographic, ESCC_CLOCK, 1);
display_type == DT_NOGRAPHIC, ESCC_CLOCK, 1);
// Slavio TTYA (base+4, Linux ttyS0) is the first Qemu serial device
// Slavio TTYB (base+0, Linux ttyS1) is the second Qemu serial device
escc_init(hwdef->serial_base, sbi_irq[hwdef->ser_irq], sbi_irq[hwdef->ser_irq],
Expand Down Expand Up @@ -1476,7 +1477,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size,
hwdef->nvram_size, 2);

slavio_serial_ms_kbd_init(hwdef->ms_kb_base, slavio_irq[hwdef->ms_kb_irq],
nographic, ESCC_CLOCK, 1);
display_type == DT_NOGRAPHIC, ESCC_CLOCK, 1);
// Slavio TTYA (base+4, Linux ttyS0) is the first Qemu serial device
// Slavio TTYB (base+0, Linux ttyS1) is the second Qemu serial device
escc_init(hwdef->serial_base, slavio_irq[hwdef->ser_irq],
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/sun4u.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ static QEMUMachine sun4u_machine = {
.desc = "Sun4u platform",
.init = sun4u_init,
.max_cpus = 1, // XXX for now
.is_default = 1,
};

static QEMUMachine sun4v_machine = {
Expand Down
1 change: 1 addition & 0 deletions qemu/hw/xen_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include "hw.h"
#include "qemu-char.h"
#include "qemu-log.h"
#include "xen_backend.h"

/* ------------------------------------------------------------- */
Expand Down
6 changes: 3 additions & 3 deletions qemu/qemu-char.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static void fd_chr_update_read_handler(CharDriverState *chr)
FDCharDriver *s = chr->opaque;

if (s->fd_in >= 0) {
if (nographic && s->fd_in == 0) {
if (display_type == DT_NOGRAPHIC && s->fd_in == 0) {
} else {
qemu_set_fd_handler2(s->fd_in, fd_chr_read_poll,
fd_chr_read, NULL, chr);
Expand All @@ -584,7 +584,7 @@ static void fd_chr_close(struct CharDriverState *chr)
FDCharDriver *s = chr->opaque;

if (s->fd_in >= 0) {
if (nographic && s->fd_in == 0) {
if (display_type == DT_NOGRAPHIC && s->fd_in == 0) {
} else {
qemu_set_fd_handler2(s->fd_in, NULL, NULL, NULL, NULL);
}
Expand Down Expand Up @@ -714,7 +714,7 @@ static void term_init(void)
tty.c_oflag |= OPOST;
tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
/* if graphical mode, we allow Ctrl-C handling */
if (nographic)
if (display_type == DT_NOGRAPHIC)
tty.c_lflag &= ~ISIG;
tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8;
Expand Down
11 changes: 10 additions & 1 deletion qemu/sysemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ int tap_win32_init(VLANState *vlan, const char *model,
/* SLIRP */
void do_info_slirp(Monitor *mon);

typedef enum DisplayType
{
DT_DEFAULT,
DT_CURSES,
DT_SDL,
DT_VNC,
DT_NOGRAPHIC,
} DisplayType;

extern int bios_size;
extern int cirrus_vga_enabled;
extern int std_vga_enabled;
Expand All @@ -94,7 +103,7 @@ extern int xenfb_enabled;
extern int graphic_width;
extern int graphic_height;
extern int graphic_depth;
extern int nographic;
extern DisplayType display_type;
extern const char *keyboard_layout;
extern int win2k_install_hack;
extern int rtc_td_hack;
Expand Down
Loading

0 comments on commit 05232c8

Please sign in to comment.