 b6ea15115c
			
		
	
	
		b6ea15115c
		
	
	
	
	
		
			
			. map all objects named usermapped_*.o with globally visible pages; usermapped_glo_*.o with the VM 'global' bit on, i.e. permanently in tlb (very scarce resource!) . added kinfo, machine, kmessages and loadinfo for a start . modified log, tty to make use of the shared messages struct
		
			
				
	
	
		
			95 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
			
		
		
	
	
			95 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			ArmAsm
		
	
	
	
	
	
| #include <minix/ipcconst.h>
 | |
| #include <machine/asm.h>
 | |
| 
 | |
| 	IPCVEC = 33	/* ipc trap to kernel  */
 | |
| 	KERVEC = 32	/* syscall trap to kernel */
 | |
| 
 | |
| 	SRC_DST = 8	/* source/ destination process  */
 | |
| 	MESSAGE = 12	/* message pointer  */
 | |
| 	STATUS = 16	/* status pointer  */
 | |
| 
 | |
| /**========================================================================* */
 | |
| /*                           IPC assembly routines			  * */
 | |
| /**========================================================================* */
 | |
| /* all message passing routines save ebx, but destroy eax and ecx. */
 | |
| ENTRY(_send)
 | |
| 	push	%ebp
 | |
| 	movl	%esp, %ebp
 | |
| 	push	%ebx
 | |
| 	movl	SRC_DST(%ebp), %eax	/* eax = dest-src */
 | |
| 	movl	MESSAGE(%ebp), %ebx	/* ebx = message pointer */
 | |
| 	movl	$SEND, %ecx	/* _send(dest, ptr) */
 | |
| 	int	$IPCVEC	/* trap to the kernel */
 | |
| 	pop	%ebx
 | |
| 	pop	%ebp
 | |
| 	ret
 | |
| 
 | |
| ENTRY(_receive)
 | |
| 	push	%ebp
 | |
| 	movl	%esp, %ebp
 | |
| 	push	%ebx
 | |
| 	movl	SRC_DST(%ebp), %eax	/* eax = dest-src */
 | |
| 	movl	MESSAGE(%ebp), %ebx	/* ebx = message pointer */
 | |
| 	movl	$RECEIVE, %ecx	/* _receive(src, ptr) */
 | |
| 	int	$IPCVEC	/* trap to the kernel */
 | |
| 	movl	STATUS(%ebp), %ecx	/* ecx = status pointer */
 | |
| 	movl	%ebx, (%ecx)
 | |
| 	pop	%ebx
 | |
| 	pop	%ebp
 | |
| 	ret
 | |
| 
 | |
| ENTRY(_sendrec)
 | |
| 	push	%ebp
 | |
| 	movl	%esp, %ebp
 | |
| 	push	%ebx
 | |
| 	movl	SRC_DST(%ebp), %eax	/* eax = dest-src */
 | |
| 	movl	MESSAGE(%ebp), %ebx	/* ebx = message pointer */
 | |
| 	movl	$SENDREC, %ecx	/* _sendrec(srcdest, ptr) */
 | |
| 	int	$IPCVEC	/* trap to the kernel */
 | |
| 	pop	%ebx
 | |
| 	pop	%ebp
 | |
| 	ret
 | |
| 
 | |
| ENTRY(_minix_kernel_info_struct)
 | |
| 	push	%ebp
 | |
| 	movl	%esp, %ebp
 | |
| 	push	%ebx
 | |
| 	movl	$0, %eax
 | |
| 	movl	$0, %ebx
 | |
| 	movl	$MINIX_KERNINFO, %ecx
 | |
| 	int	$IPCVEC	/* trap to the kernel */
 | |
| 	movl	8(%ebp), %ecx	/* ecx = return struct ptr */
 | |
| 	movl	%ebx, (%ecx)
 | |
| 	pop	%ebx
 | |
| 	pop	%ebp
 | |
| 	ret
 | |
| 
 | |
| ENTRY(_notify)
 | |
| 	push	%ebp
 | |
| 	movl	%esp, %ebp
 | |
| 	push	%ebx
 | |
| 	movl	SRC_DST(%ebp), %eax	/* eax = destination  */
 | |
| 	movl	$NOTIFY, %ecx	/* _notify(srcdst) */
 | |
| 	int	$IPCVEC	/* trap to the kernel */
 | |
| 	pop	%ebx
 | |
| 	pop	%ebp
 | |
| 	ret
 | |
| 
 | |
| ENTRY(_sendnb)
 | |
| 	push	%ebp
 | |
| 	movl	%esp, %ebp
 | |
| 	push	%ebx
 | |
| 	movl	SRC_DST(%ebp), %eax	/* eax = dest-src */
 | |
| 	movl	MESSAGE(%ebp), %ebx	/* ebx = message pointer */
 | |
| 	movl	$SENDNB, %ecx	/* _sendnb(dest, ptr) */
 | |
| 	int	$IPCVEC	/* trap to the kernel */
 | |
| 	pop	%ebx
 | |
| 	pop	%ebp
 | |
| 	ret
 | |
| 
 | |
| ENTRY(_do_kernel_call)
 | |
| 	/* pass the message pointer to kernel in the %eax register */
 | |
| 	movl	4(%esp), %eax
 | |
| 	int	$KERVEC
 | |
| 	ret
 |