
Simon, Stephen,
On 2019/8/15 上午3:35, Simon Glass wrote:
Hi Kever,
On Tue, 13 Aug 2019 at 20:46, Kever Yang kever.yang@rock-chips.com wrote:
Hi Urja, Simon,
This patch is not able to pass the sandbox_spl test, it reports: [1] 26463 segmentation fault (core dumped) ./u-boot
The driver looks good to me, no idea what cause the issue.
Thanks,
- Kever
Urja Rannikko urjaman@gmail.com 于2019年5月17日周五 上午5:49写道:
Based on snooping around the linux kernel rk8xx driver. Tested on an ASUS C201.
Signed-off-by: Urja Rannikko urjaman@gmail.com
drivers/power/pmic/Kconfig | 1 + drivers/power/pmic/rk8xx.c | 62 +++++++++++++++++++++++++++++++++++--- include/power/rk8xx_pmic.h | 4 +++ 3 files changed, 63 insertions(+), 4 deletions(-)
This driver is enabled for sandbox, although I doubt it is in the device tree, so I'm not sure why it would be called. But if it is, and it directly accesses memory, then it might be the reason.
You should run the test under gdb to see where it is crashing.
gdb output is: Program received signal SIGSEGV, Segmentation fault. 0x00005555556182c6 in strcmp (cs=cs@entry=0x55555566023b "root_driver", ct=0x1 <error: Cannot access memory at address 0x1>) at lib/string.c:190 190 if ((__res = *cs - *ct++) != 0 || !*cs++)
This does not help much for crashing reason, and I have narrow down the cause, I believe the crash related to "DM_GET_DRIVER(pmic_rk8xx)", - if I replace the 'pmic_rk8xx' in DM_GET_DRIVER() to any of other available driver, u-boot does not crash; - if I move the new 'rk8xx_sysreset' driver to other files, eg. pmic/sandbox.c, u-boot does not crash; Any more suggestion, or could you help to cherry pick this patch, and you should reproduce this issue: make sandbox_spl_defconfig all ./u-boot
Thanks, - Kever
Regards, Simon