display assembly instructions, to help with first.tex exercise
This commit is contained in:
		
							parent
							
								
									49db5119e9
								
							
						
					
					
						commit
						8f6865d1f1
					
				
					 3 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -2,3 +2,4 @@ set confirm off
 | 
			
		|||
set architecture riscv
 | 
			
		||||
target remote 127.0.0.1:1234
 | 
			
		||||
symbol-file kernel/kernel
 | 
			
		||||
set disassemble-next-line auto
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,6 +12,7 @@
 | 
			
		|||
	.section trampoline
 | 
			
		||||
.globl trampout
 | 
			
		||||
trampout:
 | 
			
		||||
        # trampout(trapframe, pagetable)
 | 
			
		||||
        # switch from kernel to user.
 | 
			
		||||
        # usertrapret() calls here.
 | 
			
		||||
	# a0: p->tf in user page table
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -117,7 +117,7 @@ usertrapret(void)
 | 
			
		|||
  // set S Exception Program Counter to the saved user pc.
 | 
			
		||||
  w_sepc(p->tf->epc);
 | 
			
		||||
 | 
			
		||||
  // tell trampline.S the user page table to switch to.
 | 
			
		||||
  // tell trampoline.S the user page table to switch to.
 | 
			
		||||
  uint64 satp = MAKE_SATP(p->pagetable);
 | 
			
		||||
 | 
			
		||||
  // jump to trampoline.S at the top of memory, which 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue