#
acdbdd14 |
| 02-Aug-2018 |
Andrew Jeffery <andrew@aj.id.au> |
Unfork phosphor-mboxd from mboxbridge
Change-Id: I1b3b9d7fd47719594c1de027389959a5a9a3ea7a Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
05a17f14 |
| 11-Apr-2018 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd_msg: Fix overflow in get_suggested_timeout()
The suggested timeout is a two-byte unsigned value, but when introducing the debug message it was stored in a one-byte unsigned value. This can lea
mboxd_msg: Fix overflow in get_suggested_timeout()
The suggested timeout is a two-byte unsigned value, but when introducing the debug message it was stored in a one-byte unsigned value. This can lead to overflow under some circumstances.
Change-Id: If4f86a8dc812ae27d703a10fb3d21ba3c2541e65 Fixes: 285195987721 ("mboxd: Introduce a new DEBUG log level") Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
943aba06 |
| 26-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 ...
|
#
efb09def |
| 25-Mar-2018 |
Andrew Jeffery <andrew@aj.id.au> |
mbox_msg: Move handler table to struct mbox_context
This allows us to provide alternative implementations for the handlers as necessary. The vpnor feature, which enforces the read-only property of F
mbox_msg: Move handler table to struct mbox_context
This allows us to provide alternative implementations for the handlers as necessary. The vpnor feature, which enforces the read-only property of FFS partitions, requires this for handling CREATE_WRITE_WINDOW.
Change-Id: Ia969a6f085244b194c500e66b62adca5e10bacba Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
4fe996c2 |
| 26-Feb-2018 |
Andrew Jeffery <andrew@aj.id.au> |
misc: Replace license blurb with kernel-style SPDX markers
This was roughly achieved by the following shell script:
$ git ls-files | grep '\.[ch]p*$' | while read F; do EXT=${F##*.}; cat spdx.$EX
misc: Replace license blurb with kernel-style SPDX markers
This was roughly achieved by the following shell script:
$ git ls-files | grep '\.[ch]p*$' | while read F; do EXT=${F##*.}; cat spdx.$EXT <(sed '/^\/\*$/,/^ \*\/$/d' $F) > ${F}.tmp; mv ${F}.tmp $F; done
With the following context:
$ cat spdx.c // SPDX-License-Identifier: Apache-2.0 // Copyright (C) 2018 IBM Corp. $ cat spdx.h /* SPDX-License-Identifier: Apache-2.0 */ /* Copyright (C) 2018 IBM Corp. */ $ ls -l spdx.* -rw-r--r-- 1 andrew andrew 71 Feb 27 12:02 spdx.c lrwxrwxrwx 1 andrew andrew 6 Feb 27 12:02 spdx.cpp -> spdx.c -rw-r--r-- 1 andrew andrew 77 Feb 27 12:02 spdx.h lrwxrwxrwx 1 andrew andrew 6 Feb 27 12:02 spdx.hpp -> spdx.h
The `sed` invocation catches a lot of function documentation, so the hunks were manually added to avoid removing information that we want to keep.
Change-Id: I63e49ca2593aa0db0568c7a63bfdead388642e76 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
017e45c3 |
| 12-Jul-2017 |
Deepak Kodihalli <dkodihal@in.ibm.com> |
vpnor: create hostboot bootloader partition
The hostboot bootloader code doesn't use mbox.
It has specific requirements: - The PNOR TOC should be at the 'PNOR end - TOC size - page size' offset.
vpnor: create hostboot bootloader partition
The hostboot bootloader code doesn't use mbox.
It has specific requirements: - The PNOR TOC should be at the 'PNOR end - TOC size - page size' offset. It searches for the TOC here, if not found, the search moves down page by page. - The PNOR should be 64M. The page size and erase block should be 4K. The TOC should be 32K.
Copy what the bootloader expects to the LPC memory when mboxd starts up. The same needs to be done in the case of an mbox reset (irrespective of where the reset comes from).
Skiboot expects that the TOC should be at offset 0, but it uses mbox to read the TOC. So this commit doesn't impact skiboot requirements.
Change-Id: I7de556dccfea85f2faa5f401177006a3a562494e Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
show more ...
|
#
28519598 |
| 26-Apr-2017 |
Suraj Jitindar Singh <sjitindarsingh@gmail.com> |
mboxd: Introduce a new DEBUG log level
Currently there is no output on the console unless -v is specified on the command line which enables error output. A second -v will provide info output.
We pr
mboxd: Introduce a new DEBUG log level
Currently there is no output on the console unless -v is specified on the command line which enables error output. A second -v will provide info output.
We probably want error output irrespective of whether a -v was given on the command line because people generally want to know why their program stopped working.
Make error output unconditional.
A single -v will give minimal informational output which is a good level to see what the daemon is doing without barfing all over the console.
A second -v will enable debug output which will print highly verbose information which will be useful for debugging. Probably don't enable this under normal circumstances.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Change-Id: I3da25f7e4e9e976c17389fcceb1d85ef98de7e0a
show more ...
|
#
5a3a0664 |
| 26-Apr-2017 |
Suraj Jitindar Singh <sjitindarsingh@gmail.com> |
mboxd: Implement timeout return value in GET_MBOX_INFO
The previous patch added a new return field in GET_MBOX_INFO called "suggested timeout" to be used to provide a suggested maximum timeout value
mboxd: Implement timeout return value in GET_MBOX_INFO
The previous patch added a new return field in GET_MBOX_INFO called "suggested timeout" to be used to provide a suggested maximum timeout value to the host.
Add this to the return arguments of GET_MBOX_INFO.
Note that the host is free to ignore the value and the daemon can leave this blank if it doesn't want to provide a timeout.
We hard code a milliseconds per megabyte value which was determined to be approximately 8000 based on testing and is close to linear as the access size changes. Testing was conducted on an Aspeed ast2500 on a Witherspoon with the dev-4.7 OpenBMC branch.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Change-Id: If24e41ebb1d9f03c2bdcca84819f9430fd3eeff6
show more ...
|
#
f1982e41 |
| 11-Apr-2017 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd_msg: Remove unreachable break statement
Change-Id: Iaa73c1c02286f9f706e45eda8c1e45f3aa346675 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
913740f0 |
| 10-Apr-2017 |
Andrew Jeffery <andrew@aj.id.au> |
mboxd_msg: Split init function to enable testing
Allows passing a dev node path through.
Change-Id: Ice3fd8157366b4687fd7f3aac72619a1f0a67fff Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
55dede6b |
| 24-Apr-2017 |
Andrew Jeffery <andrew@aj.id.au> |
mbox: Clarify sequence number constraints
And implement the specified behaviour.
Change-Id: I268d5896aa8dda3875cd79f4ff18929c8e3aea49 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
121dc0d6 |
| 24-Apr-2017 |
Andrew Jeffery <andrew@aj.id.au> |
mbox_msg: Cleanup error strings and whitespace
Change-Id: I6f432ef1b8c6b490c368cccc52044bef300bde84 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
#
fb25aa77 |
| 23-Apr-2017 |
Andrew Jeffery <andrew@aj.id.au> |
mbox: Clarify protocol version negotion
The specification intended that the mbox daemon return its highest supported protocol version less-than-or-equal to the version requested by the host. This wa
mbox: Clarify protocol version negotion
The specification intended that the mbox daemon return its highest supported protocol version less-than-or-equal to the version requested by the host. This was not clear in the documentation and was not the behaviour implemented by the daemon.
Fix both the documentation and the daemon to perform to this expectation.
Change-Id: I6f9cf0b16d2b9319d69656eb26defb46dccd4ddf Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
show more ...
|
#
e39c9163 |
| 27-Mar-2017 |
Suraj Jitindar Singh <sjitindarsingh@gmail.com> |
mboxd: Update mboxd to implement protocol V2 and add dbus support
Version 2 of the mbox protocol contains a few changes such as: - All sizes are in block size - Adds an erase command - Adds new r
mboxd: Update mboxd to implement protocol V2 and add dbus support
Version 2 of the mbox protocol contains a few changes such as: - All sizes are in block size - Adds an erase command - Adds new response codes - Adds new BMC events - Open windows commands now take a size directive
Update the mailbox daemon to support version 2 of the protocol which includes implementing all of the V2 functionality. Also entirely refactor the mboxd.c code to make it more modular improving readability and maintainability.
At the same time improve the functionality by adding: - Multiple windows in the daemon (still only one active window) to cache flash contents - Implement a dbus interface to allow interaction with the daemon - Handle sigterm and sigint and terminate cleanly
The previous implementation utilised the entire reserved memory region. Update the daemon so that on the command line the number of windows and the size of each which the reserved memory region will be split into can be specified. The reserved memory region is then divided between the windows, however there can still only be one "active" window at a time. The daemon uses these windows to cache the flash contents meaning the flash doesn't have to be copied when the host requests access assuming the daemon already has a copy.
A dbus interface is added so that commands can be sent to the daemon to control it's operation from the bmc. These include suspending and resuming the daemon to synchronise flash access, telling the daemon to point the lpc mapping back to flash and telling the daemon when the flash has been modified out from under it.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Change-Id: I10be01a395c2bec437cf2c825fdd144580b60dbc
show more ...
|