#define PROF_CTL_PTR m7_p1 /* location of info struct */
#define PROF_MEM_PTR m7_p2 /* location of profiling data */
-/* Field names for SYS_READBIOS. */
-#define RDB_SIZE m2_i1
-#define RDB_ADDR m2_l1
-#define RDB_BUF m2_p1
-
/* Field names for SYS_VMCTL. */
#define SVMCTL_WHO m1_i1
#define SVMCTL_PARAM m1_i2 /* All SYS_VMCTL requests. */
} mess_11;
_ASSERT_MSG_SIZE(mess_11);
+typedef struct {
+ size_t size;
+ phys_bytes addr;
+ vir_bytes buf;
+
+ uint8_t padding[44];
+} mess_lsys_krn_readbios;
+_ASSERT_MSG_SIZE(mess_lsys_krn_readbios);
+
typedef struct {
off_t offset;
void *addr;
mess_notify m_notify;
mess_sigcalls m_sigcalls;
+ mess_lsys_krn_readbios m_lsys_krn_readbios;
mess_input_tty_event m_input_tty_event;
mess_krn_lsys_schedule m_krn_lsys_schedule;
* 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
+ * m_lsys_krn_readbios.size number of bytes to copy
+ * m_lsys_krn_readbios.addr absolute address in BIOS area
+ * m_lsys_krn_readbios.buf buffer address in requesting process
*/
#include "kernel/system.h"
int do_readbios(struct proc * caller, message * m_ptr)
{
struct vir_addr src, dst;
- vir_bytes len = m_ptr->RDB_SIZE, limit;
+ size_t len = m_ptr->m_lsys_krn_readbios.size;
+ vir_bytes limit;
- src.offset = m_ptr->RDB_ADDR;
- dst.offset = (vir_bytes) m_ptr->RDB_BUF;
+ src.offset = m_ptr->m_lsys_krn_readbios.addr;
+ dst.offset = m_ptr->m_lsys_krn_readbios.buf;
src.proc_nr_e = NONE;
dst.proc_nr_e = m_ptr->m_source;
!USERRANGE(BASE_MEM_TOP, UPPER_MEM_END))
return EPERM;
- return virtual_copy_vmcheck(caller, &src, &dst, m_ptr->RDB_SIZE);
+ return virtual_copy_vmcheck(caller, &src, &dst, m_ptr->m_lsys_krn_readbios.size);
}
/* Read data from BIOS locations */
message m;
- m.RDB_SIZE = size;
- m.RDB_ADDR = address;
- m.RDB_BUF = buf;
+ m.m_lsys_krn_readbios.size = size;
+ m.m_lsys_krn_readbios.addr = address;
+ m.m_lsys_krn_readbios.buf = buf;
return(_kernel_call(SYS_READBIOS, &m));
}