History log of /freebsd-14.2/sys/powerpc/powernv/opal_dev.c (Results 1 – 17 of 17)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0, release/13.4.0, release/14.1.0, release/13.3.0
# aaebd6d0 23-Nov-2023 Mitchell Horne <[email protected]>

powerpc: better handling of shutdown flags

RB_HALT does not mean poweroff, RB_POWEROFF does.

Reviewed by: jhibbits
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: http

powerpc: better handling of shutdown flags

RB_HALT does not mean poweroff, RB_POWEROFF does.

Reviewed by: jhibbits
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42339

(cherry picked from commit 41e26e8288f1743c8584e5f9c461d36dce1cccc6)

show more ...


Revision tags: release/14.0.0
# 685dc743 16-Aug-2023 Warner Losh <[email protected]>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0
# 5edf159f 10-May-2022 John Baldwin <[email protected]>

powerpc powernv: Remove unused devclass arguments to DRIVER_MODULE.


Revision tags: release/12.3.0
# ddfc9c4c 23-Jun-2021 Warner Losh <[email protected]>

newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf

Now that the upper layers all go through a layer to tie into these
information functions that translates

newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf

Now that the upper layers all go through a layer to tie into these
information functions that translates an sbuf into char * and len. The
current interface suffers issues of what to do in cases of truncation,
etc. Instead, migrate all these functions to using struct sbuf and these
issues go away. The caller is also in charge of any memory allocation
and/or expansion that's needed during this process.

Create a bus_generic_child_{pnpinfo,location} and make it default. It
just returns success. This is for those busses that have no information
for these items. Migrate the now-empty routines to using this as
appropriate.

Document these new interfaces with man pages, and oversight from before.

Reviewed by: jhb, bcr
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29937

show more ...


Revision tags: release/13.0.0
# 6d2254bc 31-Dec-2020 Alfredo Dal'Ava Junior <[email protected]>

[POWERPC64LE] fix sysctl dev.opal_sensor.* on little-endian kernel

- fix values returned by 'sysctls dev.opal_sensor.*.sensor'
- fix missing 'dev.opal_sensor.*.sensor_[max|min]' on sysctl

Reviewed-

[POWERPC64LE] fix sysctl dev.opal_sensor.* on little-endian kernel

- fix values returned by 'sysctls dev.opal_sensor.*.sensor'
- fix missing 'dev.opal_sensor.*.sensor_[max|min]' on sysctl

Reviewed-by: jhibbits
Sponsored-by: Eldorado Research Institute (eldorado.org.br)
Differential-Revision: https://reviews.freebsd.org/D27365

show more ...


Revision tags: release/12.2.0
# bf933a83 23-Sep-2020 Brandon Bergren <[email protected]>

[PowerPC64LE] Endian fix for opal_dev.c.

Not much to say here, another missing be64toh() in memory that was written
from OPAL.

Sponsored by: Tag1 Consulting, Inc.


# 5c74d551 10-Sep-2020 Brandon Bergren <[email protected]>

[PowerPC] Fix setting of time in OPAL

There were multiple bugs in the OPAL RTC code which had never been
discovered, as the default configuration of OPAL machines is to
have the BMC / FSP control th

[PowerPC] Fix setting of time in OPAL

There were multiple bugs in the OPAL RTC code which had never been
discovered, as the default configuration of OPAL machines is to
have the BMC / FSP control the RTC.

* Fix calling convention for setting the time -- the variables are passed
directly in CPU registers, not via memory.

* Fix bug in the bcd encoding routines. (from jhibbits)

Tested on POWER9 Talos II (BE) and POWER9 Blackbird (LE).

Reviewed by: jhibbits (in irc)
Sponsored by: Tag1 Consulting, Inc.

show more ...


# b64b3133 01-Sep-2020 Mateusz Guzik <[email protected]>

powerpc: clean up empty lines in .c and .h files


Revision tags: release/11.4.0, release/12.1.0, release/11.3.0
# e2e050c8 20-May-2019 Conrad Meyer <[email protected]>

Extract eventfilter declarations to sys/_eventfilter.h

This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h"
in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces hea

Extract eventfilter declarations to sys/_eventfilter.h

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.

show more ...


# e2e3e7d2 29-Apr-2019 Justin Hibbits <[email protected]>

powerpc: Make OPAL root node probe at bus pass

This way its children can attach earlier if needed, and some subsystems are
attached earlier, like the asynchronous token management.

MFC after: 2 wee

powerpc: Make OPAL root node probe at bus pass

