Browse Source
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162stable-0.10
224 changed files with 2416 additions and 1842 deletions
@ -0,0 +1,154 @@ |
|||
#ifndef CONSOLE_H |
|||
#define CONSOLE_H |
|||
|
|||
#include "qemu-char.h" |
|||
|
|||
/* keyboard/mouse support */ |
|||
|
|||
#define MOUSE_EVENT_LBUTTON 0x01 |
|||
#define MOUSE_EVENT_RBUTTON 0x02 |
|||
#define MOUSE_EVENT_MBUTTON 0x04 |
|||
|
|||
typedef void QEMUPutKBDEvent(void *opaque, int keycode); |
|||
typedef void QEMUPutMouseEvent(void *opaque, int dx, int dy, int dz, int buttons_state); |
|||
|
|||
typedef struct QEMUPutMouseEntry { |
|||
QEMUPutMouseEvent *qemu_put_mouse_event; |
|||
void *qemu_put_mouse_event_opaque; |
|||
int qemu_put_mouse_event_absolute; |
|||
char *qemu_put_mouse_event_name; |
|||
|
|||
/* used internally by qemu for handling mice */ |
|||
struct QEMUPutMouseEntry *next; |
|||
} QEMUPutMouseEntry; |
|||
|
|||
void qemu_add_kbd_event_handler(QEMUPutKBDEvent *func, void *opaque); |
|||
QEMUPutMouseEntry *qemu_add_mouse_event_handler(QEMUPutMouseEvent *func, |
|||
void *opaque, int absolute, |
|||
const char *name); |
|||
void qemu_remove_mouse_event_handler(QEMUPutMouseEntry *entry); |
|||
|
|||
void kbd_put_keycode(int keycode); |
|||
void kbd_mouse_event(int dx, int dy, int dz, int buttons_state); |
|||
int kbd_mouse_is_absolute(void); |
|||
|
|||
void do_info_mice(void); |
|||
void do_mouse_set(int index); |
|||
|
|||
/* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
|
|||
constants) */ |
|||
#define QEMU_KEY_ESC1(c) ((c) | 0xe100) |
|||
#define QEMU_KEY_BACKSPACE 0x007f |
|||
#define QEMU_KEY_UP QEMU_KEY_ESC1('A') |
|||
#define QEMU_KEY_DOWN QEMU_KEY_ESC1('B') |
|||
#define QEMU_KEY_RIGHT QEMU_KEY_ESC1('C') |
|||
#define QEMU_KEY_LEFT QEMU_KEY_ESC1('D') |
|||
#define QEMU_KEY_HOME QEMU_KEY_ESC1(1) |
|||
#define QEMU_KEY_END QEMU_KEY_ESC1(4) |
|||
#define QEMU_KEY_PAGEUP QEMU_KEY_ESC1(5) |
|||
#define QEMU_KEY_PAGEDOWN QEMU_KEY_ESC1(6) |
|||
#define QEMU_KEY_DELETE QEMU_KEY_ESC1(3) |
|||
|
|||
#define QEMU_KEY_CTRL_UP 0xe400 |
|||
#define QEMU_KEY_CTRL_DOWN 0xe401 |
|||
#define QEMU_KEY_CTRL_LEFT 0xe402 |
|||
#define QEMU_KEY_CTRL_RIGHT 0xe403 |
|||
#define QEMU_KEY_CTRL_HOME 0xe404 |
|||
#define QEMU_KEY_CTRL_END 0xe405 |
|||
#define QEMU_KEY_CTRL_PAGEUP 0xe406 |
|||
#define QEMU_KEY_CTRL_PAGEDOWN 0xe407 |
|||
|
|||
void kbd_put_keysym(int keysym); |
|||
|
|||
/* consoles */ |
|||
|
|||
struct DisplayState { |
|||
uint8_t *data; |
|||
int linesize; |
|||
int depth; |
|||
int bgr; /* BGR color order instead of RGB. Only valid for depth == 32 */ |
|||
int width; |
|||
int height; |
|||
void *opaque; |
|||
struct QEMUTimer *gui_timer; |
|||
|
|||
void (*dpy_update)(struct DisplayState *s, int x, int y, int w, int h); |
|||
void (*dpy_resize)(struct DisplayState *s, int w, int h); |
|||
void (*dpy_refresh)(struct DisplayState *s); |
|||
void (*dpy_copy)(struct DisplayState *s, int src_x, int src_y, |
|||
int dst_x, int dst_y, int w, int h); |
|||
void (*dpy_fill)(struct DisplayState *s, int x, int y, |
|||
int w, int h, uint32_t c); |
|||
void (*mouse_set)(int x, int y, int on); |
|||
void (*cursor_define)(int width, int height, int bpp, int hot_x, int hot_y, |
|||
uint8_t *image, uint8_t *mask); |
|||
}; |
|||
|
|||
static inline void dpy_update(DisplayState *s, int x, int y, int w, int h) |
|||
{ |
|||
s->dpy_update(s, x, y, w, h); |
|||
} |
|||
|
|||
static inline void dpy_resize(DisplayState *s, int w, int h) |
|||
{ |
|||
s->dpy_resize(s, w, h); |
|||
} |
|||
|
|||
typedef void (*vga_hw_update_ptr)(void *); |
|||
typedef void (*vga_hw_invalidate_ptr)(void *); |
|||
typedef void (*vga_hw_screen_dump_ptr)(void *, const char *); |
|||
|
|||
TextConsole *graphic_console_init(DisplayState *ds, vga_hw_update_ptr update, |
|||
vga_hw_invalidate_ptr invalidate, |
|||
vga_hw_screen_dump_ptr screen_dump, |
|||
void *opaque); |
|||
void vga_hw_update(void); |
|||
void vga_hw_invalidate(void); |
|||
void vga_hw_screen_dump(const char *filename); |
|||
|
|||
int is_graphic_console(void); |
|||
CharDriverState *text_console_init(DisplayState *ds, const char *p); |
|||
void console_select(unsigned int index); |
|||
void console_color_init(DisplayState *ds); |
|||
|
|||
/* sdl.c */ |
|||
void sdl_display_init(DisplayState *ds, int full_screen, int no_frame); |
|||
|
|||
/* cocoa.m */ |
|||
void cocoa_display_init(DisplayState *ds, int full_screen); |
|||
|
|||
/* vnc.c */ |
|||
void vnc_display_init(DisplayState *ds); |
|||
void vnc_display_close(DisplayState *ds); |
|||
int vnc_display_open(DisplayState *ds, const char *display); |
|||
int vnc_display_password(DisplayState *ds, const char *password); |
|||
void do_info_vnc(void); |
|||
|
|||
/* x_keymap.c */ |
|||
extern uint8_t _translate_keycode(const int key); |
|||
|
|||
/* FIXME: term_printf et al should probably go elsewhere so everything
|
|||
does not need to include console.h */ |
|||
/* monitor.c */ |
|||
void monitor_init(CharDriverState *hd, int show_banner); |
|||
void term_puts(const char *str); |
|||
void term_vprintf(const char *fmt, va_list ap); |
|||
void term_printf(const char *fmt, ...) __attribute__ ((__format__ (__printf__, 1, 2))); |
|||
void term_print_filename(const char *filename); |
|||
void term_flush(void); |
|||
void term_print_help(void); |
|||
void monitor_readline(const char *prompt, int is_password, |
|||
char *buf, int buf_size); |
|||
|
|||
/* readline.c */ |
|||
typedef void ReadLineFunc(void *opaque, const char *str); |
|||
|
|||
extern int completion_index; |
|||
void add_completion(const char *str); |
|||
void readline_handle_byte(int ch); |
|||
void readline_find_completion(const char *cmdline); |
|||
const char *readline_get_history(unsigned int index); |
|||
void readline_start(const char *prompt, int is_password, |
|||
ReadLineFunc *readline_func, void *opaque); |
|||
|
|||
#endif |
|||
@ -0,0 +1,33 @@ |
|||
/*
|
|||
* Misc ARM declarations |
|||
* |
|||
* Copyright (c) 2006 CodeSourcery. |
|||
* Written by Paul Brook |
|||
* |
|||
* This code is licenced under the LGPL. |
|||
* |
|||
*/ |
|||
|
|||
#ifndef ARM_MISC_H |
|||
#define ARM_MISC_H 1 |
|||
|
|||
/* The CPU is also modeled as an interrupt controller. */ |
|||
#define ARM_PIC_CPU_IRQ 0 |
|||
#define ARM_PIC_CPU_FIQ 1 |
|||
qemu_irq *arm_pic_init_cpu(CPUState *env); |
|||
|
|||
/* armv7m.c */ |
|||
qemu_irq *armv7m_init(int flash_size, int sram_size, |
|||
const char *kernel_filename, const char *cpu_model); |
|||
|
|||
/* arm_boot.c */ |
|||
|
|||
void arm_load_kernel(CPUState *env, int ram_size, const char *kernel_filename, |
|||
const char *kernel_cmdline, const char *initrd_filename, |
|||
int board_id, target_phys_addr_t loader_start); |
|||
|
|||
/* armv7m_nvic.c */ |
|||
qemu_irq *armv7m_nvic_init(CPUState *env); |
|||
|
|||
#endif /* !ARM_MISC_H */ |
|||
|
|||
@ -1,23 +0,0 @@ |
|||
/*
|
|||
* Generic ARM Programmable Interrupt Controller support. |
|||
* |
|||
* Copyright (c) 2006 CodeSourcery. |
|||
* Written by Paul Brook |
|||
* |
|||
* This code is licenced under the LGPL. |
|||
* |
|||
* Arm hardware uses a wide variety of interrupt handling hardware. |
|||
* This provides a generic framework for connecting interrupt sources and |
|||
* inputs. |
|||
*/ |
|||
|
|||
#ifndef ARM_INTERRUPT_H |
|||
#define ARM_INTERRUPT_H 1 |
|||
|
|||
/* The CPU is also modeled as an interrupt controller. */ |
|||
#define ARM_PIC_CPU_IRQ 0 |
|||
#define ARM_PIC_CPU_FIQ 1 |
|||
qemu_irq *arm_pic_init_cpu(CPUState *env); |
|||
|
|||
#endif /* !ARM_INTERRUPT_H */ |
|||
|
|||
@ -0,0 +1,12 @@ |
|||
/* es1370.c */ |
|||
int es1370_init (PCIBus *bus, AudioState *s); |
|||
|
|||
/* sb16.c */ |
|||
int SB16_init (AudioState *s, qemu_irq *pic); |
|||
|
|||
/* adlib.c */ |
|||
int Adlib_init (AudioState *s, qemu_irq *pic); |
|||
|
|||
/* gus.c */ |
|||
int GUS_init (AudioState *s, qemu_irq *pic); |
|||
|
|||
@ -0,0 +1,94 @@ |
|||
/* Declarations for use by board files for creating devices. */ |
|||
|
|||
#ifndef HW_BOARDS_H |
|||
#define HW_BOARDS_H |
|||
|
|||
typedef void QEMUMachineInitFunc(int ram_size, int vga_ram_size, |
|||
const char *boot_device, |
|||
DisplayState *ds, const char **fd_filename, int snapshot, |
|||
const char *kernel_filename, const char *kernel_cmdline, |
|||
const char *initrd_filename, const char *cpu_model); |
|||
|
|||
typedef struct QEMUMachine { |
|||
const char *name; |
|||
const char *desc; |
|||
QEMUMachineInitFunc *init; |
|||
struct QEMUMachine *next; |
|||
} QEMUMachine; |
|||
|
|||
int qemu_register_machine(QEMUMachine *m); |
|||
|
|||
/* Axis ETRAX. */ |
|||
extern QEMUMachine bareetraxfs_machine; |
|||
|
|||
/* pc.c */ |
|||
extern QEMUMachine pc_machine; |
|||
extern QEMUMachine isapc_machine; |
|||
|
|||
/* ppc.c */ |
|||
extern QEMUMachine prep_machine; |
|||
extern QEMUMachine core99_machine; |
|||
extern QEMUMachine heathrow_machine; |
|||
extern QEMUMachine ref405ep_machine; |
|||
extern QEMUMachine taihu_machine; |
|||
|
|||
/* mips_r4k.c */ |
|||
extern QEMUMachine mips_machine; |
|||
|
|||
/* mips_malta.c */ |
|||
extern QEMUMachine mips_malta_machine; |
|||
|
|||
/* mips_pica61.c */ |
|||
extern QEMUMachine mips_pica61_machine; |
|||
|
|||
/* mips_mipssim.c */ |
|||
extern QEMUMachine mips_mipssim_machine; |
|||
|
|||
/* shix.c */ |
|||
extern QEMUMachine shix_machine; |
|||
|
|||
/* r2d.c */ |
|||
extern QEMUMachine r2d_machine; |
|||
|
|||
/* sun4m.c */ |
|||
extern QEMUMachine ss5_machine, ss10_machine, ss600mp_machine; |
|||
|
|||
/* sun4u.c */ |
|||
extern QEMUMachine sun4u_machine; |
|||
|
|||
/* integratorcp.c */ |
|||
extern QEMUMachine integratorcp_machine; |
|||
|
|||
/* versatilepb.c */ |
|||
extern QEMUMachine versatilepb_machine; |
|||
extern QEMUMachine versatileab_machine; |
|||
|
|||
/* realview.c */ |
|||
extern QEMUMachine realview_machine; |
|||
|
|||
/* spitz.c */ |
|||
extern QEMUMachine akitapda_machine; |
|||
extern QEMUMachine spitzpda_machine; |
|||
extern QEMUMachine borzoipda_machine; |
|||
extern QEMUMachine terrierpda_machine; |
|||
|
|||
/* palm.c */ |
|||
extern QEMUMachine palmte_machine; |
|||
|
|||
/* gumstix.c */ |
|||
extern QEMUMachine connex_machine; |
|||
|
|||
/* stellaris.c */ |
|||
extern QEMUMachine lm3s811evb_machine; |
|||
extern QEMUMachine lm3s6965evb_machine; |
|||
|
|||
/* an5206.c */ |
|||
extern QEMUMachine an5206_machine; |
|||
|
|||
/* mcf5208.c */ |
|||
extern QEMUMachine mcf5208evb_machine; |
|||
|
|||
/* dummy_m68k.c */ |
|||
extern QEMUMachine dummy_m68k_machine; |
|||
|
|||
#endif |
|||
@ -0,0 +1,19 @@ |
|||
#ifndef QEMU_DEVICES_H |
|||
#define QEMU_DEVICES_H |
|||
|
|||
/* Devices that have nowhere better to go. */ |
|||
|
|||
/* smc91c111.c */ |
|||
void smc91c111_init(NICInfo *, uint32_t, qemu_irq); |
|||
|
|||
/* ssd0323.c */ |
|||
int ssd0323_xfer_ssi(void *opaque, int data); |
|||
void *ssd0323_init(DisplayState *ds, qemu_irq *cmd_p); |
|||
|
|||
/* ads7846.c */ |
|||
struct ads7846_state_s; |
|||
uint32_t ads7846_read(void *opaque); |
|||
void ads7846_write(void *opaque, uint32_t value); |
|||
struct ads7846_state_s *ads7846_init(qemu_irq penirq); |
|||
|
|||
#endif |
|||
@ -0,0 +1,12 @@ |
|||
/* fdc.c */ |
|||
#define MAX_FD 2 |
|||
extern BlockDriverState *fd_table[MAX_FD]; |
|||
|
|||
typedef struct fdctrl_t fdctrl_t; |
|||
|
|||
fdctrl_t *fdctrl_init (qemu_irq irq, int dma_chann, int mem_mapped, |
|||
target_phys_addr_t io_base, |
|||
BlockDriverState **fds); |
|||
fdctrl_t *sun4m_fdctrl_init (qemu_irq irq, target_phys_addr_t io_base, |
|||
BlockDriverState **fds); |
|||
int fdctrl_get_drive_type(fdctrl_t *fdctrl, int drive_num); |
|||
@ -0,0 +1,40 @@ |
|||
/* NOR flash devices */ |
|||
typedef struct pflash_t pflash_t; |
|||
|
|||
pflash_t *pflash_register (target_phys_addr_t base, ram_addr_t off, |
|||
BlockDriverState *bs, |
|||
uint32_t sector_len, int nb_blocs, int width, |
|||
uint16_t id0, uint16_t id1, |
|||
uint16_t id2, uint16_t id3); |
|||
|
|||
/* nand.c */ |
|||
struct nand_flash_s; |
|||
struct nand_flash_s *nand_init(int manf_id, int chip_id); |
|||
void nand_done(struct nand_flash_s *s); |
|||
void nand_setpins(struct nand_flash_s *s, |
|||
int cle, int ale, int ce, int wp, int gnd); |
|||
void nand_getpins(struct nand_flash_s *s, int *rb); |
|||
void nand_setio(struct nand_flash_s *s, uint8_t value); |
|||
uint8_t nand_getio(struct nand_flash_s *s); |
|||
|
|||
#define NAND_MFR_TOSHIBA 0x98 |
|||
#define NAND_MFR_SAMSUNG 0xec |
|||
#define NAND_MFR_FUJITSU 0x04 |
|||
#define NAND_MFR_NATIONAL 0x8f |
|||
#define NAND_MFR_RENESAS 0x07 |
|||
#define NAND_MFR_STMICRO 0x20 |
|||
#define NAND_MFR_HYNIX 0xad |
|||
#define NAND_MFR_MICRON 0x2c |
|||
|
|||
/* ecc.c */ |
|||
struct ecc_state_s { |
|||
uint8_t cp; /* Column parity */ |
|||
uint16_t lp[2]; /* Line parity */ |
|||
uint16_t count; |
|||
}; |
|||
|
|||
uint8_t ecc_digest(struct ecc_state_s *s, uint8_t sample); |
|||
void ecc_reset(struct ecc_state_s *s); |
|||
void ecc_put(QEMUFile *f, struct ecc_state_s *s); |
|||
void ecc_get(QEMUFile *f, struct ecc_state_s *s); |
|||
|
|||
@ -0,0 +1,99 @@ |
|||
/* Declarations for use by hardware emulation. */ |
|||
#ifndef QEMU_HW_H |
|||
#define QEMU_HW_H |
|||
|
|||
#include "qemu-common.h" |
|||
#include "irq.h" |
|||
|
|||
/* VM Load/Save */ |
|||
|
|||
QEMUFile *qemu_fopen(const char *filename, const char *mode); |
|||
void qemu_fflush(QEMUFile *f); |
|||
void qemu_fclose(QEMUFile *f); |
|||
void qemu_put_buffer(QEMUFile *f, const uint8_t *buf, int size); |
|||
void qemu_put_byte(QEMUFile *f, int v); |
|||
void qemu_put_be16(QEMUFile *f, unsigned int v); |
|||
void qemu_put_be32(QEMUFile *f, unsigned int v); |
|||
void qemu_put_be64(QEMUFile *f, uint64_t v); |
|||
int qemu_get_buffer(QEMUFile *f, uint8_t *buf, int size); |
|||
int qemu_get_byte(QEMUFile *f); |
|||
unsigned int qemu_get_be16(QEMUFile *f); |
|||
unsigned int qemu_get_be32(QEMUFile *f); |
|||
uint64_t qemu_get_be64(QEMUFile *f); |
|||
|
|||
static inline void qemu_put_be64s(QEMUFile *f, const uint64_t *pv) |
|||
{ |
|||
qemu_put_be64(f, *pv); |
|||
} |
|||
|
|||
static inline void qemu_put_be32s(QEMUFile *f, const uint32_t *pv) |
|||
{ |
|||
qemu_put_be32(f, *pv); |
|||
} |
|||
|
|||
static inline void qemu_put_be16s(QEMUFile *f, const uint16_t *pv) |
|||
{ |
|||
qemu_put_be16(f, *pv); |
|||
} |
|||
|
|||
static inline void qemu_put_8s(QEMUFile *f, const uint8_t *pv) |
|||
{ |
|||
qemu_put_byte(f, *pv); |
|||
} |
|||
|
|||
static inline void qemu_get_be64s(QEMUFile *f, uint64_t *pv) |
|||
{ |
|||
*pv = qemu_get_be64(f); |
|||
} |
|||
|
|||
static inline void qemu_get_be32s(QEMUFile *f, uint32_t *pv) |
|||
{ |
|||
*pv = qemu_get_be32(f); |
|||
} |
|||
|
|||
static inline void qemu_get_be16s(QEMUFile *f, uint16_t *pv) |
|||
{ |
|||
*pv = qemu_get_be16(f); |
|||
} |
|||
|
|||
static inline void qemu_get_8s(QEMUFile *f, uint8_t *pv) |
|||
{ |
|||
*pv = qemu_get_byte(f); |
|||
} |
|||
|
|||
#ifdef NEED_CPU_H |
|||
#if TARGET_LONG_BITS == 64 |
|||
#define qemu_put_betl qemu_put_be64 |
|||
#define qemu_get_betl qemu_get_be64 |
|||
#define qemu_put_betls qemu_put_be64s |
|||
#define qemu_get_betls qemu_get_be64s |
|||
#else |
|||
#define qemu_put_betl qemu_put_be32 |
|||
#define qemu_get_betl qemu_get_be32 |
|||
#define qemu_put_betls qemu_put_be32s |
|||
#define qemu_get_betls qemu_get_be32s |
|||
#endif |
|||
#endif |
|||
|
|||
int64_t qemu_ftell(QEMUFile *f); |
|||
int64_t qemu_fseek(QEMUFile *f, int64_t pos, int whence); |
|||
|
|||
typedef void SaveStateHandler(QEMUFile *f, void *opaque); |
|||
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); |
|||
|
|||
int register_savevm(const char *idstr, |
|||
int instance_id, |
|||
int version_id, |
|||
SaveStateHandler *save_state, |
|||
LoadStateHandler *load_state, |
|||
void *opaque); |
|||
|
|||
typedef void QEMUResetHandler(void *opaque); |
|||
|
|||
void qemu_register_reset(QEMUResetHandler *func, void *opaque); |
|||
|
|||
/* These should really be in isa.h, but are here to make pc.h happy. */ |
|||
typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); |
|||
typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); |
|||
|
|||
#endif |
|||
@ -0,0 +1,24 @@ |
|||
/* ISA bus */ |
|||
|
|||
extern target_phys_addr_t isa_mem_base; |
|||
|
|||
int register_ioport_read(int start, int length, int size, |
|||
IOPortReadFunc *func, void *opaque); |
|||
int register_ioport_write(int start, int length, int size, |
|||
IOPortWriteFunc *func, void *opaque); |
|||
void isa_unassign_ioport(int start, int length); |
|||
|
|||
void isa_mmio_init(target_phys_addr_t base, target_phys_addr_t size); |
|||
|
|||
/* dma.c */ |
|||
int DMA_get_channel_mode (int nchan); |
|||
int DMA_read_memory (int nchan, void *buf, int pos, int size); |
|||
int DMA_write_memory (int nchan, void *buf, int pos, int size); |
|||
void DMA_hold_DREQ (int nchan); |
|||
void DMA_release_DREQ (int nchan); |
|||
void DMA_schedule(int nchan); |
|||
void DMA_run (void); |
|||
void DMA_init (int high_page_enable); |
|||
void DMA_register_channel (int nchan, |
|||
DMA_transfer_handler transfer_handler, |
|||
void *opaque); |
|||
@ -1,13 +0,0 @@ |
|||
#if !defined (__M48T59_H__) |
|||
#define __M48T59_H__ |
|||
|
|||
typedef struct m48t59_t m48t59_t; |
|||
|
|||
void m48t59_write (void *private, uint32_t addr, uint32_t val); |
|||
uint32_t m48t59_read (void *private, uint32_t addr); |
|||
void m48t59_toggle_lock (void *private, int lock); |
|||
m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base, |
|||
uint32_t io_base, uint16_t size, |
|||
int type); |
|||
|
|||
#endif /* !defined (__M48T59_H__) */ |
|||
@ -0,0 +1,21 @@ |
|||
#ifndef HW_MCF_H |
|||
#define HW_MCF_H |
|||
/* Motorola ColdFire device prototypes. */ |
|||
|
|||
/* mcf_uart.c */ |
|||
uint32_t mcf_uart_read(void *opaque, target_phys_addr_t addr); |
|||
void mcf_uart_write(void *opaque, target_phys_addr_t addr, uint32_t val); |
|||
void *mcf_uart_init(qemu_irq irq, CharDriverState *chr); |
|||
void mcf_uart_mm_init(target_phys_addr_t base, qemu_irq irq, |
|||
CharDriverState *chr); |
|||
|
|||
/* mcf_intc.c */ |
|||
qemu_irq *mcf_intc_init(target_phys_addr_t base, CPUState *env); |
|||
|
|||
/* mcf_fec.c */ |
|||
void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq); |
|||
|
|||
/* mcf5206.c */ |
|||
qemu_irq *mcf5206_init(uint32_t base, CPUState *env); |
|||
|
|||
#endif |
|||
@ -0,0 +1,25 @@ |
|||
#ifndef HW_MIPS_H |
|||
#define HW_MIPS_H |
|||
/* Definitions for mips board emulation. */ |
|||
|
|||
/* gt64xxx.c */ |
|||
PCIBus *pci_gt64120_init(qemu_irq *pic); |
|||
|
|||
/* ds1225y.c */ |
|||
typedef struct ds1225y_t ds1225y_t; |
|||
ds1225y_t *ds1225y_init(target_phys_addr_t mem_base, const char *filename); |
|||
|
|||
/* mipsnet.c */ |
|||
void mipsnet_init(int base, qemu_irq irq, NICInfo *nd); |
|||
|
|||
/* jazz_led.c */ |
|||
extern void jazz_led_init(DisplayState *ds, target_phys_addr_t base); |
|||
|
|||
/* mips_int.c */ |
|||
extern void cpu_mips_irq_init_cpu(CPUState *env); |
|||
|
|||
/* mips_timer.c */ |
|||
extern void cpu_mips_clock_init(CPUState *); |
|||
extern void cpu_mips_irqctrl_init (void); |
|||
|
|||
#endif |
|||
@ -0,0 +1,41 @@ |
|||
#ifndef NVRAM_H |
|||
#define NVRAM_H |
|||
|
|||
/* NVRAM helpers */ |
|||
typedef uint32_t (*nvram_read_t)(void *private, uint32_t addr); |
|||
typedef void (*nvram_write_t)(void *private, uint32_t addr, uint32_t val); |
|||
typedef struct nvram_t { |
|||
void *opaque; |
|||
nvram_read_t read_fn; |
|||
nvram_write_t write_fn; |
|||
} nvram_t; |
|||
|
|||
void NVRAM_set_byte (nvram_t *nvram, uint32_t addr, uint8_t value); |
|||
uint8_t NVRAM_get_byte (nvram_t *nvram, uint32_t addr); |
|||
void NVRAM_set_word (nvram_t *nvram, uint32_t addr, uint16_t value); |
|||
uint16_t NVRAM_get_word (nvram_t *nvram, uint32_t addr); |
|||
void NVRAM_set_lword (nvram_t *nvram, uint32_t addr, uint32_t value); |
|||
uint32_t NVRAM_get_lword (nvram_t *nvram, uint32_t addr); |
|||
void NVRAM_set_string (nvram_t *nvram, uint32_t addr, |
|||
const unsigned char *str, uint32_t max); |
|||
int NVRAM_get_string (nvram_t *nvram, uint8_t *dst, uint16_t addr, int max); |
|||
void NVRAM_set_crc (nvram_t *nvram, uint32_t addr, |
|||
uint32_t start, uint32_t count); |
|||
int PPC_NVRAM_set_params (nvram_t *nvram, uint16_t NVRAM_size, |
|||
const unsigned char *arch, |
|||
uint32_t RAM_size, int boot_device, |
|||
uint32_t kernel_image, uint32_t kernel_size, |
|||
const char *cmdline, |
|||
uint32_t initrd_image, uint32_t initrd_size, |
|||
uint32_t NVRAM_image, |
|||
int width, int height, int depth); |
|||
typedef struct m48t59_t m48t59_t; |
|||
|
|||
void m48t59_write (void *private, uint32_t addr, uint32_t val); |
|||
uint32_t m48t59_read (void *private, uint32_t addr); |
|||
void m48t59_toggle_lock (void *private, int lock); |
|||
m48t59_t *m48t59_init (qemu_irq IRQ, target_phys_addr_t mem_base, |
|||
uint32_t io_base, uint16_t size, |
|||
int type); |
|||
|
|||
#endif /* !NVRAM_H */ |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue