minix/kernel/arch/i386/do_int86.c
Tomas Hruby 391fd926ff TASK_PRIVILEGE and level0() removed
- there are no tasks running, we don't need TASK_PRIVILEGE priviledge anymore

- as there is no ring 1 anymore, there is no need for level0() to call sensitive
  code from ring 1 in ring 0

- 286 related macros removed as clean up
2010-02-09 15:23:31 +00:00

42 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 <minix/portio.h>
#include <ibm/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.
*/
lock;
get_randomness(&krandom, CLOCK_IRQ);
unlock;
return(OK);
}