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

UEFI crashes for a headless boot (no display connected) #1417

Open
picanteAvi opened this issue Nov 15, 2023 · 2 comments
Open

UEFI crashes for a headless boot (no display connected) #1417

picanteAvi opened this issue Nov 15, 2023 · 2 comments

Comments

@picanteAvi
Copy link

If there is no HDMI cable connected, UEFI will crash in T194GraphicsOutputDxe driver init. Full log is attached but the relevant pieces are here:

NV-DISP snippet

[0003.840] I> regulator 'vdd-hdmi-5v0' already enabled
[0003.847] I> regulator 'vdd-hdmi-5v0' already enabled
[0003.847] E> tegrabl_display_init_regulator: hdmi cable is not connected
[0003.848] E> tegrabl_display_get_pdata, failed to parse dtb settings
[0003.849] E> cannot find any other nvdisp nodes
[0003.849] E> no valid display unit config found in dtb
[0003.856] W> display init failed
[0003.857] initializing target
[0003.859] calling apps_init()
[0003.862] starting app kernel_boot_app
[0003.866] I> Kernel type = Normal

UEFI snippet:

ERROR:   MPIDR 0x80000000: exception reason=0 syndrome=0xbe000000
ERROR:   **************************************
ERROR:   RAS Error in L2, ERRSELR_EL1=0x200:
ERROR:   	Status = 0xfc006612
ERROR:   	IERR = SCF to L2 Slave Error Read: 0x66
ERROR:   SERR = Error response from slave: 0x12
ERROR:   	Overflow (there may be more errors) - Uncorrectable
ERROR:   	Uncorrectable (this is fatal)
ERROR:   	MISC0 = 0x80000000400000
ERROR:   	MISC1 = 0x20240000000
ERROR:   	ADDR = 0x800000001520101c
ERROR:   **************************************
ERROR:   **************************************

ERROR:   RAS Error in SCF_IOB, ERRSELR_EL1=0x401:
ERROR:   	Status = 0xf4009604
ERROR:   	IERR = CBB Interface Error: 0x96
ERROR:   SERR = Assertion failure: 0x4
ERROR:   	Uncorrectable (this is fatal)
ERROR:   	MISC0 = 0x40
ERROR:   	MISC1 = 0x264a444461
ERROR:   	ADDR = 0x800000001520101c
ERROR:   **************************************
ERROR:   RAS error handled!
ERROR:   sdei_dispatch_event returned -1
Head index=0 DC_DISP_SYNC_WIDTH  = 0x00000000

It seems like UEFI is trying to access some display control registers that are not inited after nvdisp hands over control? My workaround was to add a patch to the nvdisp binary. Basically, it will return a no-error when displays are not found, let the initialization complete, then fail when trying to access the controller.
This gives the following log output for NV-DISP

[0003.763] I> regulator 'vdd-hdmi-5v0' already enabled
[0003.769] I> regulator 'vdd-hdmi-5v0' already enabled
[0003.770] E> tegrabl_display_init_regulator: hdmi cable is not connected
[0003.770] I> retrieved tmds range from prod_list_hdmi_soc
[0003.771] E> cannot find any other nvdisp nodes
[0003.777] E> I2C: slave not found in slaves.
[0003.778] E> I2C: Could not write 0 bytes to slave: 0x00a0 with repeat start true.
[0003.786] E> I2C_DEV: Failed to send register address 0x00000000.
[0003.791] E> I2C_DEV: Could not read 128 registers of size 1 from slave 0xa0 at 0x00000000 via instance 3.
[0003.801] E> could not read edid
[0003.809] I> hdmi_enable, starting HDMI initialisation
[0003.813] I> hdmi_enable, HDMI initialisation complete
[0003.822] initializing target
[0003.823] calling apps_init()
[0003.824] starting app kernel_boot_app
[0003.825] I> Kernel type = Normal

This seems hacky and there is probably a better way to fix it, whatever that might be.

0006-allow-headless-boot.patch
uefi-crash-when-display-not-inited.log

@dwalkes
Copy link
Member

dwalkes commented Nov 17, 2023

Can you reproduce with https://github.com/OE4T/tegra-demo-distro ? If so, which MACHINE, branch, and image?

@ichergui
Copy link
Member

Hi @picanteAvi
Any updates on this issue ?
Otherwise I will close it.

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