source: rtems/c/src/lib/libbsp/powerpc/qoriq/include/mmu.h @ dc0a7df

4.115
Last change on this file since dc0a7df was dc0a7df, checked in by Sebastian Huber <sebastian.huber@…>, on 07/21/11 at 15:18:02

2011-07-21 Sebastian Huber <sebastian.huber@…>

PR 1799/bsps

  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, configure.ac, clock/clock-config.c, console/console-config.c, console/uart-bridge-master.c, console/uart-bridge-slave.c, include/.cvsignore, include/bsp.h, include/hwreg_vals.h, include/intercom.h, include/irq.h, include/mmu.h, include/qoriq.h, include/tm27.h, include/tsec-config.h, include/u-boot-config.h, include/uart-bridge.h, irq/irq.c, make/custom/qoriq.inc, make/custom/qoriq_core_0.cfg, make/custom/qoriq_core_1.cfg, make/custom/qoriq_p1020rdb.cfg, network/if_intercom.c, network/network.c, rtc/rtc-config.c, shmsupp/intercom-mpci.c, shmsupp/intercom.c, shmsupp/lock.S, start/start.S, startup/bsppredriverhook.c, startup/bspreset.c, startup/bspstart.c, startup/linkcmds.base, startup/linkcmds.qoriq_core_0, startup/linkcmds.qoriq_core_1, startup/linkcmds.qoriq_p1020rdb, startup/mmu-config.c, startup/mmu-tlb1.S, startup/mmu.c: New files.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup QorIQMMU
5 *
6 * @brief MMU API.
7 */
8
9/*
10 * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 *
22 * $Id$
23 */
24
25#ifndef LIBBSP_POWERPC_QORIQ_MMU_H
26#define LIBBSP_POWERPC_QORIQ_MMU_H
27
28#include <stdint.h>
29#include <stdbool.h>
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* __cplusplus */
34
35/**
36 * @defgroup QorIQMMU QorIQ - MMU Support
37 *
38 * @ingroup QorIQ
39 *
40 * @brief MMU support.
41 *
42 * @{
43 */
44
45#define QORIQ_MMU_ENTRY_COUNT 32
46
47#define QORIQ_MMU_MIN_POWER 12
48#define QORIQ_MMU_MAX_POWER 32
49#define QORIQ_MMU_POWER_STEP 2
50
51typedef struct {
52        uint32_t begin;
53        uint32_t last;
54        uint32_t mas1;
55        uint32_t mas2;
56        uint32_t mas3;
57} qoriq_mmu_entry;
58
59typedef struct {
60        int count;
61        qoriq_mmu_entry entries [QORIQ_MMU_ENTRY_COUNT];
62} qoriq_mmu_context;
63
64void qoriq_mmu_context_init(qoriq_mmu_context *self);
65
66bool qoriq_mmu_add(
67        qoriq_mmu_context *self,
68        uint32_t begin,
69        uint32_t last,
70        uint32_t mas1,
71        uint32_t mas2,
72        uint32_t mas3
73);
74
75void qoriq_mmu_partition(qoriq_mmu_context *self, int max_count);
76
77void qoriq_mmu_write_to_tlb1(qoriq_mmu_context *self, int first_tlb);
78
79void qoriq_mmu_change_perm(uint32_t test, uint32_t set, uint32_t clear);
80
81void qoriq_mmu_config(int first_tlb, int scratch_tlb);
82
83void qoriq_tlb1_write(
84        int esel,
85        uint32_t mas1,
86        uint32_t mas2,
87        uint32_t mas3,
88        uint32_t ea,
89        uint32_t tsize
90);
91
92void qoriq_tlb1_invalidate(int esel);
93
94/** @} */
95
96#ifdef __cplusplus
97}
98#endif /* __cplusplus */
99
100#endif /* LIBBSP_POWERPC_QORIQ_MMU_H */
Note: See TracBrowser for help on using the repository browser.