source: rtems/c/src/lib/libbsp/arm/nds/startup/bspstart.c @ 1a1279f

4.104.11
Last change on this file since 1a1279f was 1a1279f, checked in by Joel Sherrill <joel.sherrill@…>, on Apr 26, 2010 at 1:30:08 AM

2010-04-25 Joel Sherrill <joel.sherrilL@…>

  • startup/bspstart.c: Fix warning.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * RTEMS for Nintendo DS platform initialization.
3 *
4 * Copyright (c) 2008 by Matthieu Bucchianeri <mbucchia@gmail.com>
5 *
6 * The license and distribution terms for this file may be
7 * found in the file LICENSE in this distribution or at
8 *
9 * http://www.rtems.com/license/LICENSE
10 *
11 * $Id$
12 */
13
14#include <bsp.h>
15#include <bsp/bootcard.h>
16#include <nds.h>
17
18extern void BSP_rtems_irq_mngt_init (void);
19/*
20 * start the platform.
21 */
22
23void bsp_start (void)
24{
25  /* initialize irq management */
26  BSP_rtems_irq_mngt_init ();
27
28  /* setup console mode for lower screen */
29  irqEnable (IRQ_VBLANK);
30  videoSetMode (0);
31  videoSetModeSub (MODE_0_2D | DISPLAY_BG0_ACTIVE);
32  vramSetBankC (VRAM_C_SUB_BG);
33
34  SUB_BG0_CR = BG_MAP_BASE (31);
35  BG_PALETTE_SUB[255] = RGB15 (31, 31, 31);
36  consoleInitDefault ((u16 *) SCREEN_BASE_BLOCK_SUB (31),
37                      (u16 *) CHAR_BASE_BLOCK_SUB (0), 16);
38
39  /* print status message */
40  printk ("[+] kernel console started\n");
41
42  /* set the cpu mode to system user */
43  arm_cpu_mode = 0x1f;
44
45  /* configure clock period */
46  Configuration.microseconds_per_tick = 10000;  /* us */
47}
48
49/*
50 * reset bss area.
51 */
52
53extern uint8_t __bss_start;
54extern uint8_t __bss_end;
55
56void
57bss_reset (void)
58{
59
60  memset (&__bss_start, 0, (uint32_t) & __bss_end - (uint32_t) & __bss_start);
61}
62
63/*
64 * A few symbols needed by libnds but not used.
65 */
66
67#include "../include/sys/iosupport.h"
68const devoptab_t *devoptab_list[STD_MAX];
69void *punixTime;
Note: See TracBrowser for help on using the repository browser.