source: rtems/c/src/lib/libbsp/powerpc/gen83xx/startup/bspidle.c @ fc472c9

4.104.115
Last change on this file since fc472c9 was fc472c9, checked in by Joel Sherrill <joel.sherrill@…>, on 08/26/09 at 13:31:40

2009-08-26 Joel Sherrill <joel.sherrill@…>

  • Makefile.am, startup/bspstart.c: Rename BSP specific idle thread to bsp_idle_thread and split into its own file.
  • startup/bspidle.c: New file.
  • Property mode set to 100644
File size: 860 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup mpc83xx
5 *
6 * @brief Source for BSP Idle Thread
7 */
8
9/*
10 * Copyright (c) 2008
11 * Embedded Brains GmbH
12 * Obere Lagerstr. 30
13 * D-82178 Puchheim
14 * Germany
15 * rtems@embedded-brains.de
16 *
17 * The license and distribution terms for this file may be found in the file
18 * LICENSE in this distribution or at http://www.rtems.com/license/LICENSE.
19 *
20 * $Id$
21 */
22
23#include <bsp.h>
24
25/**
26 * @brief Idle thread body.
27 *
28 * Replaces the one in c/src/exec/score/src/threadidlebody.c
29 * The MSR[POW] bit is set to put the CPU into the low power mode
30 * defined in HID0.  HID0 is set during starup in start.S.
31 */
32void *bsp_idle_thread( uintptr_t ignored )
33{
34
35  while (1) {
36    asm volatile (
37      "mfmsr 3;"
38      "oris 3, 3, 4;"
39      "sync;"
40      "mtmsr 3;"
41      "isync;"
42      "ori 3, 3, 0;"
43      "ori 3, 3, 0"
44    );
45  }
46
47  return NULL;
48}
Note: See TracBrowser for help on using the repository browser.