source: rtems/c/src/lib/libbsp/m68k/efi68k/start/start.c @ 9b2c969

4.104.114.84.95
Last change on this file since 9b2c969 was 9b2c969, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 13, 2000 at 3:07:03 PM

Made sweep of changes to get all BSPs to the same point on the linkcmds
and memory layout. Next step is to share the same bsp_pretasking_hook.

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