kernel:enable trace on arm.
Change-Id: Iabe6dfd758e8f1cdb4a18e2f2ab8f8ca988f3c86
This commit is contained in:
		
							parent
							
								
									16440d9b8f
								
							
						
					
					
						commit
						eff37b8a8b
					
				| @ -26,6 +26,15 @@ | |||||||
|  */ |  */ | ||||||
| #define ARM_STACK_TOP_RESERVED	(2 * sizeof(reg_t)) | #define ARM_STACK_TOP_RESERVED	(2 * sizeof(reg_t)) | ||||||
| 
 | 
 | ||||||
|  | /* only selected bits are changeable by user e.g.[31:9] and skip the 
 | ||||||
|  |  * mode bits. It is probably is a better idea to look at the current  | ||||||
|  |  * status to determine if one is allowed to write these values. This  | ||||||
|  |  * might allow debugging of privileged processes  | ||||||
|  |  */ | ||||||
|  | #define SET_USR_PSR(rp, npsr) \ | ||||||
|  | 	rp->p_reg.psr = ( rp->p_reg.psr & 0x1F) | ( npsr & ~0x1F) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| #define PG_ALLOCATEME ((phys_bytes)-1) | #define PG_ALLOCATEME ((phys_bytes)-1) | ||||||
| 
 | 
 | ||||||
| #endif /* _ARM_ACONST_H */ | #endif /* _ARM_ACONST_H */ | ||||||
|  | |||||||
| @ -154,6 +154,13 @@ int do_trace(struct proc * caller, message * m_ptr) | |||||||
| 		SETPSW(rp, tr_data); | 		SETPSW(rp, tr_data); | ||||||
| 	else | 	else | ||||||
| 		*(reg_t *) ((char *) &rp->p_reg + i) = (reg_t) tr_data; | 		*(reg_t *) ((char *) &rp->p_reg + i) = (reg_t) tr_data; | ||||||
|  | #else  | ||||||
|  | 	if (i == (int) &((struct proc *) 0)->p_reg.psr) { | ||||||
|  | 		/* only selected bits are changeable */ | ||||||
|  | 		SET_USR_PSR(rp, tr_data); | ||||||
|  | 	} else { | ||||||
|  | 		*(reg_t *) ((char *) &rp->p_reg + i) = (reg_t) tr_data; | ||||||
|  | 	} | ||||||
| #endif | #endif | ||||||
| 	m_ptr->CTL_DATA = 0; | 	m_ptr->CTL_DATA = 0; | ||||||
| 	break; | 	break; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Kees Jongenburger
						Kees Jongenburger