Subject: Re: interrupt variables
To: None <iwamoto@sat.t.u-tokyo.ac.jp>
From: Robert Swindells <rjs@genrad.co.uk>
List: port-arm32
Date: 07/24/2001 15:10:10
IWAMOTO Toshihiro wrote:
>At Tue, 24 Jul 2001 12:00:15 +0100 (BST),
>Robert Swindells wrote:
>> I had been tracking down why I was getting faults in the files I
>> copied from hpcarm/sa11x0. It was being generated when a variable
>> called saipic_base was written with the virtual address of the
>> interrupt controller registers.
>> 
>> The hpcarm port gets away with this as the kernel text is mapped RW,
>> but I also wondered if I was missing something in my reading of the
>> arm32 version. I didn't spot that they were all pointers to the real
>> variables.
>> 
>> I'll do something similar in sa11x0_irq.S.

>hpcarm should map the kernel text read only.  But at the same time I
>want saipic_base being accessible by pc relative addressing, because
>this value is referenced very often.

I disagree, trying to use pc relative addresssing complicates the code
for a minor performance gain. There are other gains to be had by using
the ffs code that is in the arm32 ports.

>Changing the kernel text protection to read-only in cpu_configure()
>seems a good workaround for me, at least for hpcarm.

Except that we would need to remember to put the same hack into every
port as well.

Robert Swindells