diff options
Diffstat (limited to 'c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c')
-rw-r--r-- | c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c new file mode 100644 index 0000000000..32059b927f --- /dev/null +++ b/c/src/lib/libbsp/powerpc/shared/startup/pgtbl_activate.c @@ -0,0 +1,34 @@ +/* $Id$ */ + +#include <rtems.h> +#include <libcpu/pte121.h> +#include <libcpu/bat.h> + +/* Default activation of the page tables. This is a weak + * alias, so applications may easily override this + * default activation procedure. + */ + +/* Author: Till Straumann, <strauman@slac.stanford.edu>, 4/2002 */ + +void +BSP_pgtbl_activate(Triv121PgTbl) __attribute__ (( weak, alias("__BSP_default_pgtbl_activate") )); + +void +__BSP_default_pgtbl_activate(Triv121PgTbl pt) +{ + if (!pt) return; + + /* switch the text/ro sements to RO only after + * initializing the interrupts because the irq_mng + * installs some code... + * + * activate the page table; it is still masked by the + * DBAT0, however + */ + triv121PgTblActivate(pt); + + /* finally, switch off DBAT0 */ + setdbat(0,0,0,0,0); + /* At this point, DBAT0 is available for other use... */ +} |