History log of /openbmc/hiomapd/transport_mbox.c (Results 1 – 25 of 27)
Revision Date Author Comments
# 68a24c9e 25-Jul-2023 Patrick Williams <patrick@stwcx.xyz>

resolve stricter warnings

In order to convert this repository to Meson, we need to make it
compile under `warning_level=3`. Fix a number of warning classes
across the repository or disable them.

S

resolve stricter warnings

In order to convert this repository to Meson, we need to make it
compile under `warning_level=3`. Fix a number of warning classes
across the repository or disable them.

Some fixes are:

* Add missing header files.
* Fully initialize structs as necessary.
* Add `__attribute__((unused))` on parameters as necessary.
* Fix comparisons between signed and unsigned.
* Fix printf specifiers as necessary.
* Avoid case-fallthrough.
* Remove if conditions which are always true.

Some warnings would require extensive code changes, due to their
pervasive use, and so are disabled at a per-file level:
* `-Wpointer-arith`
* `-Wunused-result`

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: If8992b9108f12b39f796ed090ba29868c9f3c627

show more ...


# 4b8203d7 06-May-2019 Andrew Jeffery <andrew@aj.id.au>

mboxd: Don't require mbox

With the DBus interface to the daemon in place it's possible to
implement any hardware interface in terms of the DBus interface. This is
the strategy used to support the IP

mboxd: Don't require mbox

With the DBus interface to the daemon in place it's possible to
implement any hardware interface in terms of the DBus interface. This is
the strategy used to support the IPMI HIOMAP transport. Further, the use
of MBOX is deprecated due to security concerns. We want to drop the
driver from the kernel, which failed to get traction upstream, so make
support optional.

As a consequence, switch the default transport to DBus.

Change-Id: I9f16ca053ce48943dce59b83ca991ec5494580d8
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# f1e547c7 13-Mar-2019 Evan Lojewski <github@meklort.com>

mboxd: Add a backend abstraction layer to mboxd.

Introduce a backend abstraction, enabling multiple implementations to be
compiled in at once. This change formally abstracts the two existing
backend

mboxd: Add a backend abstraction layer to mboxd.

Introduce a backend abstraction, enabling multiple implementations to be
compiled in at once. This change formally abstracts the two existing
backends, mtd and vpnor.

With the backend abstraction in place, subsequent backends are easier to
implement.

This change is based of Evan's work and he retains authorship credit. I
(AJ) have reworked the patch to pass the vpnor tests, refactored some
parts to enable broader use of const structures and others to clarify
the initialisation sequences.

Due to the existing lack of abstraction the patch has unfortunately
wide-ranging impacts. I've whittled it down as much as I consider
reasonable.

Change-Id: I29984a36dae4ea86ec00b853d2a756f0b9afb3ec
Signed-off-by: Evan Lojewski <github@meklort.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# fe0c9e86 31-Oct-2018 Andrew Jeffery <andrew@aj.id.au>

mboxd: Broadcast the daemon is ready on all transports

The code as it stood only sent the state update at startup on the active
transport, which is somewhat arbitrarily chosen as an implementation
d

mboxd: Broadcast the daemon is ready on all transports

The code as it stood only sent the state update at startup on the active
transport, which is somewhat arbitrarily chosen as an implementation
detail of the mbox initialisation function.

If the host firmware is using IPMI, it will not learn of the update
unless it attempts to contact mboxd, which it won't do if it knows the
daemon isn't there, which it may have learned of by receiving a state
update from the daemon's shutdown path. In this circumstance the host
firmware is now stuck.

Relieve the host firmware of this problem by always sending the daemon
state on all supported transports. To avoid some insanity we introduce a
new callback in struct transport_ops that allows use to send the BMC's
entire event state rather than just set or clear updates.

Change-Id: I094ff4089eeebd8be99fbd343b94f7bbef023fb1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# f62601b8 31-Oct-2018 Andrew Jeffery <andrew@aj.id.au>

transport: Fix event handling

Events were not quite being handled as per the intent of the recent
refactor: The protocol layer was meant to record the raw set of events
and provide the protocol-vers

transport: Fix event handling

Events were not quite being handled as per the intent of the recent
refactor: The protocol layer was meant to record the raw set of events
and provide the protocol-version-specific mask to the transport layer,
which the transport layer would then use to flush out the state in
accordance with its implementation-specific requirements.

What was going wrong was that the transport implementations were
overwriting the raw set of events with the protocol-specific masked set
of events, meaning that we'd lose the raw state and provide an
incomplete BMC state value on protocol upgrade.

Rework the event handling to make sure the responsibilities are properly
split between the layers.

Change-Id: Iace6615a121e4ce7dcca690d9adf62e5ab9ccee2
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# 0453aa4c 20-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: Rework BMC event handling

Change-Id: I99b13eca8f25d9855aac2af0a9ec46dfe5390834
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 4414fb8d 19-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: Retain knowledge of setting and clearing of events

