source: rtems/c/src/lib/libbsp/m68k/efi68k/start68k/start68k.c @ 5c3511e

4.104.114.84.95
Last change on this file since 5c3511e was 437366f, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 7, 1997 at 9:25:42 PM

removed noreturn from prototype to avoid warnings.

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