Specifications
A Minimal PowerPCª Boot Sequence for
19
Executing Compiled C Programs
Source Files
Part V Source Files
The following sections contain the complete source code for the Þles ppcinit.S, ppcinit.h, ld.script, and
makeÞle.
5.1 ppcinit.S
/*
// This file contains generic boot init code designed to be run on
// PowerPC processor simulations that just need minimal setup.
//
// This code has also successfully been used to run processor-intensive
// benchmarks (written in C) from power-up on minimal hardware boards such as
// Excimer.
//
// This code is designed to be run from Power-up or hard reset; running from
// soft reset may require additional operations such as cache invalidation,
// that are not supplied here.
//
// Once the hw init is complete, this code branches into the
// USER_ENTRY defined in the user code
//
// This code has been tested on the mpc603e, mpc750 and mpc7400/
// Architectural differences between processors with respect to cache
// types and sizes, cache management instructions, number of TLB
// entries, etc, may require changes to be made to this code before it may
// be used successfully on other processors.
//
// WARNING: If this code is run on a MAX! (MPC7400) processor
// earlier than rev 2.9, certain bits in HID0, IABR, MSSCR0, and
// MSSCR1 have to be set. Please refer to the processor errata if
// problems are encountered with this part.
*/
// NOTE: If you need to define variables, put them at the end! The _start
// symbol needs to be at hreset in order for this code to run automatically
// on hard reset.
#include "ppcinit.h"
.text
.global __eabi
.global _start
.space (0x0100) // locate at hreset vector
// this should now be located at the reset vector
_start:
b system_reset
.space (0x3000) // space past exception space