Allocate memory within an application and modify its access permissions

2013-08-27 Thread Hesham Moustafa
Hey all, I want to allocate memory within an application code, set memory access attributes on it, and check whether these permissions are set correctly or not. I tried to use _Workspace_Allocate(), malloc(), and partition and region managers to allocate a region of memory, but just after I set t

Re: SMP: ISR disable/enable vs. mutual exclustion

2013-08-27 Thread Chris Johns
Sebastian Huber wrote: On 2013-08-27 01:26, Chris Johns wrote: Sebastian Huber wrote: On 2013-08-24 04:10, Chris Johns wrote: Thus the normal extract operation is not available on SMP. An extract variant which needs also the chain control as a parameter must be used. I think a node may need

Re: [PATCH] libmm patches after fixups

2013-08-27 Thread Gedare Bloom
For 0003-libmm-libcpu-arm-shared.patch, you should not specify the exception handler is inline, since you register a pointer for it. At any rate can you use the ARM's default exception handler (Sebastian pointed it out in another email). Also, you should probably get rid of the arm_cp15_print_fsr.c

Re: [PATCH 3/5] Shared libmm implemenation for ARM BSPs

2013-08-27 Thread Gedare Bloom
On Tue, Aug 27, 2013 at 4:15 AM, Sebastian Huber wrote: > > For the ARM exception handling see: > > http://git.rtems.org/rtems/tree/cpukit/score/cpu/arm/armv4-exception-default.S > > They end up in: > > void _ARM_Exception_default( CPU_Exception_frame *frame ) > { > rtems_fatal( RTEMS_FATAL_SOUR

Re: SMP: ISR disable/enable vs. mutual exclustion

2013-08-27 Thread Sebastian Huber
On 2013-08-27 01:26, Chris Johns wrote: Sebastian Huber wrote: On 2013-08-24 04:10, Chris Johns wrote: Thus the normal extract operation is not available on SMP. An extract variant which needs also the chain control as a parameter must be used. I think a node may need a back pointer to the ch

Re: [PATCH 1/5] libmm score API

2013-08-27 Thread Sebastian Huber
On 2013-08-26 20:24, Hesham Moustafa wrote: >> #define RTEMS_MM_REGION_BIT_READ 0 >> #define RTEMS_MM_REGION_BIT_WRITE 1 >> #define RTEMS_MM_REGION_BIT_EXECUTE 2 >> #define RTEMS_MM_REGION_BIT_CACHE 3 >> #define RTEMS_MM_REGION_BIT_DEVICE 4 >> #define RTEMS_MM_REGION

Re: [PATCH 3/5] Shared libmm implemenation for ARM BSPs

2013-08-27 Thread Sebastian Huber
On 2013-08-26 20:28, Hesham Moustafa wrote: On Mon, Aug 26, 2013 at 5:31 PM, Sebastian Huber mailto:sebastian.hu...@embedded-brains.de>> wrote: On 2013-08-26 02:14, Hesham AL-Matary wrote: +/** + * @brief dummy exception handler for data aborts to help in debugging

Re: Do not wait for secondary cpus to runs.

2013-08-27 Thread Sebastian Huber
On 2013-08-27 06:24, Chris Johns wrote: Hi, This patch removes the wait of the primary cpu for the secondary cpus during initialisation. If there is a problem with a bootloader where the secondary cpus do not run RTEMS should at least operate in a degraded state rather than not at all. The mai

Re: Set secondary cpus to shutdown if multitasking returns.

2013-08-27 Thread Sebastian Huber
On 2013-08-27 06:27, Chris Johns wrote: @@ -42,6 +41,12 @@ void rtems_smp_secondary_cpu_initialize( void ) _Per_CPU_Wait_for_state( self_cpu, PER_CPU_STATE_BEGIN_MULTITASKING ); _Thread_Start_multitasking( NULL ); + + _Per_CPU_Change_state( self_cpu, PER_CPU_STATE_SHUTDOWN ); + + while

Re: Set secondary cpus to shutdown if multitasking returns.

2013-08-27 Thread Chris Johns
Joel Sherrill wrote: Since I have not looked at the code... How does the scheduler know to ignore these cores? The CPU state does not enter UP. I assume this means the core is not available for scheduling. I have not checked the code to make sure this happens. Does the set of cores with