forked from Imagelibrary/rtems
powerpc: Replace BSP_panic() with rtems_panic()
Due to a new rtems_panic() implementation, it is possible to replace the PowerPC-specific BSP_panic() with rtems_panic(). Remove BSP_panic() implementations. Close #3245.
This commit is contained in:
@@ -52,7 +52,7 @@ typedef enum {
|
|||||||
* is cached and repeated calls just return the cached value.
|
* is cached and repeated calls just return the cached value.
|
||||||
*
|
*
|
||||||
* If a non-zero argument is passed, the routine panics
|
* If a non-zero argument is passed, the routine panics
|
||||||
* (BSP_panic) if no recognized bridge is found;
|
* (rtems_panic) if no recognized bridge is found;
|
||||||
*/
|
*/
|
||||||
DiscoveryVersion BSP_getDiscoveryVersion(int assertion);
|
DiscoveryVersion BSP_getDiscoveryVersion(int assertion);
|
||||||
|
|
||||||
@@ -233,7 +233,6 @@ extern char *BSP_commandline_string;
|
|||||||
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
||||||
|
|
||||||
extern rtems_configuration_table BSP_Configuration;
|
extern rtems_configuration_table BSP_Configuration;
|
||||||
extern void BSP_panic(char *s);
|
|
||||||
extern void bsp_reset(void);
|
extern void bsp_reset(void);
|
||||||
extern int BSP_disconnect_clock_handler (void);
|
extern int BSP_disconnect_clock_handler (void);
|
||||||
extern int BSP_connect_clock_handler (void);
|
extern int BSP_connect_clock_handler (void);
|
||||||
|
|||||||
@@ -554,7 +554,7 @@ int i;
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BSP_panic("Unable to initialize interrupt controller; unknown chip");
|
rtems_panic("Unable to initialize interrupt controller; unknown chip");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ int i;
|
|||||||
/*
|
/*
|
||||||
* put something here that will show the failure...
|
* put something here that will show the failure...
|
||||||
*/
|
*/
|
||||||
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
rtems_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_IRQ_INIT
|
#ifdef TRACE_IRQ_INIT
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ printk("config data is %p\n", BSP_pci_configuration.pci_config_data);
|
|||||||
if ( PCI_VENDOR_ID_MARVELL != ds ) {
|
if ( PCI_VENDOR_ID_MARVELL != ds ) {
|
||||||
if ( assertion ) {
|
if ( assertion ) {
|
||||||
printk("Host bridge vendor id: 0x%04x\n",ds);
|
printk("Host bridge vendor id: 0x%04x\n",ds);
|
||||||
BSP_panic("Host bridge vendor @ pci(0,0,0) is not MARVELL");
|
rtems_panic("Host bridge vendor @ pci(0,0,0) is not MARVELL");
|
||||||
}
|
}
|
||||||
else return unknown;
|
else return unknown;
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@ printk("config data is %p\n", BSP_pci_configuration.pci_config_data);
|
|||||||
printk("Marvell device id 0x%04x, revision 0x%02x; check %s:%u\n",
|
printk("Marvell device id 0x%04x, revision 0x%02x; check %s:%u\n",
|
||||||
ds, dc,
|
ds, dc,
|
||||||
__FILE__,__LINE__);
|
__FILE__,__LINE__);
|
||||||
BSP_panic("Unknown Marvell bridge or revision@ pci(0,0,0) is not MARVELL");
|
rtems_panic("Unknown Marvell bridge or revision@ pci(0,0,0) is not MARVELL");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ extern pci_config_access_functions pci_indirect_functions;
|
|||||||
pci_initialize();
|
pci_initialize();
|
||||||
/* check for overflow of an unsigned char */
|
/* check for overflow of an unsigned char */
|
||||||
if ( BSP_pci_hose1_bus_base + pci_bus_count() > 255 ) {
|
if ( BSP_pci_hose1_bus_base + pci_bus_count() > 255 ) {
|
||||||
BSP_panic("Too many PCI busses in the system");
|
rtems_panic("Too many PCI busses in the system");
|
||||||
}
|
}
|
||||||
/* readjust total number */
|
/* readjust total number */
|
||||||
ucMaxPCIBus+=BSP_pci_hose1_bus_base;
|
ucMaxPCIBus+=BSP_pci_hose1_bus_base;
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ uint32_t b0,b1,r0,r1,lim,dis;
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BSP_panic("Unknown discovery version; switch in file: "__FILE__" not implemented (yet)");
|
rtems_panic("Unknown discovery version; switch in file: "__FILE__" not implemented (yet)");
|
||||||
break; /* never get here */
|
break; /* never get here */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ rtems_pci_io_remap(int bus_from, int bus_to, uint32_t offset)
|
|||||||
unsigned int bas, lim;
|
unsigned int bas, lim;
|
||||||
|
|
||||||
if ( offset & ((1<<12)-1) ) {
|
if ( offset & ((1<<12)-1) ) {
|
||||||
BSP_panic("rtems_pci_io_remap(): offset must be 4k aligned");
|
rtems_panic("rtems_pci_io_remap(): offset must be 4k aligned");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,12 +114,12 @@ rtems_pci_io_remap(int bus_from, int bus_to, uint32_t offset)
|
|||||||
switch ( b ) {
|
switch ( b ) {
|
||||||
default:
|
default:
|
||||||
printk("PCI header type %i (@%i/%i/%i)\n", b, bus, dev, fun);
|
printk("PCI header type %i (@%i/%i/%i)\n", b, bus, dev, fun);
|
||||||
BSP_panic("rtems_pci_io_remap(): unknown PCI header type");
|
rtems_panic("rtems_pci_io_remap(): unknown PCI header type");
|
||||||
return -1; /* keep compiler happy */
|
return -1; /* keep compiler happy */
|
||||||
|
|
||||||
case PCI_HEADER_TYPE_CARDBUS:
|
case PCI_HEADER_TYPE_CARDBUS:
|
||||||
printk("PCI header type %i (@%i/%i/%i)\n", b, bus, dev, fun);
|
printk("PCI header type %i (@%i/%i/%i)\n", b, bus, dev, fun);
|
||||||
BSP_panic("rtems_pci_io_remap(): don't know how to deal with Cardbus bridge");
|
rtems_panic("rtems_pci_io_remap(): don't know how to deal with Cardbus bridge");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
case PCI_HEADER_TYPE_NORMAL:
|
case PCI_HEADER_TYPE_NORMAL:
|
||||||
@@ -167,7 +167,7 @@ rtems_pci_io_remap(int bus_from, int bus_to, uint32_t offset)
|
|||||||
switch ( b ) {
|
switch ( b ) {
|
||||||
default:
|
default:
|
||||||
printk("Unknown IO range type 0x%x (@%i/%i/%i)\n", b, bus, dev, fun);
|
printk("Unknown IO range type 0x%x (@%i/%i/%i)\n", b, bus, dev, fun);
|
||||||
BSP_panic("rtems_pci_io_remap(): unknown IO range type");
|
rtems_panic("rtems_pci_io_remap(): unknown IO range type");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
case PCI_IO_RANGE_TYPE_16:
|
case PCI_IO_RANGE_TYPE_16:
|
||||||
|
|||||||
@@ -112,12 +112,6 @@ uint32_t bsp_time_base_frequency;
|
|||||||
/* Legacy */
|
/* Legacy */
|
||||||
uint32_t bsp_clicks_per_usec;
|
uint32_t bsp_clicks_per_usec;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
|
|||||||
@@ -51,20 +51,6 @@ static int mpc83xx_decrementer_exception_handler( BSP_Exception_frame *frame, un
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
rtems_interrupt_level level;
|
|
||||||
|
|
||||||
rtems_interrupt_disable(level);
|
|
||||||
(void) level;
|
|
||||||
|
|
||||||
printk("%s PANIC %s\n", rtems_get_version_string(), s);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
/* Do nothing */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned n)
|
void _BSP_Fatal_error(unsigned n)
|
||||||
{
|
{
|
||||||
rtems_interrupt_level level;
|
rtems_interrupt_level level;
|
||||||
@@ -145,7 +131,7 @@ void bsp_start( void)
|
|||||||
/* Install default handler for the decrementer exception */
|
/* Install default handler for the decrementer exception */
|
||||||
sc = ppc_exc_set_handler( ASM_DEC_VECTOR, mpc83xx_decrementer_exception_handler);
|
sc = ppc_exc_set_handler( ASM_DEC_VECTOR, mpc83xx_decrementer_exception_handler);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
BSP_panic("cannot install decrementer exception handler");
|
rtems_panic("cannot install decrementer exception handler");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initalize interrupt support */
|
/* Initalize interrupt support */
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
|||||||
/*
|
/*
|
||||||
* put something here that will show the failure...
|
* put something here that will show the failure...
|
||||||
*/
|
*/
|
||||||
BSP_panic(
|
rtems_panic(
|
||||||
"Unable to initialize RTEMS interrupt management!!! System locked\n"
|
"Unable to initialize RTEMS interrupt management!!! System locked\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,12 +207,6 @@ static void BSP_ask_for_reset(void)
|
|||||||
while(1) {};
|
while(1) {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
BSP_ask_for_reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("%s FATAL ERROR %x\n",_RTEMS_version, v);
|
printk("%s FATAL ERROR %x\n",_RTEMS_version, v);
|
||||||
|
|||||||
@@ -206,7 +206,6 @@ extern char *BSP_commandline_string;
|
|||||||
#define BSP_Convert_decrementer( _value ) \
|
#define BSP_Convert_decrementer( _value ) \
|
||||||
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
||||||
|
|
||||||
extern void BSP_panic(char *s);
|
|
||||||
/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
|
/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
|
||||||
extern int BSP_disconnect_clock_handler (void);
|
extern int BSP_disconnect_clock_handler (void);
|
||||||
extern int BSP_connect_clock_handler (void);
|
extern int BSP_connect_clock_handler (void);
|
||||||
|
|||||||
@@ -103,13 +103,6 @@ static void _BSP_GPLED1_off(void)
|
|||||||
csr->bcsr0 |= GP1_LED; /* Turn off GP1 LED */
|
csr->bcsr0 |= GP1_LED; /* Turn off GP1 LED */
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
_BSP_GPLED1_on();
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
_BSP_GPLED0_on();
|
_BSP_GPLED0_on();
|
||||||
|
|||||||
@@ -291,7 +291,6 @@ extern char *BSP_commandline_string;
|
|||||||
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
||||||
|
|
||||||
extern rtems_configuration_table BSP_Configuration;
|
extern rtems_configuration_table BSP_Configuration;
|
||||||
extern void BSP_panic(char *s);
|
|
||||||
/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
|
/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
|
||||||
extern int BSP_disconnect_clock_handler (void);
|
extern int BSP_disconnect_clock_handler (void);
|
||||||
extern int BSP_connect_clock_handler (void);
|
extern int BSP_connect_clock_handler (void);
|
||||||
|
|||||||
@@ -133,6 +133,6 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
|||||||
/*
|
/*
|
||||||
* put something here that will show the failure...
|
* put something here that will show the failure...
|
||||||
*/
|
*/
|
||||||
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
rtems_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,12 +105,6 @@ int i;
|
|||||||
BSP_output_char_function_type BSP_output_char = BSP_output_char_via_serial;
|
BSP_output_char_function_type BSP_output_char = BSP_output_char_via_serial;
|
||||||
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
BSP_polling_getchar_function_type BSP_poll_char = NULL;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("\n%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("\n%s PANIC ERROR %x\n",_RTEMS_version, v);
|
printk("\n%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
@@ -186,7 +180,7 @@ BSP_calc_freqs( void )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BSP_panic("Unknown PLL sys-clock ratio; something's wrong here");
|
rtems_panic("Unknown PLL sys-clock ratio; something's wrong here");
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( e500_ratio ) {
|
switch ( e500_ratio ) {
|
||||||
@@ -195,7 +189,7 @@ BSP_calc_freqs( void )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
BSP_panic("Unknown PLL e500-clock ratio; something's wrong here");
|
rtems_panic("Unknown PLL e500-clock ratio; something's wrong here");
|
||||||
}
|
}
|
||||||
|
|
||||||
printk("Core Complex Bus (CCB) Clock Freq: %10u Hz\n", BSP_bus_frequency);
|
printk("Core Complex Bus (CCB) Clock Freq: %10u Hz\n", BSP_bus_frequency);
|
||||||
|
|||||||
@@ -136,7 +136,6 @@ extern unsigned int BSP_time_base_divisor;
|
|||||||
#define BSP_Convert_decrementer( _value ) \
|
#define BSP_Convert_decrementer( _value ) \
|
||||||
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
((unsigned long long) ((((unsigned long long)BSP_time_base_divisor) * 1000000ULL) /((unsigned long long) BSP_bus_frequency)) * ((unsigned long long) (_value)))
|
||||||
|
|
||||||
extern void BSP_panic(char *s);
|
|
||||||
extern void bsp_reset(void);
|
extern void bsp_reset(void);
|
||||||
/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
|
/* extern int printk(const char *, ...) __attribute__((format(printf, 1, 2))); */
|
||||||
extern int BSP_disconnect_clock_handler(void);
|
extern int BSP_disconnect_clock_handler(void);
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
|||||||
/*
|
/*
|
||||||
* put something here that will show the failure...
|
* put something here that will show the failure...
|
||||||
*/
|
*/
|
||||||
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
rtems_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
||||||
}
|
}
|
||||||
#ifdef TRACE_IRQ_INIT
|
#ifdef TRACE_IRQ_INIT
|
||||||
printk("Done setup irq mngt configuration\n");
|
printk("Done setup irq mngt configuration\n");
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ int pci_initialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (++numPCIDevs > PCI_MAX_DEVICES) {
|
if (++numPCIDevs > PCI_MAX_DEVICES) {
|
||||||
BSP_panic("Too many PCI devices found; increase PCI_MAX_DEVICES in pci.h\n");
|
rtems_panic("Too many PCI devices found; increase PCI_MAX_DEVICES in pci.h\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!deviceFound) deviceFound=1;
|
if (!deviceFound) deviceFound=1;
|
||||||
|
|||||||
@@ -111,12 +111,6 @@ static unsigned char ConfVPD_buff[200];
|
|||||||
static char cmdline_buf[CMDLINE_BUF_SIZE];
|
static char cmdline_buf[CMDLINE_BUF_SIZE];
|
||||||
char *BSP_commandline_string = cmdline_buf;
|
char *BSP_commandline_string = cmdline_buf;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
|||||||
/*
|
/*
|
||||||
* put something here that will show the failure...
|
* put something here that will show the failure...
|
||||||
*/
|
*/
|
||||||
BSP_panic(
|
rtems_panic(
|
||||||
"Unable to initialize RTEMS interrupt Management!!! System locked\n"
|
"Unable to initialize RTEMS interrupt Management!!! System locked\n"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -95,7 +95,7 @@ static int psim_exception_handler(
|
|||||||
unsigned exception_number
|
unsigned exception_number
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
BSP_panic("Unexpected interrupt occured");
|
rtems_panic("Unexpected interrupt occured");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,12 +60,6 @@ unsigned int BSP_time_base_divisor;
|
|||||||
|
|
||||||
extern unsigned long __rtems_end[];
|
extern unsigned long __rtems_end[];
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ static int qemuppc_exception_handler(
|
|||||||
unsigned exception_number
|
unsigned exception_number
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
BSP_panic("Unexpected interrupt occured");
|
rtems_panic("Unexpected interrupt occured");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,6 @@ __outb(int port, unsigned char v)
|
|||||||
*((volatile unsigned char *)(0x80000000 + port)) = v;
|
*((volatile unsigned char *)(0x80000000 + port)) = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__outb (0x92, 0x01);
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void bsp_start( void )
|
|||||||
/* Install default handler for the decrementer exception */
|
/* Install default handler for the decrementer exception */
|
||||||
sc = ppc_exc_set_handler( ASM_DEC_VECTOR, default_decrementer_exception_handler);
|
sc = ppc_exc_set_handler( ASM_DEC_VECTOR, default_decrementer_exception_handler);
|
||||||
if (sc != RTEMS_SUCCESSFUL) {
|
if (sc != RTEMS_SUCCESSFUL) {
|
||||||
BSP_panic("cannot install decrementer exception handler");
|
rtems_panic("cannot install decrementer exception handler");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initalize interrupt support */
|
/* Initalize interrupt support */
|
||||||
|
|||||||
@@ -52,20 +52,6 @@ uint32_t bsp_time_base_frequency;
|
|||||||
|
|
||||||
uint32_t qoriq_clock_frequency;
|
uint32_t qoriq_clock_frequency;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
rtems_interrupt_level level;
|
|
||||||
|
|
||||||
rtems_interrupt_local_disable(level);
|
|
||||||
(void) level;
|
|
||||||
|
|
||||||
printk("%s PANIC %s\n", rtems_get_version_string(), s);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
/* Do nothing */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned n)
|
void _BSP_Fatal_error(unsigned n)
|
||||||
{
|
{
|
||||||
rtems_interrupt_level level;
|
rtems_interrupt_level level;
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ void VIA_isa_bridge_interrupts_setup(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
loop_exit:
|
loop_exit:
|
||||||
if (!found) BSP_panic("VIA_82C586 PCI/ISA bridge not found!n");
|
if (!found) rtems_panic("VIA_82C586 PCI/ISA bridge not found!n");
|
||||||
|
|
||||||
tmp = inb(0x810);
|
tmp = inb(0x810);
|
||||||
if ( !(tmp & 0x2)) {
|
if ( !(tmp & 0x2)) {
|
||||||
@@ -355,7 +355,7 @@ void BSP_rtems_irq_mng_init(unsigned cpuId)
|
|||||||
/*
|
/*
|
||||||
* put something here that will show the failure...
|
* put something here that will show the failure...
|
||||||
*/
|
*/
|
||||||
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
rtems_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACE_IRQ_INIT
|
#ifdef TRACE_IRQ_INIT
|
||||||
|
|||||||
@@ -263,8 +263,8 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum)
|
|||||||
#error "Configuration Error -- BSP with ISA + PCI IRQs MUST define BSP_PCI_ISA_BRIDGE_IRQ"
|
#error "Configuration Error -- BSP with ISA + PCI IRQs MUST define BSP_PCI_ISA_BRIDGE_IRQ"
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
BSP_panic("MUST have an OpenPIC if BSP has PCI IRQs but no ISA IRQs");
|
rtems_panic("MUST have an OpenPIC if BSP has PCI IRQs but no ISA IRQs");
|
||||||
/* BSP_panic() never returns but the 'return' statement silences
|
/* rtems_panic() never returns but the 'return' statement silences
|
||||||
* a compiler warning about 'irq' possibly being used w/o initialization.
|
* a compiler warning about 'irq' possibly being used w/o initialization.
|
||||||
*/
|
*/
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ void openpic_init(int main_pic, unsigned char *polarities, unsigned char *senses
|
|||||||
const char *version, *vendor, *device;
|
const char *version, *vendor, *device;
|
||||||
|
|
||||||
if (!OpenPIC)
|
if (!OpenPIC)
|
||||||
BSP_panic("No OpenPIC found");
|
rtems_panic("No OpenPIC found");
|
||||||
|
|
||||||
t = openpic_read(&OpenPIC->Global.Feature_Reporting0);
|
t = openpic_read(&OpenPIC->Global.Feature_Reporting0);
|
||||||
switch (t & OPENPIC_FEATURE_VERSION_MASK) {
|
switch (t & OPENPIC_FEATURE_VERSION_MASK) {
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ void detect_host_bridge(void)
|
|||||||
|
|
||||||
#if BSP_PCI_IRQ_NUMBER > 0
|
#if BSP_PCI_IRQ_NUMBER > 0
|
||||||
if (OpenPIC == (volatile struct OpenPIC *)0) {
|
if (OpenPIC == (volatile struct OpenPIC *)0) {
|
||||||
BSP_panic("OpenPic Not found\n");
|
rtems_panic("OpenPic Not found\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -84,12 +84,6 @@ unsigned int BSP_processor_frequency;
|
|||||||
*/
|
*/
|
||||||
unsigned int BSP_time_base_divisor;
|
unsigned int BSP_time_base_divisor;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
|
|||||||
@@ -18,12 +18,6 @@ rebootQuestion(void)
|
|||||||
bsp_reset();
|
bsp_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
rebootQuestion();
|
|
||||||
}
|
|
||||||
|
|
||||||
#define THESRC _Internal_errors_What_happened.the_source
|
#define THESRC _Internal_errors_What_happened.the_source
|
||||||
#define THEERR _Internal_errors_What_happened.the_error
|
#define THEERR _Internal_errors_What_happened.the_error
|
||||||
|
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ int err;
|
|||||||
#error "BSP_PCI_VME_DRIVER_DOES_EOI/BSP_PIC_DO_EOI feature can only be used with vmeUniverse"
|
#error "BSP_PCI_VME_DRIVER_DOES_EOI/BSP_PIC_DO_EOI feature can only be used with vmeUniverse"
|
||||||
#endif
|
#endif
|
||||||
if ( vmeUniverse0PciIrqLine < 0 )
|
if ( vmeUniverse0PciIrqLine < 0 )
|
||||||
BSP_panic("Unable to get universe interrupt line info from PCI config");
|
rtems_panic("Unable to get universe interrupt line info from PCI config");
|
||||||
_BSP_vme_bridge_irq = vmeUniverse0PciIrqLine;
|
_BSP_vme_bridge_irq = vmeUniverse0PciIrqLine;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -42,12 +42,6 @@ uint32_t bsp_clock_speed; /* Serial clocks per second */
|
|||||||
uint32_t bsp_timer_least_valid;
|
uint32_t bsp_timer_least_valid;
|
||||||
uint32_t bsp_timer_average_overhead;
|
uint32_t bsp_timer_average_overhead;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
printk("%s PANIC %s\n",_RTEMS_version, s);
|
|
||||||
__asm__ __volatile ("sc");
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
printk("%s PANIC ERROR %x\n",_RTEMS_version, v);
|
||||||
|
|||||||
@@ -33,20 +33,6 @@ LINKER_SYMBOL(bsp_exc_vector_base);
|
|||||||
*/
|
*/
|
||||||
uint32_t bsp_time_base_frequency = 10000000;
|
uint32_t bsp_time_base_frequency = 10000000;
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
rtems_interrupt_level level;
|
|
||||||
|
|
||||||
rtems_interrupt_local_disable(level);
|
|
||||||
(void) level;
|
|
||||||
|
|
||||||
printk("%s PANIC %s\n", rtems_get_version_string(), s);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
/* Do nothing */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned n)
|
void _BSP_Fatal_error(unsigned n)
|
||||||
{
|
{
|
||||||
rtems_interrupt_level level;
|
rtems_interrupt_level level;
|
||||||
|
|||||||
@@ -526,7 +526,7 @@ sccInitialize (int chan)
|
|||||||
*/
|
*/
|
||||||
rxBuf[chan] = malloc(sizeof(*rxBuf[chan]) + 2*PPC_CACHE_ALIGNMENT);
|
rxBuf[chan] = malloc(sizeof(*rxBuf[chan]) + 2*PPC_CACHE_ALIGNMENT);
|
||||||
if (rxBuf[chan] == NULL) {
|
if (rxBuf[chan] == NULL) {
|
||||||
BSP_panic("Cannot allocate console rx buffer\n");
|
rtems_panic("Cannot allocate console rx buffer\n");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -51,20 +51,6 @@ uint32_t bsp_timer_average_overhead; /* Average overhead of timer in ticks */
|
|||||||
uint32_t bsp_timer_least_valid; /* Least valid number from timer */
|
uint32_t bsp_timer_least_valid; /* Least valid number from timer */
|
||||||
bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
|
bool bsp_timer_internal_clock; /* TRUE, when timer runs with CPU clk */
|
||||||
|
|
||||||
void BSP_panic( char *s)
|
|
||||||
{
|
|
||||||
rtems_interrupt_level level;
|
|
||||||
|
|
||||||
rtems_interrupt_disable( level);
|
|
||||||
(void) level; /* avoid set but not used warning */
|
|
||||||
|
|
||||||
printk( "%s PANIC %s\n", _RTEMS_version, s);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
/* Do nothing */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void _BSP_Fatal_error( unsigned n)
|
void _BSP_Fatal_error( unsigned n)
|
||||||
{
|
{
|
||||||
rtems_interrupt_level level;
|
rtems_interrupt_level level;
|
||||||
@@ -169,7 +155,7 @@ void bsp_start( void)
|
|||||||
if (RTEMS_SUCCESSFUL !=
|
if (RTEMS_SUCCESSFUL !=
|
||||||
bsp_tqm_get_cib_uint32("cu",
|
bsp_tqm_get_cib_uint32("cu",
|
||||||
&BSP_bus_frequency)) {
|
&BSP_bus_frequency)) {
|
||||||
BSP_panic("Cannot determine BUS frequency\n");
|
rtems_panic("Cannot determine BUS frequency\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
bsp_time_base_frequency = BSP_bus_frequency / 16;
|
bsp_time_base_frequency = BSP_bus_frequency / 16;
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ extern rtems_configuration_table BSP_Configuration; /* owned by BSP */
|
|||||||
#endif /* ASM */
|
#endif /* ASM */
|
||||||
|
|
||||||
void BSP_ask_for_reset(void);
|
void BSP_ask_for_reset(void);
|
||||||
void BSP_panic(char *s);
|
|
||||||
void _BSP_Fatal_error(unsigned int v);
|
void _BSP_Fatal_error(unsigned int v);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -321,6 +321,6 @@ void BSP_rtems_irq_mngt_init(unsigned cpuId)
|
|||||||
* initialize interrupt management
|
* initialize interrupt management
|
||||||
*/
|
*/
|
||||||
if (!BSP_rtems_irq_mngt_set(&initialConfig)) {
|
if (!BSP_rtems_irq_mngt_set(&initialConfig)) {
|
||||||
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
rtems_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,18 +133,6 @@ void BSP_ask_for_reset(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
RTEMS_UNUSED rtems_interrupt_level level;
|
|
||||||
|
|
||||||
rtems_interrupt_disable(level);
|
|
||||||
|
|
||||||
printk("\n%s PANIC %s\n", rtems_get_version_string(), s);
|
|
||||||
|
|
||||||
BSP_ask_for_reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
RTEMS_UNUSED rtems_interrupt_level level;
|
RTEMS_UNUSED rtems_interrupt_level level;
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ void zero_bss(void);
|
|||||||
#endif /* ASM */
|
#endif /* ASM */
|
||||||
|
|
||||||
void BSP_ask_for_reset(void);
|
void BSP_ask_for_reset(void);
|
||||||
void BSP_panic(char *s);
|
|
||||||
void _BSP_Fatal_error(unsigned int v);
|
void _BSP_Fatal_error(unsigned int v);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -338,6 +338,6 @@ void BSP_rtems_irq_mngt_init(unsigned cpuId)
|
|||||||
* initialize interrupt management
|
* initialize interrupt management
|
||||||
*/
|
*/
|
||||||
if (!BSP_rtems_irq_mngt_set(&initialConfig)) {
|
if (!BSP_rtems_irq_mngt_set(&initialConfig)) {
|
||||||
BSP_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
rtems_panic("Unable to initialize RTEMS interrupt Management!!! System locked\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,18 +147,6 @@ void BSP_ask_for_reset(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BSP_panic(char *s)
|
|
||||||
{
|
|
||||||
RTEMS_UNUSED rtems_interrupt_level level;
|
|
||||||
|
|
||||||
rtems_interrupt_disable(level);
|
|
||||||
|
|
||||||
printk("\n%s PANIC %s\n", rtems_get_version_string(), s);
|
|
||||||
|
|
||||||
BSP_ask_for_reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void _BSP_Fatal_error(unsigned int v)
|
void _BSP_Fatal_error(unsigned int v)
|
||||||
{
|
{
|
||||||
RTEMS_UNUSED rtems_interrupt_level level;
|
RTEMS_UNUSED rtems_interrupt_level level;
|
||||||
|
|||||||
@@ -1602,15 +1602,15 @@ rtems_irq_connect_data xx;
|
|||||||
if ( shared ) {
|
if ( shared ) {
|
||||||
#if BSP_SHARED_HANDLER_SUPPORT > 0
|
#if BSP_SHARED_HANDLER_SUPPORT > 0
|
||||||
if (!BSP_install_rtems_shared_irq_handler(&xx))
|
if (!BSP_install_rtems_shared_irq_handler(&xx))
|
||||||
BSP_panic("unable to install vmeTsi148 shared irq handler");
|
rtems_panic("unable to install vmeTsi148 shared irq handler");
|
||||||
#else
|
#else
|
||||||
uprintf(stderr,"vmeTsi148: WARNING: your BSP doesn't support sharing interrupts\n");
|
uprintf(stderr,"vmeTsi148: WARNING: your BSP doesn't support sharing interrupts\n");
|
||||||
if (!BSP_install_rtems_irq_handler(&xx))
|
if (!BSP_install_rtems_irq_handler(&xx))
|
||||||
BSP_panic("unable to install vmeTsi148 irq handler");
|
rtems_panic("unable to install vmeTsi148 irq handler");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (!BSP_install_rtems_irq_handler(&xx))
|
if (!BSP_install_rtems_irq_handler(&xx))
|
||||||
BSP_panic("unable to install vmeTsi148 irq handler");
|
rtems_panic("unable to install vmeTsi148 irq handler");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ extern int k_vsprintf(char *, char *, va_list);
|
|||||||
char buf[200];
|
char buf[200];
|
||||||
rval = k_vsprintf(buf,fmt,ap);
|
rval = k_vsprintf(buf,fmt,ap);
|
||||||
if (rval > sizeof(buf))
|
if (rval > sizeof(buf))
|
||||||
BSP_panic("vmeUniverse/uprintk: buffer overrun");
|
rtems_panic("vmeUniverse/uprintk: buffer overrun");
|
||||||
printk(buf);
|
printk(buf);
|
||||||
return rval;
|
return rval;
|
||||||
}
|
}
|
||||||
@@ -2032,15 +2032,15 @@ rtems_irq_connect_data aarrggh;
|
|||||||
if ( shared ) {
|
if ( shared ) {
|
||||||
#if BSP_SHARED_HANDLER_SUPPORT > 0
|
#if BSP_SHARED_HANDLER_SUPPORT > 0
|
||||||
if (!BSP_install_rtems_shared_irq_handler(&aarrggh))
|
if (!BSP_install_rtems_shared_irq_handler(&aarrggh))
|
||||||
BSP_panic("unable to install vmeUniverse shared irq handler");
|
rtems_panic("unable to install vmeUniverse shared irq handler");
|
||||||
#else
|
#else
|
||||||
uprintf(stderr,"vmeUniverse: WARNING: your BSP doesn't support sharing interrupts\n");
|
uprintf(stderr,"vmeUniverse: WARNING: your BSP doesn't support sharing interrupts\n");
|
||||||
if (!BSP_install_rtems_irq_handler(&aarrggh))
|
if (!BSP_install_rtems_irq_handler(&aarrggh))
|
||||||
BSP_panic("unable to install vmeUniverse irq handler");
|
rtems_panic("unable to install vmeUniverse irq handler");
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (!BSP_install_rtems_irq_handler(&aarrggh))
|
if (!BSP_install_rtems_irq_handler(&aarrggh))
|
||||||
BSP_panic("unable to install vmeUniverse irq handler");
|
rtems_panic("unable to install vmeUniverse irq handler");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ void CPU_rtems_irq_mng_init(unsigned cpuId)
|
|||||||
/*
|
/*
|
||||||
* put something here that will show the failure...
|
* put something here that will show the failure...
|
||||||
*/
|
*/
|
||||||
BSP_panic("Unable to initialize RTEMS interrupt Management\n");
|
rtems_panic("Unable to initialize RTEMS interrupt Management\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -155,11 +155,11 @@ void CPU_rtems_irq_mng_init(unsigned cpuId)
|
|||||||
vectorDesc.off = nop_raw_enable;
|
vectorDesc.off = nop_raw_enable;
|
||||||
vectorDesc.isOn = raw_is_connected;
|
vectorDesc.isOn = raw_is_connected;
|
||||||
if (!mpc5xx_set_exception (&vectorDesc)) {
|
if (!mpc5xx_set_exception (&vectorDesc)) {
|
||||||
BSP_panic("Unable to initialize RTEMS decrementer raw exception\n");
|
rtems_panic("Unable to initialize RTEMS decrementer raw exception\n");
|
||||||
}
|
}
|
||||||
vectorDesc.exceptIndex = ASM_EXT_VECTOR;
|
vectorDesc.exceptIndex = ASM_EXT_VECTOR;
|
||||||
vectorDesc.hdl.vector = ASM_EXT_VECTOR;
|
vectorDesc.hdl.vector = ASM_EXT_VECTOR;
|
||||||
if (!mpc5xx_set_exception (&vectorDesc)) {
|
if (!mpc5xx_set_exception (&vectorDesc)) {
|
||||||
BSP_panic("Unable to initialize RTEMS external raw exception\n");
|
rtems_panic("Unable to initialize RTEMS external raw exception\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -675,8 +675,6 @@ static inline void _CPU_ISR_Set_level( uint32_t level )
|
|||||||
_CPU_MSR_SET(msr);
|
_CPU_MSR_SET(msr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BSP_panic(char *);
|
|
||||||
|
|
||||||
/* Fatal Error manager macros */
|
/* Fatal Error manager macros */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user