source: rtems/c/src/lib/libbsp/m68k/efi68k/start68k/start68k.c @ 9b64c2d5

4.104.114.84.95
Last change on this file since 9b64c2d5 was e2a2ec60, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 21, 1998 at 3:37:18 PM

Switch to using a shared main() for all of the embedded BSPs
based on the GNU tools. This usually involved correcting the
type of bsp_start(), bsp_cleanup(), adjusting the start code to
call the right start routine (the shared boot_card()), and then
removing code from bsp_start() which was performed in the new
boot_card()/main() path.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  $Id$
3 */
4
5#include <efi68k.h>
6#define __START_C__
7#include "bsp.h"
8
9m68k_isr_entry M68Kvec[256];
10m68k_isr_entry vectors[256];
11char * const __argv[]= {"main", ""};
12char * const __env[]= {""};
13
14/*
15 *  This prototype really should have the noreturn attribute but
16 *  that causes a warning since it appears that the routine does
17 *  return.
18 *
19 *   void dumby_start ()  __attribute__ ((noreturn));
20 */
21
22void dumby_start ();
23void  dumby_start() {
24
25  /* We need to by-pass the link instruction since the RAM chip-
26     select pins are not yet configured. */
27  asm volatile ( ".global start ;
28                  start:");
29
30  /* disable interrupts, load stack pointer */
31  asm volatile ( "oriw  #0x0700, %sr;
32                  movel  #_end, %d0;
33                  addl   " STACK_SIZE ",%d0;
34                  movel  %d0,%sp;
35                  link %a6, #0"
36                  );
37  /*
38   * Initialize RAM by copying the .data section out of ROM (if
39   * needed) and "zero-ing" the .bss section.
40   */
41  {
42    register char *src = _endtext;
43    register char *dst = _sdata;
44
45    if (_copy_data_from_rom)
46      /* ROM has data at end of text; copy it. */
47      while (dst < _edata)
48        *dst++ = *src++;
49   
50    /* Zero bss */
51    for (dst = __bss_start; dst< _end; dst++)
52      *dst = 0;
53  }
54
55  /*
56   * Initalize the board.
57   */
58  Spurious_Initialize();
59  console_init();
60  watch_dog_init();
61  tcp_init();
62
63  /*
64   * Execute main with arguments argv and environment env
65   */
66  /* main(1, __argv, __env); */
67  boot_card();
68
69  reboot();
70}
Note: See TracBrowser for help on using the repository browser.