UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
10,926 Views
Registered: ‎10-14-2015

application for enabling/disabling jtag port through devcfg control register

Jump to solution

Hi,

at the end of xapp1175 (secure boot) there is an interesting suggestion about how to enable and disable jtag port at request from a technician on the field. the xapp suggest to use an interrupt routine that, when pressing a push button, it toogles bit 23 in devcfg control register (address 0xf8007000).

on our custom board we don't have buttons, so I am trying to write a linux application that could do the same.

 

my problem is, how can I access xdevcfg control register  from userspace?

 

kernel driver only manages bitstream files loading, if I  access /dev/xdevcfg opening the file or through mmap the board completely reset when I try to read anything.

 

Best regards,

Rocco

0 Kudos
1 Solution

Accepted Solutions
Scholar rfs613
Scholar
21,318 Views
Registered: ‎05-28-2013

Re: application for enabling/disabling jtag port through devcfg control register

Jump to solution

Hi Rocco,

 

A simple way to access physical registers from userspace is the "devmem" program. It is almost certainly already included. To read the register:

devmem 0xf8007000

To perform a write, where 0x12345678 is the value you want to write:

devmem 0xf8007000 32 0x12345678

If you want to do it from C code, the source code for devmem is easy to incorporate.

 

Note that devmem program is intended for debugging. If you need to write a lot of data, calling it many times is not efficient. But if you just need to poke a register or two, it is very convenient.

0 Kudos
2 Replies
Scholar rfs613
Scholar
21,319 Views
Registered: ‎05-28-2013

Re: application for enabling/disabling jtag port through devcfg control register

Jump to solution

Hi Rocco,

 

A simple way to access physical registers from userspace is the "devmem" program. It is almost certainly already included. To read the register:

devmem 0xf8007000

To perform a write, where 0x12345678 is the value you want to write:

devmem 0xf8007000 32 0x12345678

If you want to do it from C code, the source code for devmem is easy to incorporate.

 

Note that devmem program is intended for debugging. If you need to write a lot of data, calling it many times is not efficient. But if you just need to poke a register or two, it is very convenient.

0 Kudos
Explorer
Explorer
10,761 Views
Registered: ‎10-14-2015

Re: application for enabling/disabling jtag port through devcfg control register

Jump to solution

thank you very much!

0 Kudos