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

4.115
Last change on this file since f2d1c4d was f2d1c4d, checked in by Sebastian Huber <sebastian.huber@…>, on Dec 3, 2010 at 10:49:50 AM

2010-12-03 Sebastian Huber <sebastian.huber@…>

  • startup/bspgetworkarea.c: Removed file.
  • Makefile.am, bsp_specs, start/start.S, startup/bspstart.c, libnds/include/nds/jtypes.h, libnds/source/arm9/gurumeditation.c, libnds/source/common/interruptDispatcher.S, libnds/source/common/interrupts.c, startup/linkcmds: Use linker command base file.
  • 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 <bsp/linker-symbols.h>
17#include <nds.h>
18
19extern void BSP_rtems_irq_mngt_init (void);
20/*
21 * start the platform.
22 */
23
24void bsp_start (void)
25{
26  /* initialize irq management */
27  BSP_rtems_irq_mngt_init ();
28
29  /* setup console mode for lower screen */
30  irqEnable (IRQ_VBLANK);
31  videoSetMode (0);
32  videoSetModeSub (MODE_0_2D | DISPLAY_BG0_ACTIVE);
33  vramSetBankC (VRAM_C_SUB_BG);
34
35  SUB_BG0_CR = BG_MAP_BASE (31);
36  BG_PALETTE_SUB[255] = RGB15 (31, 31, 31);
37  consoleInitDefault ((u16 *) SCREEN_BASE_BLOCK_SUB (31),
38                      (u16 *) CHAR_BASE_BLOCK_SUB (0), 16);
39
40  /* print status message */
41  printk ("[+] kernel console started\n");
42
43  /* set the cpu mode to system user */
44  arm_cpu_mode = 0x1f;
45
46  /* configure clock period */
47  Configuration.microseconds_per_tick = 10000;  /* us */
48}
49
50/*
51 * reset bss area.
52 */
53
54void
55bss_reset (void)
56{
57
58  memset (bsp_section_bss_begin, 0, (size_t) bsp_section_bss_size);
59}
60
61/*
62 * A few symbols needed by libnds but not used.
63 */
64
65#include "../include/sys/iosupport.h"
66const devoptab_t *devoptab_list[STD_MAX];
67void *punixTime;
Note: See TracBrowser for help on using the repository browser.