source: rtems/c/src/lib/libbsp/m68k/efi68k/start/start.c @ 6335022e

4.104.114.84.95
Last change on this file since 6335022e was 6335022e, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 11, 1997 at 3:42:59 PM

updates from John Gwynne

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