i10_vbios.c File Reference

#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/stat.h>
#include <setjmp.h>
#include <sys/perm.h>
#include "v86bios.h"
#include "pci.h"
#include "AsmMacros.h"
#include "vbios.h"

Defines

#define SIZE   0x100000
#define VRAM_START   0xA0000
#define VRAM_SIZE   0x1FFFF
#define V_BIOS_SIZE   0x1FFFF
#define BIOS_START   0x7C00

Functions

void log_err (char *format,...) __attribute__((format(printf
static int int10_bios_ok (void)
static int map (void)
static void unmap (void)
static int map_vram (hd_data_t *hd_data)
static void unmap_vram (void)
static int copy_vbios (hd_data_t *hd_data)
static int copy_bios_ram (hd_data_t *hd_data)
static int setup_system_bios (hd_data_t *hd_data)
static void setup_int_vect (void)
static int chksum (CARD8 *start)
void loadCodeToMem (unsigned char *ptr, CARD8 *code)
static void sigsegv_handler (int)
int InitInt10 (hd_data_t *hd_data, int pci_cfg_method)
void FreeInt10 ()
int CallInt10 (int *ax, int *bx, int *cx, unsigned char *buf, int len, int cpuemu)

Variables

static CARD8 code [] = { 0xcd, 0x10, 0xf4 }
static int vram_mapped = 0
static int int10inited = 0
static sigjmp_buf longjmp_buf

Define Documentation

#define BIOS_START   0x7C00

Referenced by CallInt10(), and map().

#define SIZE   0x100000

Referenced by map(), and unmap().

#define V_BIOS_SIZE   0x1FFFF
#define VRAM_SIZE   0x1FFFF

Referenced by map_vram(), and unmap_vram().

#define VRAM_START   0xA0000

Referenced by map_vram(), and unmap_vram().


Function Documentation

int CallInt10 ( int *  ax,
int *  bx,
int *  cx,
unsigned char *  buf,
int  len,
int  cpuemu 
)
int chksum ( CARD8 start  )  [static]

References log_err(), and val.

Referenced by copy_vbios().

static int copy_bios_ram ( hd_data_t hd_data  )  [static]

References hd_read_mmap(), and MEM_FILE.

Referenced by InitInt10().

int copy_vbios ( hd_data_t hd_data  )  [static]
void FreeInt10 ( void   ) 

References unmap(), and unmap_vram().

Referenced by get_vbe_info().

int InitInt10 ( hd_data_t hd_data,
int  pci_cfg_method 
)
int int10_bios_ok ( void   )  [static]

References regs86::cs, and log_err().

Referenced by InitInt10().

void loadCodeToMem ( unsigned char *  ptr,
CARD8 code 
)

Referenced by CallInt10(), and map().

void log_err ( char *  format,
  ... 
)
int map ( void   )  [static]

References BIOS_START, loadCodeToMem(), and SIZE.

Referenced by InitInt10().

int map_vram ( hd_data_t hd_data  )  [static]

References log_err(), MEM_FILE, VRAM_SIZE, and VRAM_START.

Referenced by InitInt10().

static void setup_int_vect ( void   )  [static]

References regs86::cs.

Referenced by InitInt10().

static int setup_system_bios ( hd_data_t hd_data  )  [static]

Referenced by InitInt10().

void sigsegv_handler ( int  num  )  [static]

Referenced by CallInt10().

void unmap ( void   )  [static]

References SIZE.

Referenced by FreeInt10(), and InitInt10().

void unmap_vram ( void   )  [static]

References VRAM_SIZE, and VRAM_START.

Referenced by FreeInt10().


Variable Documentation

CARD8 code[] = { 0xcd, 0x10, 0xf4 } [static]

Referenced by do_ht().

int int10inited = 0 [static]
sigjmp_buf longjmp_buf [static]
int vram_mapped = 0 [static]