 2d72cbec41
			
		
	
	
		2d72cbec41
		
	
	
	
	
		
			
			. 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
		
			
				
	
	
		
			31 lines
		
	
	
		
			939 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			939 B
		
	
	
	
		
			C
		
	
	
	
	
	
| 
 | |
| #ifndef _MINIX_CPUFEATURE_H
 | |
| #define _MINIX_CPUFEATURE_H 1
 | |
| 
 | |
| #define _CPUF_I386_FPU		0	/* FPU-x87 FPU on Chip */
 | |
| #define _CPUF_I386_PSE 		1	/* Page Size Extension */
 | |
| #define _CPUF_I386_PGE 		2	/* Page Global Enable */
 | |
| #define _CPUF_I386_APIC_ON_CHIP	3	/* APIC is present on the chip */
 | |
| #define _CPUF_I386_TSC		4	/* Timestamp counter present */
 | |
| #define _CPUF_I386_SSE1234_12	5	/* Support for SSE/SSE2/SSE3/SSSE3/SSE4
 | |
| 					 * Extensions and FXSR
 | |
| 					 */
 | |
| #define _CPUF_I386_FXSR		6
 | |
| #define _CPUF_I386_SSE		7
 | |
| #define _CPUF_I386_SSE2		8
 | |
| #define _CPUF_I386_SSE3		9
 | |
| #define _CPUF_I386_SSSE3	10
 | |
| #define _CPUF_I386_SSE4_1	11
 | |
| #define _CPUF_I386_SSE4_2	12
 | |
| 
 | |
| #define _CPUF_I386_HTT		13	/* Supports HTT */
 | |
| #define _CPUF_I386_HTT_MAX_NUM	14	/* Maximal num of threads */
 | |
| 
 | |
| #define _CPUF_I386_MTRR		15
 | |
| #define _CPUF_I386_SYSENTER	16	/* Intel SYSENTER instrs */
 | |
| #define _CPUF_I386_SYSCALL	17	/* AMD SYSCALL instrs */
 | |
| 
 | |
| int _cpufeature(int featureno);
 | |
| 
 | |
| #endif
 |