minix/kernel/arch/i386/do_int86.c
Arun Thomas 2a8fabf4ad Include directory reorg and makefile updates.
-Convert the include directory over to using bsdmake
 syntax
-Update/add mkfiles
-Modify install(1) so that it can create symlinks
-Update makefiles to use new install(1) options
-Rename /usr/include/ibm to /usr/include/i386
-Create /usr/include/machine symlink to arch header files
-Move vm_i386.h to its new home in the /usr/include/i386
-Update source files to #include the header files at their
 new homes.
-Add new gnu-includes target for building GCC headers
2010-03-08 11:04:59 +00:00

39 lines
1.1 KiB
C

/* The kernel call implemented in this file:
* m_type: SYS_INT86
*
* The parameters for this kernel call are:
* m1_p1: INT86_REG86
*/
#include "../../system.h"
#include <minix/type.h>
#include <minix/endpoint.h>
#include <machine/int86.h>
#include "proto.h"
struct reg86u reg86;
/*===========================================================================*
* do_int86 *
*===========================================================================*/
PUBLIC int do_int86(struct proc * caller, message * m_ptr)
{
data_copy(caller->p_endpoint, (vir_bytes) m_ptr->INT86_REG86,
KERNEL, (vir_bytes) &reg86, sizeof(reg86));
int86();
/* Copy results back to the caller */
data_copy(KERNEL, (vir_bytes) &reg86,
caller->p_endpoint, (vir_bytes) m_ptr->INT86_REG86, sizeof(reg86));
/* The BIOS call eats interrupts. Call get_randomness to generate some
* entropy. Normally, get_randomness is called from an interrupt handler.
* Figuring out the exact source is too complicated. CLOCK_IRQ is normally
* not very random.
*/
get_randomness(&krandom, CLOCK_IRQ);
return(OK);
}