summaryrefslogtreecommitdiffstats
path: root/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* test: Move vpnor tests to vpnor directoryAndrew Jeffery2018-04-041-1/+1
| | | | | | | | | 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>
* vpnor: Isolate relevant code in vpnor directoryAndrew Jeffery2018-04-041-12/+3
| | | | | | | | | | | | 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>
* test: vpnor: Add toc_start_gt_endAndrew Jeffery2018-03-241-0/+1
| | | | | Change-Id: Iaac0e7783f1ceba0d009fcd4865861b0109639e4 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Move related tests to vpnor directoryAndrew Jeffery2018-03-241-0/+3
| | | | | Change-Id: I5fe7f625ad642cef17fe53bd244dcde8fd99f3ad Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Move tests to a separate Makefile fragmentAndrew Jeffery2018-03-241-178/+1
| | | | | Change-Id: I46d5b165ed668ace67ae237b16d65a24586dd87d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* vpnor: create hostboot bootloader partitionDeepak Kodihalli2017-07-191-2/+6
| | | | | | | | | | | | | | | | | | | | | 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>
* vpnor: add API to get partition entry by nameDeepak Kodihalli2017-07-191-1/+4
| | | | | Change-Id: I1f86c646c6629a6a42788821e469d36f55c92264 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* vpnor: implement init_flash_devDeepak Kodihalli2017-07-181-7/+0
| | | | | | | | | | | | | | The vpnor version needs to set the erase block size as 4K. That's the size hostboot expects in the FFS structure. This change also requires moving code from mboxd_flash.c to mboxd_flash_physical.c, else there will be 3 symbols per flash function. It should suffice to just have mboxd_flash_physical.c and mboxd_flash_virtual.cpp. Change-Id: I35442a0c1dbee7f66b278cbf094be78e870b6c86 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* test: write the vpnor file(flash)Ratan Gupta2017-06-291-1/+16
| | | | | | | | | | | | | | Add the test binary which runs the following test cases 1) Write to the read only partition 2) Write to the RW partition 3) Write to the preserved partition. 4) Write beyond the partition file length. 5) other boundary test cases. Resolves openbmc/openbmc#1479 Change-Id: Ifd4f0e89e434a26e2579415a973fe1bfdbb3e66f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Read/write window property defines FFS partition file location.Ratan Gupta2017-06-291-7/+36
| | | | | | | | | | | | | | | | | | | | | The BMC loads the PNOR partitions in a read-only volume. So after that there are following two cases: Read: Tries to open the file in read only mode from the partition(READONLY/READWRITE/PRESERVED), Partition Table tells the partition type depends on the offset. if file is not there in the mapped partition then tries to open the file from the read only partition. Write: Tries to open the file in write mode from the partition(READWRITE/PRESERVED), if file is not there in the mapped partition then mailbox daemon will copy the requested partition to the read-write volume to make changes to it. Change-Id: Ic0ef882380b56536ac55feae3ec563de95fdd4a6 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* Add dependency on phosphor logging and sdbusplusRatan Gupta2017-06-291-2/+8
| | | | | Change-Id: Ie7f6f1806c203ddf46fb8d5a651ebd908ea921cb Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* test: read window from partition fileRatan Gupta2017-06-291-4/+17
| | | | | | | Resolves openbmc/openbmc#1440 Change-Id: I8e6ae35e4c5ba2936a578349e6cea464de6ab40d Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* test: Add SDK testcase flagsRatan Gupta2017-06-271-1/+2
| | | | | | | | It is required as earlier create_pnor_partition_table test binary try to link with host native libs instead of SDK libs. Change-Id: I7817929db8699f66f6f2198cae5f1d5a16fcc5b9 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* msg: handle partition table read requestDeepak Kodihalli2017-06-271-3/+5
| | | | | | | | | | Map host's request to read the flash at offset less than the partition table length as a request to read the pnor partition table. Resolves openbmc/openbmc#1439. Change-Id: I0f5b98f073d983b0d4749b0aba84b37d7f42f884 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* pnor: provide "C" interface to partition tableDeepak Kodihalli2017-06-271-1/+1
| | | | | Change-Id: I35af6c4c43e9a43f6a21992bfb0c13542a2c8f0d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* pnor : generate partition tableDeepak Kodihalli2017-06-271-1/+25
| | | | | | | | | | | | | | Implement a class that, upon construction, generates the virtual PNOR partition table. The virtual PNOR is typically a subset of the full PNOR image, by choosing partitions of interest. The generation is based on upon information read from the PNOR partition files and table of contents (toc) file. Provide an interface to the virtual PNOR partition table. Change-Id: I7a68e3833b8cf66e92eb6ca274f6a3c376ce0add Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* tests: Add test for timeout argument in GET_MBOX_INFOSuraj Jitindar Singh2017-05-041-1/+5
| | | | | | | | | | | | Add a test to check the value returned in the suggested timeout field in the response of GET_MBOX_INFO for a window size >= 1MB. It is worth noting that existing test cases will continue to pass since a window size < 1MB will have zero for the suggested timeout which is what is expected in this field for all existing tests. Change-Id: I4fb4903817b63a8c201af4142d429b7b21881848 Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
* test: Add sequence_numbersAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: Ida6123bf27445f0fb65099fbf6d9520344d33f10 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add read_window_cycleAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: Iaa967b7e0732ebc0322ea89e74861a5bedb34867 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add invalid_commandAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I42bc056e5c6b6fdd078bc622e40db39583b53c64 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add write_window_dirty_eraseAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I16d2488e75dde619da39d755e00666bc24778217 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add read_window_mark_write_erasedAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I40e3e29e8064f7ec156cdfd579071563d1cc35c3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add read_window_write_flushAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I17b237f66e57a40df136d47e2e963eae4c3de535 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add mark_read_dirtyAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I7ab43db7d69b0f085574b40701d48dfa99f00856 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add request_low_versionAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: Ia2ce45977b2735663e9745e1da72378df5819a01 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add request_high_versionAndrew Jeffery2017-04-261-1/+5
| | | | | | | | | The test identified a flaw in the implementation and lack of clarity in the documentation when compared with Ben's intent and what was discussed with AMI. Change-Id: I1722b1cc8b005cef77fc48f6583ca0e2553ed2f1 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add implicit_flushAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: Ib64fe711e7e7922ad90cb8e9a84972df4cbc5b2d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_zero_size_windowAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I59f3c1e92b519d4f52b6d4fe031d425f161e4dd3 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_oversize_windowAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I944046be71b6973e8bd1760678fcfaea39d7bc12 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add bmc_event_ack_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: Id6966ce54ddfdc2c2ec3933c0dde12451223a61c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add mark_write_erased_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I74f98b63f9971b53a90b4cc8e81ebeddaec1431d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add write_flush_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I567be3c016f6d96bb5e7b36342e162dfdff2f836 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add mark_write_dirty_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I9a6fe86eff739c8bf377e7a700e79e8d28b90361 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add close_window_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I2ca90440333f1b06c408884f59af22ab0f9c596d Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_write_window_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I26992306b7de4ece0b14b51a4a9c443ef47ce302 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add create_read_window_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I2b1295faea3df207cce5430653b4e0a78176e13c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add get_flash_info_v2Andrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: I55916bb3b8538701b0f54f9ce259b1ac4715941c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add reset_stateAndrew Jeffery2017-04-261-1/+5
| | | | | Change-Id: Ia18a5e7c472d8fe55fb90a13be21f731e407e6e9 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add get_mbox_info_v2Andrew Jeffery2017-04-261-3/+10
| | | | | Change-Id: Ibd4d9c7880bc427edcecafcc2e9abeb487620fdb Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add write_flashAndrew Jeffery2017-04-261-1/+4
| | | | | Change-Id: I887d79db9f1fd5e63c16a717a88cd76a1f800986 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add erase_flashAndrew Jeffery2017-04-261-1/+4
| | | | | Change-Id: Idbe0e8a9d7c62eeb5ac90fce055fc87de80ab1fa Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add copy_flashAndrew Jeffery2017-04-261-1/+4
| | | | | Change-Id: Iac6b6207c01f1db322803218231ca97c210a583c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* test: Add NDEBUG sanity checkAndrew Jeffery2017-04-261-0/+6
| | | | | | | Hopefully stops people tripping over themselves if NDEBUG gets defined. Change-Id: Iafb81d01f6451619f49a5030e5154c8f30ffebdb Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* autotools: Add code coverage supportAndrew Jeffery2017-04-261-0/+6
| | | | | Change-Id: I7d11c64ffa3e68973081cfb1f3fdc1817a64e8cd Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* common: Move get_dev_mtd() to mtd.cAndrew Jeffery2017-04-261-1/+1
| | | | | | | | Allows tests to link in alternative implementations of get_dev_mtd() without losing other functions available in common.c. Change-Id: I606a83aa9bc59b5fbab1fb11ee1e2574c7f6d127 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* mboxctl: Implement mboxctl to facilitate dbus control of the daemonSuraj Jitindar Singh2017-04-111-1/+5
| | | | | | | | | The daemon can now be controlled by issuing commands over dbus. Implement a mailbox control program to facilitate communication with the daemon over dbus. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Change-Id: I2a11f187268d28ce92d3c2592e0021e1ba5588b4
* mboxd: Update mboxd to implement protocol V2 and add dbus supportSuraj Jitindar Singh2017-04-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Convert to autotoolsAndrew Jeffery2017-01-171-0/+6
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
OpenPOWER on IntegriCloud