tkernel_2/monitor/cmdsvc/src/armv6/misc.c | bare source | permlink (0.01 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * T-Kernel 2.0 Software Package 4: * 5: * Copyright 2011 by Ken Sakamura. 6: * This software is distributed under the latest version of T-License 2.x. 7: *---------------------------------------------------------------------- 8: * 9: * Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17. 10: * Modified by TRON Forum(http://www.tron.org/) at 2015/06/01. 11: * 12: *---------------------------------------------------------------------- 13: */ 14: 15: /* 16: * misc.c 17: * 18: */ 19: 20: #include "../cmdsvc.h" 21: #include <sys/rominfo.h> 22: 23: /* 24: * Invoking user reset initialization routine 25: */ 26: EXPORT void callUserResetInit( void ) 27: { 28: UW wp = (UW)ROMInfo->resetinit; 29: 30: if ( invalidPC2(wp) 31: || !inMemArea(wp, wp+4, MSA_ROM|MSA_FROM) 32: || inMemArea(wp, wp+4, MSA_MON) ) return; /* invalid */ 33: 34: callExtProg(ROMInfo->resetinit); 35: } 36: 37: /* 38: * Prepare ROM kernel execution 39: * It means that we don't execute ROM kernel immediately, but we prepare so that upon return from the ordinary monitor, 40: * it gets executed. 41: */ 42: EXPORT ER bootROM( void ) 43: { 44: UW wp = (UW)ROMInfo->kernel; 45: 46: if ( invalidPC2(wp) 47: || !inMemArea(wp, wp+4, MSA_ROM|MSA_FROM) 48: || inMemArea(wp, wp+4, MSA_MON) ) return E_NOEXS; /* invalid */ 49: 50: /* set boot configuration */ 51: setUpBoot(ROMInfo->kernel, NULL); 52: 53: return E_OK; 54: }