[#5062] kgdb self tests fail on hw breakpoint write
Submitted By: Mike Frysinger
Open Fixed In Release:
Found In Release:
ALL Silicon Revision:
Is this bug repeatable?:
Uboot version or rev.:
Toolchain version or rev.:
App binary format:
Summary: kgdb self tests fail on hw breakpoint write
built up default kernel, enabled CONFIG_KGDB_TESTS_ON_BOOT, and set CONFIG_KGDB_TESTS_BOOT_STRING to "V1"
this gives me the output:
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 20) is a BFIN-UART
kgdb: Registered I/O driver kgdbts.
kgdbts:RUN plant and detach test
kgdbts:RUN sw breakpoint test
kgdbts:RUN bad memory access test
kgdbts:RUN singlestep test 1000 iterations
kgdbts:RUN singlestep [0/1000]
kgdbts:RUN singlestep [100/1000]
kgdbts:RUN singlestep [200/1000]
kgdbts:RUN singlestep [300/1000]
kgdbts:RUN singlestep [400/1000]
kgdbts:RUN singlestep [500/1000]
kgdbts:RUN singlestep [600/1000]
kgdbts:RUN singlestep [700/1000]
kgdbts:RUN singlestep [800/1000]
kgdbts:RUN singlestep [900/1000]
kgdbts:RUN hw breakpoint test
kgdbts:RUN hw write breakpoint test
kgdbts: ERROR PUT: end of test buffer on 'hw_write_break_test' line 1 expected OK got $E28#af
--- Sonic Zhang 2009-05-21 05:35:11
Not a bug. Blackfin doesn't support hardware watchpoint in kernel mode. It is
enabled only when JTAG emulator is connected.
So, skip HW watchpoint test in kgdbts.c
--- Mike Frysinger 2009-05-21 14:02:55
that isnt a "rejection", that is a "fix". the builtin tests
shouldnt fail at all.
i also dont think your change is correct. hardware instruction watchpoints
(breakpoints) should work just fine -- they can trigger an exception or
emulation. hardware data watchpoints (watchpoints) cannot work with kgdb as
they only trigger emulation.
thus, we should pretend that the hardware data watchpoints dont even exist.
that means our kgdb.h should not be declaring HW_WATCHPOINT_NUM as 8, but rather
as HW_INST_WATCHPOINT_NUM, nor should we be programming any of the WPD* MMRs,
only the WPI* MMRs.
--- Sonic Zhang 2009-05-21 22:40:06
No matter if we pretend that the hardware data watchpoints dont even exist, the
change to kgdbts is still needed.
The code for hardware watchpoint is kept in case future blackfin may allow hw
watch point in kernel mode.
--- Sonic Zhang 2009-05-22 00:48:55
And hw watch is never accessed in current kgdb, since only
HW_INST_WATCHPOINT_NUM is allowed.
Set this bug to fixed.
--- Mike Frysinger 2009-05-23 19:50:33
we shouldnt be allowing data watchpoints at all. our bfin_set_hw_break() should
be returning an error and then the kgdbts.c and other code can key off of that
instead of creating special defines for it.
no future Blackfin 10x part is going to change the watchpoint unit. this is
dead code that only wastes space.
--- Sonic Zhang 2009-05-25 00:03:29
Error has already be returned in current kgdb hw bp code.
--- Sonic Zhang 2009-05-25 00:03:35
Error has already been returned in current kgdb hw bp code.
--- Sonic Zhang 2009-05-25 00:04:36
That's why kgdbts report case failure.
--- Sonic Zhang 2009-05-25 00:05:45
So, we either let kgdbts fails or skip the test cases. Which do you prefer?
File Name File Type File Size Posted By
No Files Were Found