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

📄 startz.s.a1

📁 国产CPU-龙芯(loongson)BIOS源代码
💻 A1
字号:
/*	$Id: startz.S,v 1.2 2003/11/11 02:19:43 wlin Exp $ *//* * Copyright (c) 2001 Opsycon AB  (www.opsycon.se) *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by Opsycon AB, Sweden. * 4. The name of the author may not be used to endorse or promote products *    derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */#ifndef _KERNEL#define _KERNEL#endif#include <asm.h>#include <regnum.h>#include <cpu.h>#include <pte.h>#define IndexInvalidate_I       0x00#define IndexWriteBack_D        0x01	.set	noreorder	.globl	_start	.globl	start_start:start:	bal	locate	noplocate:	subu	s8, ra, 8	/* Where we were loaded */	la	sp, (.stack + 8192)	move	s0, a0		/* Save boot rom start args */	la	a0, start	/* Where we were linked to run */	move	a1, s8	la	a2, _edata	subu	t1, a2, a0	srl	t1, t1, 2	/* copy text section */	li	t0, 01:	lw	v0, 0(a1)	nop	sw	v0, 0(a0)	xor	t0, t0, v0	addu	a0, 4	bne	a2, a0, 1b	addu	a1, 4		/* Clear BSS */	la	a0, _edata	la	a2, _end2:	sw	zero, 0(a0)	bne a2, a0, 2b	addu	a0, 4	move	a0, s8		     /* load address */	move	a1, t1               /* length in words */	move	a2, t0               /* checksum */	move	a3, sp	la	ra, 1f	la	k0, decompress_pmon	jr	k0	nop1:	move	a0, s0	li	k0, PMON_ENTRY	jr	k0	nop3:	b 3b	.comm .stack,4096*2,4

⌨️ 快捷键说明

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