Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions hw/xfree86/int10/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
#include "xf86x86emu.h"
#include "Pci.h"

#define BIOS_SIZE 0x10000
#define LOW_PAGE_SIZE 0x600
#define V_RAM 0xA0000
#define VRAM_SIZE 0x20000
#define V_BIOS_SIZE 0x10000

#define ALLOC_ENTRIES(x) ((V_RAM / (x)) - 1)

#include <string.h> /* needed for memmove */
Expand Down
6 changes: 6 additions & 0 deletions hw/xfree86/int10/helper_exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
#endif
#include <pciaccess.h>

#define BIOS_SCRATCH_OFF 0x449
#define BIOS_SCRATCH_END 0x466
#define BIOS_SCRATCH_LEN (BIOS_SCRATCH_END - BIOS_SCRATCH_OFF + 1)

#define SEG_ADR(type, seg, reg) type((seg << 4) + (X86_##reg))

static int pciCfg1in(uint16_t addr, uint32_t *val);
static int pciCfg1out(uint16_t addr, uint32_t val);
static int pciCfg1inw(uint16_t addr, uint16_t *val);
Expand Down
2 changes: 2 additions & 0 deletions hw/xfree86/int10/helper_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "xf86Pci.h"
#include "xf86int10_priv.h"

#define SYS_SIZE 0x100000

typedef enum {
OPT_NOINT10,
OPT_INIT_PRIMARY,
Expand Down
7 changes: 7 additions & 0 deletions hw/xfree86/int10/xf86int10.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
#include "xf86x86emu.h"
#include "Pci.h"

#define I_S_DEFAULT_INT_VECT 0xFF065

/* EFLAGS register bit masks */
#define X86_CARRY_MASK 0x00000001
#define X86_IF_MASK 0x00000200
#define X86_IOPL_MASK 0x00003000

xf86Int10InfoPtr Int10Current = NULL;

static int int1A_handler(xf86Int10InfoPtr pInt);
Expand Down
17 changes: 0 additions & 17 deletions hw/xfree86/int10/xf86int10_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,8 @@ typedef struct {
} legacyVGARec, *legacyVGAPtr;

/* Private macros and constants */
#define I_S_DEFAULT_INT_VECT 0xFF065
#define SYS_SIZE 0x100000
#define SYS_BIOS 0xF0000
#define BIOS_SIZE 0x10000
#define LOW_PAGE_SIZE 0x600
#define V_RAM 0xA0000
#define VRAM_SIZE 0x20000
#define V_BIOS_SIZE 0x10000
#define V_BIOS 0xC0000
#define BIOS_SCRATCH_OFF 0x449
#define BIOS_SCRATCH_END 0x466
#define BIOS_SCRATCH_LEN (BIOS_SCRATCH_END - BIOS_SCRATCH_OFF + 1)
#define SEG_ADR(type, seg, reg) type((seg << 4) + (X86_##reg))

/* EFLAGS register bit masks */
#define X86_CARRY_MASK 0x00000001
#define X86_TF_MASK 0x00000100
#define X86_IF_MASK 0x00000200
#define X86_IOPL_MASK 0x00003000

#define MEM_RB(name, addr) (*(name)->mem->rb)((name), (addr))
#define MEM_RW(name, addr) (*(name)->mem->rw)((name), (addr))
Expand Down
Loading