2 * The x86 Linux incarnation of arch-dependent OS-dependent routines.
7 /* header files lifted wholesale from linux-os.c, some may be redundant */
10 #include <sys/param.h>
16 #include "interrupt.h"
20 #include <sys/socket.h>
21 #include <sys/utsname.h>
23 #include <sys/types.h>
25 /* #include <sys/sysinfo.h> */
31 size_t os_vm_page_size;
33 #if defined GENCGC /* unlikely ... */
37 sigcontext_register_t *
38 os_context_register_addr(os_context_t *context, int offset)
40 return &context->uc_mcontext.sc_regs[offset];
43 sigcontext_register_t *
44 os_context_fpregister_addr(os_context_t *context, int offset)
46 return &context->uc_mcontext.sc_fpregs[offset];
49 sigcontext_register_t *
50 os_context_pc_addr(os_context_t *context)
52 return &((context->uc_mcontext).sc_pc);
54 sigcontext_register_t *
55 os_context_sp_addr(os_context_t *context)
57 lose("This was supposed to be an x86-only operation");
62 os_context_sigmask_addr(os_context_t *context)
64 return &context->uc_sigmask;
67 void os_flush_icache(os_vm_address_t address, os_vm_size_t length)
69 /* XXX this really shouldn't be empty
71 <dhd> dan_b: asm volatile ("call_pal imb")
73 <dhd> also : : "memory"