summaryrefslogtreecommitdiffstats
path: root/mboxd_lpc.h
Commit message (Collapse)AuthorAgeFilesLines
* misc: Replace license blurb with kernel-style SPDX markersAndrew Jeffery2018-03-241-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* vpnor: create hostboot bootloader partitionDeepak Kodihalli2017-07-191-0/+9
| | | | | | | | | | | | | | | | | | | | | 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>
* mboxd: Update mboxd to implement protocol V2 and add dbus supportSuraj Jitindar Singh2017-04-111-0/+26
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
OpenPOWER on IntegriCloud