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

📄 readme

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻
字号:
This directory contains Version-2 drivers and kernels for serialICE.The files named d*.rec are drivers and the files named k*.rec arekernels. The drivers are intended to be downloaded to IMON, thekernels are intended to be "blown" into PROM or flash memory.Version-2 kernels have two major differences from Version-1 kernels; theformat of the savearea, and the ability to respond to ATTN charactersin the stopped state.The new savearea format uses a fixed header that contains the followingfields.	struct SaveareaHdr {		Ulong ICE_SAV;	/* save area version */		Ulong ICE_SAH;	/* save area header size */		Ulong ICE_MAP;	/* bit-map for savearea */		Ulong ICE_IBS;	/* size of instr buffer */		Ulong ICE_GWP;	/* pointer to get_word routine */		Ulong ICE_PWP;	/* pointer to put_word routine */		Ulong ICE_EPC;	/* saved so that it can be set */		Ulong ICE_LE; 	/* set if little endian */		};The ICE_SAV field contains an integer that is used to identify theheader version. The current version is 2.The ICE_SAH field contains an integer that specifies the size of the header.This allows us to add fields to the end of the header without changingthe version.The ICE_MAP field contains a 32-bit value that defines which of the32 GP registers can be found immediately following this header. Theseregisters must be saved in asending numerical order. ie. register 1..2..3etc. For each register saved, you must set one bit in this field. Forexample, if you have a ICE_MAP value of 0x80011ff6, it means that you havesaved GP registers 1,2,4-12,16, and 31.The ICE_IBS field contains an integer that specifies the size of theinstruction buffer. This permits the host to avoid overflowing theinstruction buffer.The ICE_GWP field contains the address of the get_word routine in thekernel. This is used by the host during downloads.The ICE_PWP field contains the address of the put_word routine in thekernel. This is used by the host during uploads.The ICE_EPC field contains the saved value of the C0_EPC register.The ICE_LE field containa a zero in big endian targets, and a one in little endian targets.In Version-2, the kernel sets the LS bit of the savearea address whenresponding to a SENDSAP command. This permits the host to recognize that the target is equipped with a version-2 kernel.In Version-2 there are two separate routines for getting a word fromthe serial port. get_word and get_cmd. get_word is used for downloads,and get_cmd is used for all other cases. The begining of the ice_loopnow calls get_cmd rather than get_word. The difference between get_wordand get_cmd, is that get_cmd checks the first byte of each word, and ifit is an ATTN character, it responds with ACK. This permits the hostto determine the state of the target. Example pseudo code follows...	Ulong get_cmd(void)	{	Ulong v,rtn;	int i;		for (i=4;i>0;) {		/* wait for RXRDY */		while (!(inw(UART_RXS)&RXS_RXRDY)) ;		v = inw(UART_RXHDR);	/* get the byte */		if (i==4 && v == ATTN) { /* first byte is ATTN */			/* wait for TXRDY */			while (!(inw(UART_TXS)&RXS_TXRDY)) ;			outw(UART_TXHDR,ACK);	/* send the ACK */			}		else {			rtn <<= 8;			rtn |= v;			i--;			}		}	return(rtn);	}

⌨️ 快捷键说明

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