summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/mips/malta/startup/bspreset.c
blob: 6d406ea9431bc033fca294a48684904defbd9821 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 *  @file
 *
 *  This file contains the code necessary to reset the Malta board.
 */

/*
 *  COPYRIGHT (c) 1989-2012.
 *  On-Line Applications Research Corporation (OAR).
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.rtems.org/license/LICENSE.
 */

#include <rtems.h>
#include <bsp/bootcard.h>

void bsp_reset(void)
{
  uint32_t *reset;

  reset= (uint32_t *)0x9F000500;
  /*
   * Qemu understands 0x42 to reset simulated machine.
   * We added code to recognize 0xFF to exit simulator.
   *
   * TBD: Qemu PC simulation has option to exit on reset.
   *      find processing of that command line option and
   *      use it to change behaviour of 0x42.
   */
  // *reset = 0x42;
  *reset = 0xFF;
}