source: rtems/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c @ e79a1947

4.104.114.84.95
Last change on this file since e79a1947 was ea29ba6, checked in by Joel Sherrill <joel.sherrill@…>, on 02/20/03 at 21:46:04

2003-02-20 Till Straumann <strauman@…>

PR 349/bsps

  • startup/pgtbl_setup.c, startup/pgtbl_activate.c: New files
  • startup/Makefile.am, startup/bspstart.c, startup/linkcmds: Let the powerpc/shared (+derived) BSPs use pagetable support

from libcpu.

  • Property mode set to 100644
File size: 824 bytes
Line 
1/* $Id$ */
2
3#include <rtems.h>
4#include <libcpu/pte121.h>
5#include <libcpu/bat.h>
6
7/* Default activation of the page tables. This is a weak
8 * alias, so applications may easily override this
9 * default activation procedure.
10 */
11
12/* Author: Till Straumann, <strauman@slac.stanford.edu>, 4/2002 */
13
14void
15BSP_pgtbl_activate(Triv121PgTbl) __attribute__ (( weak, alias("__BSP_default_pgtbl_activate") ));
16
17void
18__BSP_default_pgtbl_activate(Triv121PgTbl pt)
19{
20        if (!pt) return;
21
22        /* switch the text/ro sements to RO only after
23         * initializing the interrupts because the irq_mng
24         * installs some code...
25         *
26         * activate the page table; it is still masked by the
27         * DBAT0, however
28         */
29        triv121PgTblActivate(pt);
30
31        /* finally, switch off DBAT0 */
32        setdbat(0,0,0,0,0);
33        /* At this point, DBAT0 is available for other use... */
34}
Note: See TracBrowser for help on using the repository browser.