Hello,
I am getting the following error when i use mmap
!!!abort_handler addr = 0x401147a0, isr = 0x0, status = 0x22a0
!!!abort_handler addr = 0x40015000, isr = 0x0, status = 0x2a0
I am invoking mmap with the following args,
mmaptr = mmap(NULL, 4, PROT_READ, MAP_PRIVATE, fd, IXP425_OSTS)
The value of IXP425_OSTS is taken from ixp425.h,
fd is the one obtained from opening /dev/mem.
Is there anything wrong with the arguments ?.
Actually i want to to read the value of mmaptr before and after executing
a piece of code.Do i need to unmap and map again each time i read the mmaptr ?
Thanks,
Vanitha
-----Original Message-----
From: Deepak Saxena [SMTP:dsaxena@xxxxxxxxxxx]
Sent: Wednesday, December 17, 2003 3:41 PM
To: Vanitha Ramaswami
Cc: 'linux-arm@xxxxxxxxxxxxxxxxxxxxxx'
Subject: Re: How to measure the time ticks taken to execute a system
call on IXP425
On Dec 17 2003, at 15:24, Vanitha Ramaswami was caught saying:
> Hi,
>
> Thanks for your mail.
> I could read the OSTS register from a kernel module
> directly i am reading from the value from the register
> using *(volatile unsigned long) IXP425_OSTS
>
> But i am not able read the from a user space application
> I am not able to include asm/hardware.h from my user space
> application..
> Is there any way to read from userspace aswell.
Read my original email:
Just mmap() the register into your process.
Do a man mmap if you've never used mmap before. The file you want
to use is /dev/mem
~Deepak
>
> Thanks,
> Vanitha
> -----Original Message-----
> From: Deepak Saxena [SMTP:dsaxena@xxxxxxxxxxx]
> Sent: Tuesday, December 16, 2003 9:00 AM
> To: Vanitha Ramaswami
> Cc: 'linux-arm@xxxxxxxxxxxxxxxxxxxxxx'
> Subject: Re: How to measure the time ticks taken to execute a system
> call on IXP425
>
> On Dec 16 2003, at 08:49, Vanitha Ramaswami was caught saying:
> > Hi All,
> >
> > I am running embedded linux on IXP425 Coyote Board.
> > I want to measure the time ticks taken to execute a system call.
> > I couldnt find timestamp counter processor register for IXP425.
> >
> > Is there any call equivalent to rdtsc assembly instruction on IXP425 ?
>
> You can use the XScale core's Performance Monitoring Unit (PMU)
> to read the number of clock cycles it takes to perform the call.
> It's only accessible in svc mode I believe, so you'd have to
> place the code in the kernel and log the data in a buffer.
>
> Another option is to read the OSTS register before and after the
> system call as this counts timer ticks. DO NOT write to this
> register as the kernel uses it. Just mmap() the register into
> your process.
>
> Or alternativly, use Linux Trace Toolkit.
>
> ~Deepak
>
> --
> Deepak Saxena - dsaxena@xxxxxxxxxxx
>
>
--
Deepak Saxena - dsaxena@xxxxxxxxxxx
-------------------------------------------------------------------
Subscription options: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ/Etiquette: http://www.arm.linux.org.uk/armlinux/mailinglists.php
|