OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libbsp/] [m68k/] [efi68k/] [start/] [start.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  $Id: start.c,v 1.2 2001-09-27 12:00:03 chris Exp $
3
 */
4
 
5
#include <efi68k.h>
6
#define __START_C__
7
#include "bsp.h"
8
 
9
m68k_isr_entry M68Kvec[256];
10
m68k_isr_entry vectors[256];
11
char * const __argv[]= {"main", ""};
12
char * 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
 
22
void dumby_start ();
23
void  dumby_start() {
24
void  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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.