proc: sparc64 ADI version tag debugging interface
To facilitate user space ADI debugging there needs to be a way for a
debugger to get/set ADI version tags in a target process. This is
accomplished with a new /proc/<pid>/adi/tags interface. This new interface
maps linearly to the address space of the target process at a ratio
of 1:adi_blksz. A read (or write) of offset K in the file returns
(or modifies) the ADI version tag stored in the cacheline containing
address K * adi_blksz, encoded as 1 version per byte.
Pseudocode example:
unsigned char vers[2];
long long addr = 0x20000;
fd = open(â
\80\9c/proc/pid/adi/tagsâ
\80\9d, O_RDONLY);
addr /= adi_blksz();
rv = pread64(fd, &vers, 2, addr);
/*
* vers[0] gets version from address 0x20000,
* vers[1] gets version from address 0x20000 + adi_blksz()
*/
Orabug:
26051178
Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>