⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pmoninit

📁 MIPS处理器的bootloader,龙芯就是用的修改过的PMON2
💻
字号:
			PMON Initialization			PMON InitializationHere is a brief description of what happens when PMONboots (jal is a subroutine call).Execution starts at 0xbfc00000 (0xa0c00000 on the LR64360). At this address there is a jump to _start  (usually at 0xbfc00274)._start: (pmon/mips.s)    jal cpuInit	This calls getHostType and then sets up the RAM and returns	a pointer to the correct cache flush routine, and the CPU	type.  jalr s0	Calls the correct flush routine to flush the Dcache. It calls	indirect via register s0, which was set by cpuInit.  	  jal cpdata	Copies the .data section from the PROM to the RAM.  jal clrbss	Clears the .bss section in RAM.  jal copyHandler	Copies the exception handler to the exception vector in RAM.  jal copyHandler	Copies the exception handler to the exception vector in RAM.  jalr s0	Calls the correct flush routine to flush the Dcache. It calls	indirect via register s0, which was set by cpuInit.  	  jalr s0	Calls the correct flush routine to flush the Icache. It calls	indirect via register s0, which was set by cpuInit.  	  jal pmoninit	Calls pmoninit, this is the first piece of C. At this point	   PMON switches to kseg0 addresses (assuming that PMON was linked	   at a kseg0 address).	pmoninit() (pmon/main.c)    jal mfc0	Uses mfc0() to read the Status register (C0_SR).	This is the first time that RAM is assumed to be working.	If RAM is not working, control will not return from this	call.  jal hostInit(8)	Initialize the DUART. This calls 	addDevice, which calls the OP_INIT 	section of the driver.  jal moninit	Initializes the core Monitor.  jal addCmdRec	Called several times. Adds PMON-specific commands to the Monitor.	  jal addEnvRec	Called several times. Adds PMON-specific environment variables 	to the Monitor.    jal sprintf -- do_cmd	This pair of functions is called three times. They set two	environment variables and define the symbol Pmon.	  jal addGpRegs 	Add the Gp registers to the list of registers.	  jal hostInit 	Perform additional initialization.	  jal printf 	Print the first part of the banner.	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -