Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] pl011_regs.CR set as 0 in arm64_earlyserialinit() then the _info() in nx_start() cannot print correctly #13624

Open
1 task done
lzc1001 opened this issue Sep 26, 2024 · 3 comments

Comments

@lzc1001
Copy link

lzc1001 commented Sep 26, 2024

Description

Hi everyone,
In recent, I want to add some _info() in nx_start(), but the information don't print to ternimal on FVP. But I can use "dmesg" instruction to output the log information or set CONFIG_CONSOLE_SYSLOG=y. But the latter is set, the pl011 serial can't be initialized. Then, I find the arm64_earlyserialinit() in fvp_boot.c disable pl011_regs.cr and don't enbale until running DEBUGVERIFY(group_setupidlefiles()) in nx_start(). So, how do I print information before running DEBUGVERIFY(group_setupidlefiles()) and initialize pl011 serial currectly?
Thank you!
image
image
image

Verification

  • I have verified before submitting the report.
@acassis
Copy link
Contributor

acassis commented Sep 26, 2024

Hi @qinwei2004 since you are the author of fvp_boot.c, could you please help here?

@xiaoxiang781216 @anchao for awareness

@anchao
Copy link
Contributor

anchao commented Sep 27, 2024

@lzc1001 I think you should enable SYSLOG_DEFAULT instead of CONSOLE_SYSLOG. The log can be printed during the startup phase because fifo is enabled in pl011_earlyserialinit() (pl011_enable_fifo()). Any parameter changes need to wait for user ioctl, so it is correct to call pl011_enable() after open.

xxx_boot
|
|->pl011_earlyserialinit
|  |
|   ->pl011_setup
|     |
|     |->pl011_disable
|     |->pl011_disable_fifo
|     |
|      ->pl011_enable_fifo  <-- enabled here
|
|->nx_start
|  |
|   ->group_setupidlefiles
|     |
|      ->open
|        |
|         ~>pl011_attach
|           |
|            ->pl011_enable
|
|~>ioctl ?

@lzc1001
Copy link
Author

lzc1001 commented Sep 29, 2024

Thank you very much! @acassis @anchao
I set CONFIG_SYSLOG_DEFAULT=y, but the FVP terminal cann't print completely.
image
image
I remember the added _info() can be printed before lost configuration file😫(I forget configuration I added). I am trying to use different configuration and look the syslog code for solving the problem, hhh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants