📄 bsp.t
字号:
@c@c COPYRIGHT (c) 1988-2002.@c On-Line Applications Research Corporation (OAR).@c All rights reserved.@c@c $Id: bsp.t,v 1.9 2002/01/17 21:47:46 joel Exp $@c@chapter Board Support Packages@section IntroductionAn RTEMS Board Support Package (BSP) must be designedto support a particular processor and target board combination.This chapter presents a discussion of PowerPC specific BSP issues.For more information on developing a BSP, refer to the chaptertitled Board Support Packages in the RTEMSApplications User's Guide.@section System ResetAn RTEMS based application is initiated orre-initiated when the PowerPC processor is reset. The PowerPC architecture defines a Reset Exception, but leaves thedetails of the CPU state as implementation specific. Pleaserefer to the User's Manual for the CPU model in question.In general, at power-up the PowerPC begin execution at address0xFFF00100 in supervisor mode with all exceptions disabled. Forsoft resets, the CPU will vector to either 0xFFF00100 or 0x00000100depending upon the setting of the Exception Prefix bit in the MSR.If during a soft reset, a Machine Check Exception occurs, then theCPU may execute a hard reset.@section Processor InitializationIt is the responsibility of the application'sinitialization code to initialize the CPU and boardto a quiescent state before invoking the @code{rtems_initialize_executive}directive. It is recommended that the BSP utilize the @code{predriver_hook}to install default handlers for all exceptions. These default handlersmay be overwritten as various device drivers and subsystems installtheir own exception handlers. Upon completion of RTEMS executiveinitialization, all interrupts are enabled.If this PowerPC implementation supports on-chip cachingand this is to be utilized, then it should be enabled during thereset application initialization code. On-chip caching has beenobserved to prevent some emulators from working properly, so itmay be necessary to run with caching disabled to use these emulators.In addition to the requirements described in the@b{Board Support Packages} chapter of the @b{@value{LANGUAGE}Applications User's Manual} for the reset codewhich is executed before the call to @code{rtems_initialize_executive},the PowrePC version has the following specific requirements:@itemize @bullet@item Must leave the PR bit of the Machine State Register (MSR) set to 0 so the PowerPC remains in the supervisor state.@item Must set stack pointer (sp or r1) such that a minimum stacksize of MINIMUM_STACK_SIZE bytes is provided for the@code{rtems_initialize_executive} directive.@item Must disable all external interrupts (i.e. clear the EI (EE)bit of the machine state register).@item Must enable traps so window overflow and underflowconditions can be properly handled.@item Must initialize the PowerPC's initial Exception Table with defaulthandlers.@end itemize
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -