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

📄 callout_debug_mpsc_mv64360.s

📁 qnx powerpc MPC8245的 BSP源文件
💻 S
字号:
/* * $QNXLicenseC:  * 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.  * $  */## An entry point for a hardware kernel callout.# It may be called by an interrupt handler.# This code MUST be position independant.#	.include "callout.ah"	.include "ppc/util.ah"	.include "ppc/603cpu.h"			.extern dbg_device	.extern patch_channel	.set	MPSC0_CHR1,0x800c		.set	MPSC0_CHR2,0x8010patch_debug_tx:	stwu    %r1,-32(%r1)	mflr    %r0	stw     %r31,28(%r1)	stw     %r0,36(%r1)	add     %r31,%r3,%r5	la      %r4,DDI_BASE(%r7)	loadi	%r3, 0x10000	bl      callout_io_map_indirect	sth     %r3,6(%r31)	srwi    %r3,%r3,16	sth     %r3,2(%r31)	lwz     %r0,36(%r1)	mtlr    %r0	lwz     %r31,28(%r1)	addi    %r1,%r1,32	blr## void display_output(struct syspage_entry *sysp, char c)## Display debug messages from kdebug or the kernel.#CALLOUT_START	display_char_mpsc_mv64360, 0, patch_debug_tx    lis     %r10,0x1234          # get GT chip base (patched)    ori     %r10,%r10,0x5678      # .....	#disable interrupt	mfmsr	%r8	bitclr	%r9,%r8,PPC_MSR_EE	mtmsr	%r9	loadi	%r6,MPSC0_CHR21:	lwbrx	%r7,%r6,%r10	andi.	%r7,%r7,0x200	bne 1b	loadi	%r6,MPSC0_CHR1	loadi	%r9,0x00300000	rlwinm	%r4,%r4,0,24,31	or		%r4,%r4,%r9	stwbrx	%r4,%r6,%r10	sync		loadi	%r6,MPSC0_CHR2	li	%r7,0x200	stwbrx	%r7,%r6,%r10	eieio	mtmsr	%r8		blrCALLOUT_END		display_char_mpsc_mv64360		## int poll_key( volatile struct syspage_entry *)## return a key value, or -1 if no key is available (for kdebug use)#CALLOUT_START	poll_key_mpsc_mv64360, 0, 0	# @@@ NYI	li %r3,-1	blrCALLOUT_END		poll_key_mpsc_mv64360		## int break_detect(volatile struct syspage_entry *)## return 1 if a break condition is detected, 0 otherwise#CALLOUT_START	break_detect_mpsc_mv64360, 0, 0	# @@@ NYI	li %r3,0	blrCALLOUT_END		break_detect_mpsc_mv64360

⌨️ 快捷键说明

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