SYSENTER/SYSCALL support
. add cpufeature detection of both . use it for both ipc and kernelcall traps, using a register for call number . SYSENTER/SYSCALL does not save any context, therefore userland has to save it . to accomodate multiple kernel entry/exit types, the entry type is recorded in the process struct. hitherto all types were interrupt (soft int, exception, hard int); now SYSENTER/SYSCALL is new, with the difference that context is not fully restored from proc struct when running the process again. this can't be done as some information is missing. . complication: cases in which the kernel has to fully change process context (i.e. sigreturn). in that case the exit type is changed from SYSENTER/SYSEXIT to soft-int (i.e. iret) and context is fully restored from the proc struct. this does mean the PC and SP must change, as the sysenter/sysexit userland code will otherwise try to restore its own context. this is true in the sigreturn case. . override all usage by setting libc_ipc=1
This commit is contained in:
@@ -294,6 +294,10 @@ void exec_bootproc(struct vmproc *vmp, struct boot_image *ip)
|
||||
if(sys_exec(vmp->vm_endpoint, (char *) execi->stack_high - 12,
|
||||
(char *) ip->proc_name, execi->pc) != OK)
|
||||
panic("vm: boot process exec of %d failed\n", vmp->vm_endpoint);
|
||||
|
||||
/* make it runnable */
|
||||
if(sys_vmctl(vmp->vm_endpoint, VMCTL_BOOTINHIBIT_CLEAR, 0) != OK)
|
||||
panic("VMCTL_BOOTINHIBIT_CLEAR failed");
|
||||
}
|
||||
|
||||
void init_vm(void)
|
||||
@@ -301,6 +305,7 @@ void init_vm(void)
|
||||
int s, i;
|
||||
static struct memory mem_chunks[NR_MEMS];
|
||||
static struct boot_image *ip;
|
||||
extern void __minix_init(void);
|
||||
|
||||
#if SANITYCHECKS
|
||||
incheck = nocheck = 0;
|
||||
@@ -414,6 +419,11 @@ void init_vm(void)
|
||||
|
||||
/* Initialize the structures for queryexit */
|
||||
init_query_exit();
|
||||
|
||||
/* Acquire kernel ipc vectors that weren't available
|
||||
* before VM had determined kernel mappings
|
||||
*/
|
||||
__minix_init();
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
|
||||
Reference in New Issue
Block a user