The protocol layer now just filters the events based on the version of
the protocol in use, and leaves it to the transport layer to mana

transport: Retain knowledge of setting and clearing of events

The protocol layer now just filters the events based on the version of
the protocol in use, and leaves it to the transport layer to manage how
the resulting state is represented. For the moment this simply moves
manipulation of bmc_events in struct mbox_context down in to the
transport layer.

Change-Id: Iff1df934505dc9c769be3d376396d425fb4e8264
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# 23a48212 10-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: Switch transports as required on GET_MBOX_INFO

Also flush the event state out via the new transport. This must be done
after the command has completed for the mbox transport.

Change-Id:

transport: Switch transports as required on GET_MBOX_INFO

Also flush the event state out via the new transport. This must be done
after the command has completed for the mbox transport.

Change-Id: I251fb949ae67a477288d0d57a1a6afe5b2af5f8f
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# 26558dbb 09-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

mboxd: Refactor and rename mbox.h to mboxd.h

Refine the purpose of the header file to represent what's required for
the daemon itself, not its constituent pieces. Rather, split those
definitions out

mboxd: Refactor and rename mbox.h to mboxd.h

Refine the purpose of the header file to represent what's required for
the daemon itself, not its constituent pieces. Rather, split those
definitions out to their respective header files and include them as
necessary.

Finally the header file is renamed to better reflect its purpose.

Change-Id: I48c409f57d96c844589cd865b24f197477dfe87c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# 55260cef 09-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: mbox: Rename free_mbox_dev to transport_mbox_free

Change-Id: Ie400ccfada8890ddc626deadabd58fe4bf4c3cd3
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# b2466ee3 09-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: mbox: Rename *init_mbox_dev to *transport_mbox_init

Change-Id: I212277ed2462089b905546ef048308d24a5489d0
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# d86141b6 09-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: mbox: Rename dispatch_mbox to transport_mbox_dispatch

Change-Id: I7c5457099e90ea4ed498fd1898b4504f051d13fc
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 5335f093 09-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Provide abstraction over event notification

How this works will be transport-dependent. Move the event notification
helpers into the protocol abstraction and call-back through the
register

protocol: Provide abstraction over event notification

How this works will be transport-dependent. Move the event notification
helpers into the protocol abstraction and call-back through the
registered flush handler as necessary.

Change-Id: I29e3a9a9785b92de46a2b2750257fb7f8480a184
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# f21c81c7 08-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: mbox: Drop handler functions from header

Change-Id: If9dbb4e3ac849abc8651285f95025a9b53a35753
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 2f1477c4 09-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

transport: mbox: Centralise errno translation

We only need to do it once, after we've invoked the transport handler.
Previously it was distributed across the handler implementations which
was necess

transport: mbox: Centralise errno translation

We only need to do it once, after we've invoked the transport handler.
Previously it was distributed across the handler implementations which
was necessary while we were converting the handlers to standard errnos.

Change-Id: I76c02d768d297aa50bb9809b0392832d76046fc1
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# c7d1947e 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Hijack protocol rather than transport

By hijacking the transport the changes in behaviour were limited to the
mailbox interface. Now that we have a DBus interface as well this would
lead to i

vpnor: Hijack protocol rather than transport

By hijacking the transport the changes in behaviour were limited to the
mailbox interface. Now that we have a DBus interface as well this would
lead to inconsistent behaviour dependent on the transport.

Instead of hooking the transport, push the hook down to the protocol
level where we will achieve consistent behaviour across all transports.

Change-Id: I437866a6dbda107149336c15a00ee1aa058f5875
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...


# c5c83048 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add ack

Change-Id: I3ebad03d7f79381c683a121c181db9f30a13a3c4
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 093eda5c 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add close

Change-Id: I222a8f60edba0a5f5f2c938a6e2d78e2e0441a23
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 9b920cf4 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add flush

Change-Id: Ic5be69f534c9ff277cc3f7e5a85a0eae5bc41716
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 62a3daae 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add erase

Change-Id: I8b533f911e2d008f474817831836d29663511e98
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# a336e43a 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add mark_dirty

Change-Id: I192b96fa02a2266dd55ee97e5f4a751b45e3ae77
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 4bcec8ef 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add create_write_window

Change-Id: Ia1f55488c2aaefbe744305d3ed823e41e48a5934
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 22fa5009 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add create_read_window

Change-Id: I82e9e69861163fb1ae35313fcfee37e03be69f65
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# 91a87454 07-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add get_flash_info

Change-Id: Iff6c452c1399bc8e8f65219779c6a0f2375c68e6
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


# ab666a57 06-Aug-2018 Andrew Jeffery <andrew@aj.id.au>

protocol: Add reset

Change-Id: Ie5c11e71312c30de1aa9ec14d963bde91545dc50
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>


12