forked from Imagelibrary/rtems
bsps: Use <bsp/bootcard.h>
This commit is contained in:
@@ -4,17 +4,15 @@
|
||||
* functions can be called from here.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
extern void _wr_vbr(uint32_t);
|
||||
extern void init_main(void);
|
||||
extern int boot_card(const char *);
|
||||
|
||||
/*
|
||||
* From linkcmds
|
||||
*/
|
||||
|
||||
extern uint8_t _VBR[];
|
||||
extern uint8_t _INTERRUPT_VECTOR[];
|
||||
|
||||
extern uint8_t _clear_start[];
|
||||
@@ -39,15 +37,15 @@ void Init52235(void)
|
||||
* Copy the vector table to RAM
|
||||
*/
|
||||
|
||||
if (_VBR != _INTERRUPT_VECTOR) {
|
||||
if (&_VBR != _INTERRUPT_VECTOR) {
|
||||
sp = (uint32_t *) _INTERRUPT_VECTOR;
|
||||
dp = (uint32_t *) _VBR;
|
||||
dp = (uint32_t *) &_VBR;
|
||||
for (i = 0; i < 256; i++) {
|
||||
*dp++ = *sp++;
|
||||
}
|
||||
}
|
||||
|
||||
_wr_vbr((uint32_t) _VBR);
|
||||
_wr_vbr((uint32_t) &_VBR);
|
||||
|
||||
/*
|
||||
* Move initialized data from ROM to RAM.
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
* functions can be called from here.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
extern void _wr_vbr(uint32_t);
|
||||
extern int boot_card(int, char **, char **);
|
||||
|
||||
extern long _d0_reset,_d1_reset,_M68kSpuriousInterruptCount;
|
||||
|
||||
@@ -19,7 +18,6 @@ extern long _d0_reset,_d1_reset,_M68kSpuriousInterruptCount;
|
||||
* From linkcmds
|
||||
*/
|
||||
|
||||
extern uint8_t _VBR[];
|
||||
extern uint8_t _INTERRUPT_VECTOR[];
|
||||
|
||||
extern uint8_t _clear_start[];
|
||||
@@ -39,9 +37,9 @@ void Init5225x(void)
|
||||
* Copy the vector table to RAM
|
||||
*/
|
||||
|
||||
if (_VBR != _INTERRUPT_VECTOR) {
|
||||
if (&_VBR != _INTERRUPT_VECTOR) {
|
||||
sp = (uint32_t *) _INTERRUPT_VECTOR;
|
||||
dp = (uint32_t *) _VBR;
|
||||
dp = (uint32_t *) &_VBR;
|
||||
for (i = 0; i < 256; i++) {
|
||||
*dp++ = *sp++;
|
||||
}
|
||||
@@ -73,13 +71,13 @@ void Init5225x(void)
|
||||
*sbp++ = 0;
|
||||
}
|
||||
|
||||
//_wr_vbr((uint32_t) _VBR);
|
||||
asm volatile("move.l %0,%%d7;movec %%d7,%%vbr\n\t"::"i"(_VBR): "cc");
|
||||
//_wr_vbr((uint32_t) &_VBR);
|
||||
asm volatile("move.l %0,%%d7;movec %%d7,%%vbr\n\t"::"i"(&_VBR): "cc");
|
||||
|
||||
/*
|
||||
* We have to call some kind of RTEMS function here!
|
||||
*/
|
||||
|
||||
boot_card(0, 0, 0);
|
||||
boot_card(0);
|
||||
for (;;) ;
|
||||
}
|
||||
|
||||
@@ -4,17 +4,15 @@
|
||||
* functions can be called from here.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
extern void _wr_vbr(uint32_t);
|
||||
extern void init_main(void);
|
||||
extern int boot_card(const char *);
|
||||
|
||||
/*
|
||||
* From linkcmds
|
||||
*/
|
||||
|
||||
extern uint8_t _VBR[];
|
||||
extern uint8_t _INTERRUPT_VECTOR[];
|
||||
|
||||
extern uint8_t _clear_start[];
|
||||
@@ -39,15 +37,15 @@ void Init5329(void)
|
||||
* Copy the vector table to RAM
|
||||
*/
|
||||
|
||||
if (_VBR != _INTERRUPT_VECTOR) {
|
||||
if (&_VBR != _INTERRUPT_VECTOR) {
|
||||
sp = (uint32_t *) _INTERRUPT_VECTOR;
|
||||
dp = (uint32_t *) _VBR;
|
||||
dp = (uint32_t *) &_VBR;
|
||||
for (i = 0; i < 256; i++) {
|
||||
*dp++ = *sp++;
|
||||
}
|
||||
}
|
||||
|
||||
_wr_vbr((uint32_t) _VBR);
|
||||
_wr_vbr((uint32_t) &_VBR);
|
||||
|
||||
/*
|
||||
* Move initialized data from ROM to RAM.
|
||||
|
||||
@@ -18,12 +18,11 @@
|
||||
#include <rtems/m68k/sim.h>
|
||||
#define __START_C__
|
||||
#include "bsp.h"
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
rtems_isr_entry M68Kvec[256];
|
||||
rtems_isr_entry vectors[256];
|
||||
|
||||
void boot_card(const char *cmdline);
|
||||
|
||||
/*
|
||||
* This prototype really should have the noreturn attribute but
|
||||
* that causes a warning. Not sure how to fix that.
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <bsp.h>
|
||||
#include <bsp/bootcard.h>
|
||||
#include <rtems/m68k/m68302.h>
|
||||
#include <debugport.h>
|
||||
#include <crc.h>
|
||||
@@ -117,7 +118,6 @@ void boot_phase_2(void)
|
||||
static constructors have not been called, and RTEMS is not initialised.
|
||||
*/
|
||||
|
||||
void boot_card(const char* cmdline);
|
||||
void set_debug_traps(void);
|
||||
void breakpoint(void);
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#include <bsp/bootcard.h>
|
||||
|
||||
static void
|
||||
__outb(int port, unsigned char v)
|
||||
{
|
||||
@@ -31,8 +33,6 @@ extern unsigned char __sbss2_start[], __sbss2_end[];
|
||||
extern unsigned char __sbss_start[], __sbss_end[];
|
||||
extern unsigned char __bss_start[], __bss_end[];
|
||||
|
||||
extern void boot_card(void *);
|
||||
|
||||
|
||||
void cmain (void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user