aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/powernv/opal_console.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-061-1/+2
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* newbus: globally replace device_add_child(..., -1) with DEVICE_UNIT_ANYWarner Losh2024-07-251-1/+1
| | | | Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* powerpc powernv: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-101-3/+1
|
* Remove unused uart_devclass.John Baldwin2022-05-061-1/+1
|
* opal_console: fix serial console output corruption on powerpc64Alfredo Dal'Ava Junior2021-04-161-7/+42
| | | | | | | | | | | | | | | | Adds OPAL_CONSOLE_WRITE error handling and implements a call to OPAL_CONSOLE_WRITE_BUFFER_SPACE to verify if there's enough space before writing to console. This fixes serial port output getting corrupted on fast writes, like on "dmesg" output. Tested on Raptor Blackbird running powerpc64 BE kernel Reviewed by: luporl Sponsored by: Eldorado Reserach Institute (eldorado.org.br) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D29063
* [PowerPC64LE] Fix endianness issues in phyp and opal consoles.Brandon Bergren2020-09-231-2/+8
| | | | | | | | | | This applies to both pseries and powernv, which were tested at different points during the patchset development. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=366036
* powerpc: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-5/+4
| | | | Notes: svn path=/head/; revision=365073
* Extract eventfilter declarations to sys/_eventfilter.hConrad Meyer2019-05-201-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Notes: svn path=/head/; revision=347984
* Support multiple OPAL consoles, and don't crash if uart is not stdoutJustin Hibbits2018-06-291-13/+24
| | | | | | | | | | | | | | | Summary: If the chosen console is not the OPAL uart, but OPAL uart devices exist, the console device doesn't attach properly, and faults in the interrupt handler, with a NULL pointer dereference. To fix this, and as a byproduct, also support multiple OPAL consoles, refactor to have the console getc callback use the appropriate softc instead of the global console_sc, which may be NULL in the case of a different device being the console. Reviewed by: nwhitehorn Differential Revision: https://reviews.freebsd.org/D16071 Notes: svn path=/head/; revision=335801
* Make ALT_BREAK_TO_DEBUGGER work with OPAL consoleJustin Hibbits2018-05-281-3/+2
| | | | | | | | Match other consoles by using the higher level cngetc() in the interrupt handler, so that kdb_alt_break() can check for console break. Notes: svn path=/head/; revision=334266
* PowerNV: workaround console on OPAL 5.4Wojciech Macek2018-01-171-4/+10
| | | | | | | | | | | | | FreeBSD prints text char-by-char, which is not what OPAL is designed to. Poll events more frequently to avoid buffer overflow and loosing data. Created by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: QCM Technologies Notes: svn path=/head/; revision=328077
* PowerNV: update OPAL driverWojciech Macek2018-01-121-22/+23
| | | | | | | | | | | | | | | Update OPAL driver with: - better console support - proper AP configuration - enhanced IRQ/OFW mapping - RTC support Created by: Nathan Whitehorn <nwhitehorn@freebsd.org> Submitted by: Wojciech Macek <wma@semihalf.com> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=327873
* PowerNV: add buffer for OPAL consoleWojciech Macek2018-01-111-10/+54
| | | | | | | | | | | | | | | Avoid the lock in vtophys() by providing a static direct-mapped spinlock- protected output buffer to use when the console driver cannot acquire locks for some reason. This allows the idle thread to use printf() (e.g. the SMP startup messages) without crashing the kernel. Created by: Nathan Whitehorn <nwhitehorn@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=327815
* PowerNV: add reset, poweroff, OPAL consoleWojciech Macek2018-01-111-0/+73
| | | | | | | | | | | | Add basic power control (reset, power off) and bind ttyuX to opal console so that init will start login there. Created by: Nathan Whitehorn <nw@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=327812
* PowerNV: initial support for OPALWojciech Macek2018-01-111-0/+441
OPAL is a dedicated firmware acting as a hypervisor. Add generic functions to provide all access. Created by: Nathan Whitehorn <nw@freebsd.org> Submitted by: Wojciech Macek <wma@freebsd.org> Notes: svn path=/head/; revision=327810