Axel Dörfler 15173df4e9 Last patch of the vm86 patch series from Jan Klötzke - thanks!:
* The new function vm86_do_int(struct vm86_state *state, uint8 vec) provides a
  facility to call BIOS interupt handlers. The function must only be called from
  a user thread context because the lower 1MB of the address space is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 13:54:28 +00:00

39 lines
736 B
C

/*
* Copyright 2008 Jan Klötzke
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef _VM86_H
#define _VM86_H
#include <OS.h>
#include <arch_cpu.h>
#ifdef __cplusplus
extern "C" {
#endif
#define VM86_MIN_RAM_SIZE 0x1000
#define RETURN_TO_32_INT 255
struct vm86_state {
struct vm86_iframe regs;
area_id bios_area;
area_id ram_area;
unsigned int if_flag : 1;
};
status_t x86_vm86_enter(struct vm86_iframe *frame);
void x86_vm86_return(struct vm86_iframe *frame, status_t retval);
status_t vm86_prepare(struct vm86_state *state, unsigned int ram_size);
void vm86_cleanup(struct vm86_state *state);
status_t vm86_do_int(struct vm86_state *state, uint8 vec);
#ifdef __cplusplus
}
#endif
#endif