History log of /openbmc/phosphor-mboxd/vpnor/ (Results 1 – 9 of 9)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
8fe809ee16-May-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Catch ReasonedError in vpnor_copy_bootloader_partition

It was observed that mboxd cored on systems that didn't have a virtual
PNOR deployed:

```
May 09 10:53:48 witherspoon systemd[1]: Start

vpnor: Catch ReasonedError in vpnor_copy_bootloader_partition

It was observed that mboxd cored on systems that didn't have a virtual
PNOR deployed:

```
May 09 10:53:48 witherspoon systemd[1]: Starting Updates symlinks for active PNOR version...
May 09 10:53:49 witherspoon obmc-flash-bios[1238]: ls: /media/pnor-ro-*: No such file or directory
May 09 10:53:49 witherspoon systemd[1]: Started Updates symlinks for active PNOR version.
May 09 10:53:49 witherspoon systemd[1]: Started Phosphor MBOX Daemon.
May 09 10:53:51 witherspoon mboxd[1242]: terminate called after throwing an instance of 'openpower::virtual_pnor::UnknownPartition'
May 09 10:53:51 witherspoon mboxd[1242]: what(): Partition HBB is not listed in the table of contents
May 09 10:53:51 witherspoon systemd[1]: Created slice system-systemd\x2dcoredump.slice.
May 09 10:53:51 witherspoon systemd[1]: Started Process Core Dump (PID 1243/UID 0).
May 09 10:53:51 witherspoon phosphor-host-state-manager[1237]: Initial Host State will be Off
May 09 10:53:51 witherspoon phosphor-host-state-manager[1237]: External request to reset reboot count
May 09 10:53:51 witherspoon systemd[1]: Started Phosphor Host State Manager.
May 09 10:53:51 witherspoon systemd[1]: Started Witherspoon UART render controller.
May 09 10:53:53 witherspoon systemd[1]: Started Wait for /xyz/openbmc_project/state/host0.
May 09 10:53:53 witherspoon systemd[1]: Starting Reset host sensors...
May 09 10:53:53 witherspoon systemd[1]: Starting Reboot If Enabled...
May 09 10:53:53 witherspoon systemd[1]: Starting Phosphor Time Manager daemon...
May 09 10:53:55 witherspoon systemd[1]: mboxd.service: Main process exited, code=dumped, status=6/ABRT
May 09 10:53:56 witherspoon systemd[1]: mboxd.service: Unit entered failed state.
May 09 10:53:56 witherspoon systemd[1]: mboxd.service: Failed with result 'core-dump'.
```

The ToC parsing and partition lookup functions can throw a variety of
exceptions, though the ones we care about are all derived from
ReasonedError. Catch ReasonedError to avoid core-dumping mboxd when it is
launched without a virtual PNOR available or symlinks in place th point it to
the virtual PNOR root directory.

Further, explicitly ignore the failure in the start-up path. This keeps
mboxd alive, which will recover on receiving a RESET if the appropriate
images and symlinks have been put in place.

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

show more ...

dda8e38216-May-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Honour return codes in reset_lpc()

Without inspecting the return codes we have no way to communicate up the
call stack whether the operation was successful.

Change-Id: If8af2995522901ec8fcfc

vpnor: Honour return codes in reset_lpc()

Without inspecting the return codes we have no way to communicate up the
call stack whether the operation was successful.

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

show more ...

974507e330-Apr-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Fix formatting in pnor_partition.cpp

Found in the process of resolving openbmc/openbmc#3125.

Change-Id: I5869eab6b1253548ac29cea8c86d71ba34f3f819
Signed-off-by: Andrew Jeffery <andrew@aj.id.

vpnor: Fix formatting in pnor_partition.cpp

Found in the process of resolving openbmc/openbmc#3125.

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

show more ...

0971299f28-Mar-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Add README describing the expected behaviours

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

506f2f5526-Mar-2018 Andrew Jeffery <andrew@aj.id.au>

test: vpnor: Use MAP_SHARED for read-only file memory map

It's not well defined whether a private mapping of a resource that is
MAP_SHARED on a separate file descriptor will see the updates done via

test: vpnor: Use MAP_SHARED for read-only file memory map

It's not well defined whether a private mapping of a resource that is
MAP_SHARED on a separate file descriptor will see the updates done via
the shared mapping, though under Linux if the private mapping is not
written then we can expect updates from the shared mapping to propagate
(copy-on-write). However, we get a concrete guarantee of the desired
behaviour (observing the effects of the write) if we use MAP_SHARED.

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

show more ...

52a8319626-Mar-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Add handler for CREATE_WRITE_WINDOW

The virtual PNOR implementation enforces the read-only attribute of FFS
partitions, which is a departure from how things were handled
previously. In the pa

vpnor: Add handler for CREATE_WRITE_WINDOW

The virtual PNOR implementation enforces the read-only attribute of FFS
partitions, which is a departure from how things were handled
previously. In the past it was purely up to the host to respect the
flags set on the partition, but nothing prevented the host from
modifying it. Now it's possible for errors to occur when the host
attempts to flush changes back to the flash: mboxd can deny the change.
This denial can happen in a number of circumstances:

1. An explicit WRITE_FLUSH command from the host
2. An implicit WRITE_FLUSH via an explicit CLOSE_WINDOW command
3. An implicit WRITE_FLUSH via CREATE_{READ,WRITE}_WINDOW, which happens
via the implicit CLOSE_WINDOW

All of these attempts will fail if the write to the currently open
window cannot be allowed to succeed. Failing to open a read window due
to failure to flush pending writes is particularly painful, as we are
not able to ever successfully open a window again.

Instead, detect when the host attempts to open a write window over a
anything but a writeable partition. If this case is detected, return an
error for the CREATE_WRITE_WINDOW operation to prevent systemic failures
later on.

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

show more ...

943aba0626-Mar-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Configure a handler table in init_vpnor()

Currently the table just mirrors that which is set by the regular
implementation, however getting to that point requires massaging the
code a little.

vpnor: Configure a handler table in init_vpnor()

Currently the table just mirrors that which is set by the regular
implementation, however getting to that point requires massaging the
code a little. Thus, separate out this change from one that changes the
behaviour of the commands to improve the readability of the latter
change.

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

show more ...

30bcf84c25-Mar-2018 Andrew Jeffery <andrew@aj.id.au>

test: Move vpnor tests to vpnor directory

In the spirit of things that are together should be kept together. The
repository layout now better corresponds to upstream with the exception
of the vpnor

test: Move vpnor tests to vpnor directory

In the spirit of things that are together should be kept together. The
repository layout now better corresponds to upstream with the exception
of the vpnor directory and some modifications to Makefile.am

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

show more ...

53c21aaa25-Mar-2018 Andrew Jeffery <andrew@aj.id.au>

vpnor: Isolate relevant code in vpnor directory

This is prepatory work for introducing more vpnor-specific behaviours to
window handling. We will be introducing more objects to link, in order
to hoo

vpnor: Isolate relevant code in vpnor directory

This is prepatory work for introducing more vpnor-specific behaviours to
window handling. We will be introducing more objects to link, in order
to hook some of the window command handlers.

This change takes the opportunity to revert back to the upstream names
for some of the original C files.

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

show more ...


/openbmc/phosphor-mboxd/.clang-format-c
/openbmc/phosphor-mboxd/.clang-format-c++
/openbmc/phosphor-mboxd/.gitignore
/openbmc/phosphor-mboxd/Documentation/mbox_protocol.md
/openbmc/phosphor-mboxd/Documentation/mboxctl.md
/openbmc/phosphor-mboxd/Documentation/mboxd.md
/openbmc/phosphor-mboxd/LICENSE
/openbmc/phosphor-mboxd/Makefile.am
/openbmc/phosphor-mboxd/README.md
/openbmc/phosphor-mboxd/bootstrap.sh
/openbmc/phosphor-mboxd/common.c
/openbmc/phosphor-mboxd/common.h
/openbmc/phosphor-mboxd/configure.ac
/openbmc/phosphor-mboxd/dbus.h
/openbmc/phosphor-mboxd/format-code.sh
/openbmc/phosphor-mboxd/m4/.keep
/openbmc/phosphor-mboxd/mbox.h
/openbmc/phosphor-mboxd/mboxctl.c
/openbmc/phosphor-mboxd/mboxd.c
/openbmc/phosphor-mboxd/mboxd_dbus.c
/openbmc/phosphor-mboxd/mboxd_dbus.h
/openbmc/phosphor-mboxd/mboxd_flash.c
/openbmc/phosphor-mboxd/mboxd_flash.h
/openbmc/phosphor-mboxd/mboxd_lpc.c
/openbmc/phosphor-mboxd/mboxd_lpc.h
/openbmc/phosphor-mboxd/mboxd_lpc_reset.c
/openbmc/phosphor-mboxd/mboxd_msg.c
/openbmc/phosphor-mboxd/mboxd_msg.h
/openbmc/phosphor-mboxd/mboxd_windows.c
/openbmc/phosphor-mboxd/mboxd_windows.h
/openbmc/phosphor-mboxd/mtd.c
/openbmc/phosphor-mboxd/test/Makefile.am.include
/openbmc/phosphor-mboxd/test/bmc_event_ack_v2.c
/openbmc/phosphor-mboxd/test/close_window_v2.c
/openbmc/phosphor-mboxd/test/copy_flash.c
/openbmc/phosphor-mboxd/test/create_oversize_window.c
/openbmc/phosphor-mboxd/test/create_read_window_v2.c
/openbmc/phosphor-mboxd/test/create_write_window_v2.c
/openbmc/phosphor-mboxd/test/create_zero_size_window.c
/openbmc/phosphor-mboxd/test/erase_flash.c
/openbmc/phosphor-mboxd/test/get_flash_info_v2.c
/openbmc/phosphor-mboxd/test/get_mbox_info_v2.c
/openbmc/phosphor-mboxd/test/get_mbox_info_v2_timeout.c
/openbmc/phosphor-mboxd/test/implicit_flush.c
/openbmc/phosphor-mboxd/test/invalid_command.c
/openbmc/phosphor-mboxd/test/mark_read_dirty.c
/openbmc/phosphor-mboxd/test/mark_write_dirty_v2.c
/openbmc/phosphor-mboxd/test/mark_write_erased_v2.c
/openbmc/phosphor-mboxd/test/mbox.c
/openbmc/phosphor-mboxd/test/mbox.h
/openbmc/phosphor-mboxd/test/read_window_cycle.c
/openbmc/phosphor-mboxd/test/read_window_mark_write_erased.c
/openbmc/phosphor-mboxd/test/read_window_write_flush.c
/openbmc/phosphor-mboxd/test/request_high_version.c
/openbmc/phosphor-mboxd/test/request_low_version.c
/openbmc/phosphor-mboxd/test/reset_state.c
/openbmc/phosphor-mboxd/test/sanity.c
/openbmc/phosphor-mboxd/test/sequence_numbers.c
/openbmc/phosphor-mboxd/test/system.c
/openbmc/phosphor-mboxd/test/system.h
/openbmc/phosphor-mboxd/test/tmpf.c
/openbmc/phosphor-mboxd/test/tmpf.h
/openbmc/phosphor-mboxd/test/vpnor/Makefile.am.include
/openbmc/phosphor-mboxd/test/vpnor/create_pnor_partition_table.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_read_window_oob.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_read_window_partition_exists.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_read_window_partition_invalid.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_read_window_remap.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_read_window_size.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_read_window_straddle_partitions.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_read_window_toc.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_write_window_ro_partition.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_write_window_rw_partition.cpp
/openbmc/phosphor-mboxd/test/vpnor/create_write_window_unmapped.cpp
/openbmc/phosphor-mboxd/test/vpnor/dump_flash.cpp
/openbmc/phosphor-mboxd/test/vpnor/read_patch.cpp
/openbmc/phosphor-mboxd/test/vpnor/tmpd.cpp
/openbmc/phosphor-mboxd/test/vpnor/tmpd.hpp
/openbmc/phosphor-mboxd/test/vpnor/toc_flags.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_lookup_failed.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_lookup_found.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_missing_file.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_no_end.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_no_name.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_no_start.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_no_version.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_overlap.cpp
/openbmc/phosphor-mboxd/test/vpnor/toc_start_gt_end.cpp
/openbmc/phosphor-mboxd/test/vpnor/write_patch.cpp
/openbmc/phosphor-mboxd/test/vpnor/write_patch_resize.cpp
/openbmc/phosphor-mboxd/test/vpnor/write_prsv.cpp
/openbmc/phosphor-mboxd/test/vpnor/write_ro.cpp
/openbmc/phosphor-mboxd/test/vpnor/write_rw.cpp
/openbmc/phosphor-mboxd/test/write_flash.c
/openbmc/phosphor-mboxd/test/write_flush_v2.c
/openbmc/phosphor-mboxd/test/write_window_dirty_erase.c
Makefile.am.include
mboxd_flash.cpp
mboxd_lpc_reset.cpp
mboxd_pnor_partition_table.cpp
mboxd_pnor_partition_table.h
pnor_partition.cpp
pnor_partition.hpp
pnor_partition_defs.h
pnor_partition_table.cpp
pnor_partition_table.hpp
/openbmc/phosphor-mboxd/xyz/openbmc_project/Mboxd/Internal/Manager.interface.yaml