libhd
5.0
|
#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"
Macros | |
#define | SIZE 0x100000 |
#define | VRAM_START 0xA0000 |
#define | VRAM_SIZE 0x1FFFF |
#define | V_BIOS_SIZE 0x1FFFF |
#define | BIOS_START 0x7C00 /* default BIOS entry */ |
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 BIOS_START 0x7C00 /* default BIOS entry */ |
Referenced by CallInt10(), and map().
#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().
int CallInt10 | ( | int * | ax, |
int * | bx, | ||
int * | cx, | ||
unsigned char * | buf, | ||
int | len, | ||
int | cpuemu | ||
) |
References i86biosRegs::ax, BIOS_START, i86biosRegs::bx, i86biosRegs::cx, i86biosRegs::di, do_x86(), i86biosRegs::dx, i86biosRegs::es, loadCodeToMem(), log_err(), sigsegv_handler(), and void().
Referenced by get_vbe_info(), and read_vbe_info().
|
static |
References log_err(), and val.
Referenced by copy_vbios().
|
static |
References hd_read_mmap(), and MEM_FILE.
Referenced by InitInt10().
|
static |
References chksum(), hd_data_t::flag_struct::cpuemu, hd_data_t::flags, hd_read_mmap(), log_err(), MEM_FILE, hd_data_t::flag_struct::nobioscrc, and V_BIOS.
Referenced by InitInt10().
References unmap(), and unmap_vram().
Referenced by get_vbe_info().
int InitInt10 | ( | hd_data_t * | hd_data, |
int | pci_cfg_method | ||
) |
References pciStructRec::active, hd_data_t::flag_struct::biosvram, copy_bios_ram(), copy_vbios(), CurrentPci, hd_data_t::flags, int10_bios_ok(), map(), map_vram(), pciStructRec::next, scan_pci(), setup_int_vect(), setup_io(), setup_system_bios(), and unmap().
Referenced by get_vbe_info().
|
static |
References regs86::cs, and log_err().
Referenced by InitInt10().
Referenced by CallInt10(), and map().
void log_err | ( | char * | format, |
... | |||
) |
|
static |
References BIOS_START, loadCodeToMem(), and SIZE.
Referenced by InitInt10().
|
static |
References log_err(), MEM_FILE, VRAM_SIZE, and VRAM_START.
Referenced by InitInt10().
References regs86::cs.
Referenced by InitInt10().
|
static |
Referenced by InitInt10().
|
static |
Referenced by CallInt10().
References SIZE.
Referenced by FreeInt10(), and InitInt10().
References VRAM_SIZE, and VRAM_START.
Referenced by FreeInt10().
|
static |
|
static |
|
static |