diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-13 13:00:00 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-02-14 10:28:30 +0100 |
commit | ad563618ca49816e8db755cb44a101dacc270a2a (patch) | |
tree | 23941c95b7118e43cb64239e0527e77cc903a42f /c/src/lib/libbsp/sparc/leon3/startup/bspstart.c | |
parent | score: Add Atomic_Uint (diff) | |
download | rtems-ad563618ca49816e8db755cb44a101dacc270a2a.tar.bz2 |
sparc: Add LEON3_ASR17_PROCESSOR_INDEX_SHIFT
Add _LEON3_Get_current_processor().
Diffstat (limited to '')
-rw-r--r-- | c/src/lib/libbsp/sparc/leon3/startup/bspstart.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c index 4b9450d2df..dea2a1166c 100644 --- a/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c +++ b/c/src/lib/libbsp/sparc/leon3/startup/bspstart.c @@ -27,7 +27,7 @@ int CPU_SPARC_HAS_SNOOPING; /* Index of CPU, in an AMP system CPU-index may be non-zero */ -int LEON3_Cpu_Index = 0; +uint32_t LEON3_Cpu_Index = 0; extern void amba_initialize(void); @@ -50,14 +50,6 @@ static inline int set_snooping(void) return (tmp >> 23) & 1; } -/* ASM-function used to get the CPU-Index on calling LEON3 CPUs */ -static inline unsigned int get_asr17(void) -{ - unsigned int reg; - __asm__ (" mov %%asr17, %0 " : "=r"(reg) :); - return reg; -} - /* * bsp_start * @@ -72,7 +64,7 @@ void bsp_start( void ) * and RTEMS on this CPU, and AMP system with mixed operating * systems */ - LEON3_Cpu_Index = (get_asr17() >> 28) & 3; + LEON3_Cpu_Index = _LEON3_Get_current_processor(); /* Scan AMBA Plug&Play and parse it into a RAM description (ambapp_plb), * find GPTIMER for bus frequency, find IRQ Controller and initialize |