2006-07-10 14:27:26 +02:00
|
|
|
/* The kernel call implemented in this file:
|
|
|
|
* m_type: SYS_READBIOS
|
|
|
|
*
|
|
|
|
* The parameters for this kernel call are:
|
|
|
|
* m2_i1: RDB_SIZE number of bytes to copy
|
|
|
|
* m2_l1: RDB_ADDR absolute address in BIOS area
|
|
|
|
* m2_p1: RDB_BUF buffer address in requesting process
|
|
|
|
*/
|
|
|
|
|
2010-04-02 00:22:33 +02:00
|
|
|
#include "kernel/system.h"
|
2006-07-10 14:27:26 +02:00
|
|
|
#include <minix/type.h>
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* do_readbios *
|
|
|
|
*===========================================================================*/
|
2010-02-03 10:04:48 +01:00
|
|
|
PUBLIC int do_readbios(struct proc * caller, message * m_ptr)
|
2006-07-10 14:27:26 +02:00
|
|
|
{
|
2008-11-19 13:26:10 +01:00
|
|
|
struct vir_addr src, dst;
|
|
|
|
|
|
|
|
src.segment = BIOS_SEG;
|
|
|
|
dst.segment = D;
|
|
|
|
src.offset = m_ptr->RDB_ADDR;
|
|
|
|
dst.offset = (vir_bytes) m_ptr->RDB_BUF;
|
|
|
|
src.proc_nr_e = NONE;
|
|
|
|
dst.proc_nr_e = m_ptr->m_source;
|
2006-07-10 14:27:26 +02:00
|
|
|
|
2010-02-03 10:04:48 +01:00
|
|
|
return virtual_copy_vmcheck(caller, &src, &dst, m_ptr->RDB_SIZE);
|
2006-07-10 14:27:26 +02:00
|
|
|
}
|