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

📄 smp_start.s

📁 qnx powerpc MPC8245的 BSP源文件
💻 S
字号:
#  # Copyright 2007, QNX Software Systems. #  # Licensed under the Apache License, Version 2.0 (the "License"). You # may not reproduce, modify or distribute this software except in # compliance with the License. You may obtain a copy of the License # at: http://www.apache.org/licenses/LICENSE-2.0 #  # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" basis, # WITHOUT WARRANTIES OF ANY KIND, either express or implied.# # This file may contain contributions from others, either as # contributors under the License or as licensors under other terms.  # Please review this entire file for other proprietary rights or license # notices, as well as the QNX Development Suite License Guide at # http://licensing.qnx.com/license-guide/ for other information.# # smp_start.s#	Initial code to get an auxilary processor started#	.include "asmoff.def"	.extern	_SDA_BASE_	.extern	_SDA2_BASE_	.extern	cpu_starting	.extern	syspage_available	.extern	smp_spin_vaddr		.extern	init_one_cpuinfo	.extern	board_smp_adjust_num	.extern	cpu_startnext	.data	.space	512-(4*4)stk:	.space	4*4 # space for any argument stores	.text	.globl	smp_startsmp_start:	# Make sure interrupts are OFF	mfmsr	%r0	rlwinm	%r0,%r0,0,17,15	mtmsr	%r0	# Set up the stack and short data	lis		%r1,stk@ha		la  	%r1,stk@l(%r1)	lis		%r13,_SDA_BASE_@ha					la		%r13,_SDA_BASE_@l(%r13)	lis		%r2,_SDA2_BASE_@ha					la		%r2,_SDA2_BASE_@l(%r2)		lwz		%r3,cpu_starting@sdarel(%r13)	addi	%r3,%r3,-1	bl		board_smp_adjust_num		mr		%r31,%r3	bl		cpu_one_startup		mr		%r3,%r31	bl		init_one_cpuinfo		# Tell bootstrap CPU that it can start the next CPU.	li		%r0,0	stw		%r0,cpu_starting@sdarel(%r13)		 	# Wait for the bootstrap CPU to finish initializing the system page1:	sync	# give the bus a break.	lwz		%r5,syspage_available@sdarel(%r13)	cmpw	%r5,%r31	bne		1b		# we don't come back from this	mr		%r4,%r31	lwz		%r3,smp_spin_vaddr@sdarel(%r13)	bl		cpu_startnext 

⌨️ 快捷键说明

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