diff options
author | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2006-06-13 03:01:05 +0000 |
---|---|---|
committer | Gordon Willem Klok <gwk@cvs.openbsd.org> | 2006-06-13 03:01:05 +0000 |
commit | 8a6f1477abe14b169bc7e1977f9a9ff9e77cf09d (patch) | |
tree | d3cfaddcb92885d546d5280df7015ab6f73b1770 /sys/arch/i386/include | |
parent | 482ad5e66b0a1212d730146a456a67bd6e3603b5 (diff) |
Kernel virtual mode 8086, currently disabled in GENERIC.
lots of help at c2k6 and after from toby@,
ok toby@, mickey@
Diffstat (limited to 'sys/arch/i386/include')
-rw-r--r-- | sys/arch/i386/include/kvm86.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/sys/arch/i386/include/kvm86.h b/sys/arch/i386/include/kvm86.h new file mode 100644 index 00000000000..358208200fb --- /dev/null +++ b/sys/arch/i386/include/kvm86.h @@ -0,0 +1,43 @@ +/* $OpenBSD: kvm86.h,v 1.1 2006/06/13 03:01:04 gwk Exp $ */ +/* + * Copyright (c) 2006 Gordon Willem Klok <gwk@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifndef _I386_KVM86_H_ +#define _I386_KVM86_H_ + +struct kvm86regs { + uint32_t eax; + uint32_t ebx; + uint32_t ecx; + uint32_t edx; + uint32_t esi; + uint32_t edi; + uint32_t eflags; + uint32_t es; +}; + +extern int kvm86_incall; + +void kvm86_init(void); +void kvm86_gpfault(struct trapframe *); + +void *kvm86_bios_addpage(uint32_t); +void kvm86_bios_delpage(uint32_t, void *); +size_t kvm86_bios_read(uint32_t, char *, size_t); + +int kvm86_bioscall(int, struct trapframe *); +int kvm86_simplecall(int, struct kvm86regs *); + +#endif |