This way its children can attach earlier if needed, and some subsystems are
attached earlier, like the asynchronous token management.

MFC after: 2 weeks

show more ...


# 911a9260 02-Apr-2019 Justin Hibbits <[email protected]>

powerpc/powernv: Add OPAL heartbeat thread

Summary:
OPAL needs to be kicked periodically in order for the firmware to make
progress on its tasks. To do so, create a heartbeat thread to perform this

powerpc/powernv: Add OPAL heartbeat thread

Summary:
OPAL needs to be kicked periodically in order for the firmware to make
progress on its tasks. To do so, create a heartbeat thread to perform this task
every N milliseconds, defined by the device tree. This task is also a central
location to handle all messages received from OPAL.

Reviewed By: luporl
Differential Revision: https://reviews.freebsd.org/D19743

show more ...


# dac618a6 01-Mar-2019 Justin Hibbits <[email protected]>

powerpc/powernv: Add asynchronous token management for powernv

The OPAL firmware only supports a finite number of in-flight asynchronous
operations. Rather than have each subsystem try to manage it

powerpc/powernv: Add asynchronous token management for powernv

The OPAL firmware only supports a finite number of in-flight asynchronous
operations. Rather than have each subsystem try to manage its own, use a
central management service to hand out tokens.

More work can be done to improve asynchronous behavior, such as funneling
things through a future OPAL heartbeat handler, but capabilities will be
added as needed.

Augment the existing consumers (i2c and sensors) to use this new API.

MFC after: 4 weeks

show more ...


Revision tags: release/12.0.0
# 27ef2ca8 21-Oct-2018 Justin Hibbits <[email protected]>

powerpc64/powernv: Add pnpinfo strings to opal device children

This makes it easier to see what's left unattached as new drivers are
written, and to see what drivers get attached to what nodes.


# 78f4e2fe 08-Aug-2018 Breno Leitao <[email protected]>

powerpc64/powernv: re-read RTC after polling

If OPAL_RTC_READ is busy and does not return the information on the first run,
as returning OPAL_BUSY_EVENT, the system will crash since ymd and hmsm var

powerpc64/powernv: re-read RTC after polling

If OPAL_RTC_READ is busy and does not return the information on the first run,
as returning OPAL_BUSY_EVENT, the system will crash since ymd and hmsm variable
will contain junk values.

This is happening because we were not calling OPAL_RTC_READ again after
OPAL_POLL_EVENTS' return, which would finally replace the old/junk hmsm and ymd
values.

The code was also mixing OPAL_RTC_READ and OPAL_POLL_EVENTS return values.

This patch fix this logic and guarantee that we call OPAL_RTC_READ after
OPAL_POLL_EVENTS return, and guarantee the code will only proceed if
OPAL_RTC_READ returns OPAL_SUCCESS.

Reviewed by: jhibbits
Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D16617

show more ...


Revision tags: release/11.2.0
# eb96cc13 21-Feb-2018 Wojciech Macek <[email protected]>

PowerNV: add missing RTC_WRITE support

Add function which can store RTC values to OPAL.

Submitted by: Wojciech Macek <[email protected]>
Obtained from: Semihalf
Sponsored by:

PowerNV: add missing RTC_WRITE support

Add function which can store RTC values to OPAL.

Submitted by: Wojciech Macek <[email protected]>
Obtained from: Semihalf
Sponsored by: IBM, QCM Technologies

show more ...


# 504d9b60 12-Jan-2018 Wojciech Macek <[email protected]>

PowerNV: update OPAL driver

Update OPAL driver with:
- better console support
- proper AP configuration
- enhanced IRQ/OFW mapping
- RTC support

Created by: Nathan Whitehorn <nwhitehorn@

PowerNV: update OPAL driver

Update OPAL driver with:
- better console support
- proper AP configuration
- enhanced IRQ/OFW mapping
- RTC support

Created by: Nathan Whitehorn <[email protected]>
Submitted by: Wojciech Macek <[email protected]>
Sponsored by: FreeBSD Foundation

show more ...


# 32d1354a 11-Jan-2018 Wojciech Macek <[email protected]>

PowerNV: add reset, poweroff, OPAL console

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

PowerNV: add reset, poweroff, OPAL console

Add basic power control (reset, power off) and bind
ttyuX to opal console so that init will start login there.

Created by: Nathan Whitehorn <[email protected]>
Submitted by: Wojciech Macek <[email protected]>
Sponsored by: FreeBSD Foundation

show more ...