Page MenuHomeFreeBSD

Set the console sc if it's not already set.
AbandonedPublic

Authored by jhibbits on Jun 15 2018, 9:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 29 2024, 6:17 PM
Unknown Object (File)
Dec 22 2023, 11:23 PM
Unknown Object (File)
Oct 17 2023, 6:10 AM
Unknown Object (File)
Aug 24 2023, 5:06 PM
Unknown Object (File)
Jul 3 2023, 2:25 PM
Unknown Object (File)
Mar 21 2023, 11:58 AM
Unknown Object (File)
Mar 3 2023, 4:36 PM
Unknown Object (File)
Jan 2 2023, 3:27 AM
Subscribers

Details

Summary

If the console_sc is not set (NULL), when interrupts are enabled uart_opal_cngetc() will try to dereference a NULL console_sc pointer, and fault.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17317
Build 17152: arc lint + arc unit

Event Timeline

nwhitehorn added inline comments.
sys/powerpc/powernv/opal_console.c
275

Isn't it explicitly not the console now if console_sc is NULL?

278

This seems like a bad idea if there are multiple OPAL serial ports.

This revision now requires changes to proceed.Jun 21 2018, 4:56 AM

This approach is wrong. The problem I was trying to solve is the interrupt handler accessing a bad sc. The proper fix will be to instead make the interrupt handler use a sc, instead of a consdev, and move more state data into the sc.