Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360671
b: refs/heads/master
c: c787c2d
h: refs/heads/master
i:
  360669: 89b1cbd
  360667: f5396be
  360663: 160636a
  360655: 598b75a
  360639: ad8a9e7
v: v3
  • Loading branch information
James Hogan committed Mar 2, 2013
1 parent d2a6ad0 commit cef124e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 82f0167aa4c4bbc06b5a2e1e83d252792f7c5754
refs/heads/master: c787c2d62fe0c482f5fb3e5b869cd262fe69b244
4 changes: 4 additions & 0 deletions trunk/arch/metag/include/asm/metag_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@
#define TXPRIVEXT_REGNUM 29
#define TXPRIVEXT_COPRO_BITS 0xFF000000 /* Co-processor 0-7 */
#define TXPRIVEXT_COPRO_S 24
#ifndef METAC_1_2
#define TXPRIVEXT_TXTIMER_BIT 0x00080000 /* TXTIMER priv */
#define TXPRIVEXT_TRACE_BIT 0x00040000 /* TTEXEC|TTCTRL|GTEXEC */
#endif
#define TXPRIVEXT_TXTRIGGER_BIT 0x00020000 /* TXSTAT|TXMASK|TXPOLL */
#define TXPRIVEXT_TXGBLCREG_BIT 0x00010000 /* Global common regs */
#define TXPRIVEXT_CBPRIV_BIT 0x00008000 /* Mem i/f dump priv */
Expand Down
34 changes: 27 additions & 7 deletions trunk/arch/metag/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <asm/hwthread.h>
#include <asm/l2cache.h>
#include <asm/mach/arch.h>
#include <asm/metag_regs.h>
#include <asm/mmu.h>
#include <asm/mmzone.h>
#include <asm/processor.h>
Expand All @@ -43,18 +44,37 @@
#include <asm/setup.h>
#include <asm/traps.h>

/* PRIV protect as many registers as possible. */
#define DEFAULT_PRIV 0xff0f7f00

/* Enable unaligned access checking. */
#define UNALIGNED_PRIV 0x00000010
/* Priv protect as many registers as possible. */
#define DEFAULT_PRIV (TXPRIVEXT_COPRO_BITS | \
TXPRIVEXT_TXTRIGGER_BIT | \
TXPRIVEXT_TXGBLCREG_BIT | \
TXPRIVEXT_ILOCK_BIT | \
TXPRIVEXT_TXITACCYC_BIT | \
TXPRIVEXT_TXDIVTIME_BIT | \
TXPRIVEXT_TXAMAREGX_BIT | \
TXPRIVEXT_TXTIMERI_BIT | \
TXPRIVEXT_TXSTATUS_BIT | \
TXPRIVEXT_TXDISABLE_BIT)

/* Meta2 specific bits. */
#ifdef CONFIG_METAG_META12
#define META2_PRIV 0
#else
#define META2_PRIV (TXPRIVEXT_TXTIMER_BIT | \
TXPRIVEXT_TRACE_BIT)
#endif

/* Unaligned access checking bits. */
#ifdef CONFIG_METAG_UNALIGNED
#define PRIV_BITS (DEFAULT_PRIV | UNALIGNED_PRIV)
#define UNALIGNED_PRIV TXPRIVEXT_ALIGNREW_BIT
#else
#define PRIV_BITS DEFAULT_PRIV
#define UNALIGNED_PRIV 0
#endif

#define PRIV_BITS (DEFAULT_PRIV | \
META2_PRIV | \
UNALIGNED_PRIV)

extern char _heap_start[];

#ifdef CONFIG_METAG_BUILTIN_DTB
Expand Down

0 comments on commit cef124e

Please sign in to comment.