[#4652] Incorrect permissions on some debug MMRs
Submitted By: Michael McTernan
2008-11-18 16:44:56 Close Date
Closed Fixed In Release:
Found In Release:
2008R1.5 and trunk
Kernel Functions Board:
BF537 Silicon Revision:
Is this bug repeatable?:
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
Summary: Incorrect permissions on some debug MMRs
On trunk and 2008R1.5, some of the debug MMRs have incorrect permissions:
debugfs_create_x32("SPORT0_RX", 0600, parent, (u32 *)0xFFC00818);
debugfs_create_x32("SPORT0_TX", 0600, parent, (u32 *)0xFFC00810);
<same for sport1>
If you 'cat' the TX register or 'echo' into the RX register you immediately get a trap:
root:/sys/kernel/debug/blackfin/SPORT> echo > SPORT0_RX
System MMR Error
- An error occurred due to an invalid access to an System MMR location
Possible reason: a 32-bit register is accessed with a 16-bit instruction
or a 16-bit register is accessed with a 32-bit instruction.
Kernel OOPS in progress
HW Error context
TEXT = 0x07a80040-0x07ac5c00 DATA = 0x07ac5c04-0x07ad2704
BSS = 0x07ad2704-0x07ad87d4 USER-STACK = 0x07adff84
The permissions on these fs entrys can be trivially changed to remove this risk and reflect the true register access.
I believe this is also a bug on trunk. Please fix in both places if possible.
--- Mike Frysinger 2008-11-18 16:58:29
the debug-mmrs file is automatically generated ...
that said, i wasnt paying attention to the declared register permissions as i
was unable to find any actual examples where writing to a read-only register
would trigger a bug, or reading from a write-only register.
apparently SPORT_RX/SPORT_TX registers will actually generate a PAB error
according to the HRM.
--- Mike Frysinger 2008-11-18 17:08:55
hmm, actually, the CPU definition files dont appear to even explicitly declare
read/write permission. for the SPORT TX/RX registers, they define a read and a
write address. so i'll have to report this to the tools group to get their XML
--- Mike Frysinger 2009-02-27 15:41:41
should be fixed in latest versions of stuff
File Name File Type File Size Posted By
No Files Were Found