History log of /openbmc/phosphor-mboxd/ (Results 101 – 125 of 247)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
c314404225-Feb-2018 Andrew Jeffery <andrew@aj.id.au>

test: Update tmpf to store data in /tmp, reformat names

Cleans up residuals from failed tests in the source tree by moving them
to /tmp. Some were annoying to remove with prefixes like 'mbox', so
ch

test: Update tmpf to store data in /tmp, reformat names

Cleans up residuals from failed tests in the source tree by moving them
to /tmp. Some were annoying to remove with prefixes like 'mbox', so
change the pattern as well to include '-store'.

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

show more ...

baea36d925-Feb-2018 Andrew Jeffery <andrew@aj.id.au>

gitignore: Ignore all cscope files

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

44ac078b25-Feb-2018 Andrew Jeffery <andrew@aj.id.au>

common: Improve readability and utility of MSG_*() macros

Ensures we can't dereference NULL if a logger hasn't been set, and
cleans up the MSG_*() macros for readability.

Change-Id: I9808d8fe767261

common: Improve readability and utility of MSG_*() macros

Ensures we can't dereference NULL if a logger hasn't been set, and
cleans up the MSG_*() macros for readability.

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

show more ...

7a3814b022-Feb-2018 Andrew Jeffery <andrew@aj.id.au>

common: Ensure helpers are endian-safe

The specification states that all multibyte values communicated via mbox
are little-endian[0]. Do the conversions in the helpers to enforce this
property.

[0]

common: Ensure helpers are endian-safe

The specification states that all multibyte values communicated via mbox
are little-endian[0]. Do the conversions in the helpers to enforce this
property.

[0] https://github.com/openbmc/mboxbridge/blob/master/Documentation/mbox_protocol.md#information

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

show more ...

cafb002e20-Feb-2018 Andrew Jeffery <andrew@aj.id.au>

test: Fix memory leak in write_flash_vpnor

Running the test suite when configuring the source via `./bootstrap.sh dev`
leads to a failure of the write_flash_vpnor test with the report below in
test-

test: Fix memory leak in write_flash_vpnor

Running the test suite when configuring the source via `./bootstrap.sh dev`
leads to a failure of the write_flash_vpnor test with the report below in
test-suite.log. Add the necessary cleanup to ensure the test suite passes
cleanly.

===================================
mboxd 2.1.0: ./test-suite.log
===================================

.. contents:: :depth: 2

FAIL: test/write_flash_vpnor
============================

[ 1519173867.854683139] Write flash @ 0x00003000 for 0x00000008 from 0x7ffe94d51ae0
[ 1519173867.854904248] Didn't find the file in the desired partition so copying[/tmp/prsv.RY6KiO/TEST3]
[ 1519173867.854979940] File copied from[/tmp/ro.dUeyxG/TEST3] to [/tmp/prsv.RY6KiO/TEST3]
[ 1519173867.855082198] Write flash @ 0x00001000 for 0x00000008 from 0x7ffe94d51ae0
[ 1519173867.857098822] Write flash @ 0x00002000 for 0x00000008 from 0x7ffe94d51ae0
[ 1519173867.857249802] Write flash @ 0x00002003 for 0x0000001c from 0x7ffe94d51ae0
[ 1519173867.857806832] Write flash @ 0x00002000 for 0x00000008 from 0x7ffe94d51ae0
[ 1519173867.857955823] Write flash @ 0x00002000 for 0x00000001 from 0x7ffe94d51ae0
[ 1519173867.858045089] Write flash @ 0x00002001 for 0x00000001 from 0x7ffe94d51ae1
[ 1519173867.858120016] Write flash @ 0x00002002 for 0x00000001 from 0x7ffe94d51ae2
[ 1519173867.858273459] Write flash @ 0x00002000 for 0x00000008 from 0x7ffe94d51b20
[ 1519173867.855134488] Can't open the RO partition for write[ 1519173867.857323229] Offset is beyond the partition file length[0x00000008]

=================================================================
==15139==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458)
#1 0x56371c4cb52f in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:40
#2 0x56371c502013 in main test/write_flash_vpnor.cpp:145
#3 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

Direct leak of 2 byte(s) in 1 object(s) allocated from:
#0 0x7f98b42f4d38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38)
#1 0x56371c5003b6 in init(mbox_context*) test/write_flash_vpnor.cpp:115
#2 0x56371c501c36 in main test/write_flash_vpnor.cpp:137
#3 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

Indirect leak of 4096 byte(s) in 1 object(s) allocated from:
#0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458)
#1 0x56371c3fa0c0 in __gnu_cxx::new_allocator<unsigned char>::allocate(unsigned long, void const*) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2850c0)
#2 0x56371c3f3483 in std::allocator_traits<std::allocator<unsigned char> >::allocate(std::allocator<unsigned char>&, unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x27e483)
#3 0x56371c3ebf6c in std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_M_allocate(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x276f6c)
#4 0x56371c3e3aa4 in std::vector<unsigned char, std::allocator<unsigned char> >::_M_default_append(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x26eaa4)
#5 0x56371c3d82c5 in std::vector<unsigned char, std::allocator<unsigned char> >::resize(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2632c5)
#6 0x56371c3c623d in openpower::virtual_pnor::endianFixup(std::vector<unsigned char, std::allocator<unsigned char> > const&) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:268
#7 0x56371c3c2366 in openpower::virtual_pnor::partition::Table::Table(std::experimental::filesystem::v1::__cxx11::path&&, unsigned long, unsigned long) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:38
#8 0x56371c4cb844 in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:45
#9 0x56371c502013 in main test/write_flash_vpnor.cpp:145
#10 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

Indirect leak of 4096 byte(s) in 1 object(s) allocated from:
#0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458)
#1 0x56371c3fa0c0 in __gnu_cxx::new_allocator<unsigned char>::allocate(unsigned long, void const*) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2850c0)
#2 0x56371c3f3483 in std::allocator_traits<std::allocator<unsigned char> >::allocate(std::allocator<unsigned char>&, unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x27e483)
#3 0x56371c3ebf6c in std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_M_allocate(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x276f6c)
#4 0x56371c3e3aa4 in std::vector<unsigned char, std::allocator<unsigned char> >::_M_default_append(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x26eaa4)
#5 0x56371c3d82c5 in std::vector<unsigned char, std::allocator<unsigned char> >::resize(unsigned long) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x2632c5)
#6 0x56371c3d1b40 in openpower::virtual_pnor::partition::Table::allocateMemory(std::experimental::filesystem::v1::__cxx11::path const&) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:78
#7 0x56371c3c3006 in openpower::virtual_pnor::partition::Table::preparePartitions() /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:165
#8 0x56371c3c2216 in openpower::virtual_pnor::partition::Table::Table(std::experimental::filesystem::v1::__cxx11::path&&, unsigned long, unsigned long) /home/andrew/src/openbmc/phosphor-mboxd/pnor_partition_table.cpp:36
#9 0x56371c4cb844 in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:45
#10 0x56371c502013 in main test/write_flash_vpnor.cpp:145
#11 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

Indirect leak of 432 byte(s) in 3 object(s) allocated from:
#0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458)
#1 0x56371c5176b0 in void std::vector<std::experimental::filesystem::v1::__cxx11::path::_Cmpt, std::allocator<std::experimental::filesystem::v1::__cxx11::path::_Cmpt> >::_M_realloc_insert<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::experimental::filesystem::v1::__cxx11::path::_Type, unsigned long&>(__gnu_cxx::__normal_iterator<std::experimental::filesystem::v1::__cxx11::path::_Cmpt*, std::vector<std::experimental::filesystem::v1::__cxx11::path::_Cmpt, std::allocator<std::experimental::filesystem::v1::__cxx11::path::_Cmpt> > >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::experimental::filesystem::v1::__cxx11::path::_Type&&, unsigned long&) (/home/andrew/src/openbmc/phosphor-mboxd/test/write_flash_vpnor+0x3a26b0)

Indirect leak of 144 byte(s) in 1 object(s) allocated from:
#0 0x7f98b42f6458 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe0458)
#1 0x56371c4cb74b in vpnor_create_partition_table_from_path /home/andrew/src/openbmc/phosphor-mboxd/mboxd_pnor_partition_table.cpp:45
#2 0x56371c502013 in main test/write_flash_vpnor.cpp:145
#3 0x7f98b225b1c0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x211c0)

SUMMARY: AddressSanitizer: 8778 byte(s) leaked in 8 allocation(s).
FAIL test/write_flash_vpnor (exit status: 1)

Change-Id: I7d1a5262833146794e0298084e828e14821041b7
Fixes: openbmc/openbmc#2866
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

e570740d01-Feb-2018 Andrew Jeffery <andrew@aj.id.au>

pnor_partition_table: Fix printf() format specifier for size_t

On x86_64 we receive the following warning from GCC:

In file included from pnor_partition_table.cpp:2:0:
pnor_partition_table.

pnor_partition_table: Fix printf() format specifier for size_t

On x86_64 we receive the following warning from GCC:

In file included from pnor_partition_table.cpp:2:0:
pnor_partition_table.cpp: In member function ‘const pnor_partition& openpower::virtual_pnor::partition::Table::partition(size_t) const’:
common.h:37:61: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Werror=format=]
#define MSG_ERR(f_, ...) mbox_log(LOG_ERR, f_, ##__VA_ARGS__)
^
pnor_partition_table.cpp:218:5: note: in expansion of macro ‘MSG_ERR’
MSG_ERR("Partition corresponding to offset %x not found", offset);
^~~~~~~

The type of %x may not match the size of the type on the host system. Use %zu
to avoid a compiler warning.

Change-Id: I79b0a33af6fc4e0c06c60457e89d0c4125d1e39d
Tested: Changed the format specifier and recompiled, observed no warnings
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

acb32ef705-Dec-2017 Adriana Kobylak <anoo@us.ibm.com>

pnor_partition_table: Parse all miscellaneous user flags from TOC

Add support for the remaining miscellaneous flags specified in the Hostboot FFS
header, specifically the CLEARECC flag:

https:/

pnor_partition_table: Parse all miscellaneous user flags from TOC

Add support for the remaining miscellaneous flags specified in the Hostboot FFS
header, specifically the CLEARECC flag:

https://github.com/open-power/hostboot/blob/master/src/usr/pnor/common/ffs_hb.H

This requires a change to how the properties string was being parsed so we can
differentiate between the ECC and CLEARECC options.

In detail:

Issue openbmc/openbmc#2704 captures a failure where Hostboot detects flash
corruption on an FFS partition with ECC enabled. In some instances,
configuration of FFS partitions allows Hostboot to "fix" ECC errors by clearing
the entire partition and trying again. In this case, the attempt fails:

--== Welcome to Hostboot hostboot-e223708/hbicore.bin ==--

4.01970|secure|SecureROM valid - enabling functionality
4.01974|secure|Booting in non-secure mode.
5.93358|ISTEP 6. 5 - host_init_fsi
6.06661|ISTEP 6. 6 - host_set_ipl_parms
6.07597|ECC error in PNOR flash in section offset 0x00026000

6.07604|System shutting down with error status 0x60F

Looking at the TOC, we find 0x26000 is in HBEL:

# cat /tmp/pnor.toc
version=IBM-witherspoon-ibm-OP9_v1.19_1.121
extended_version=op-build-v1.19-326-g20bf99a-dirty,buildroot-2017.08-8-g5e23247,skiboot-v5.9.8,hostboot-7f4ced1,linux-4.13.16-openpower1-p686edfa,petitboot-v1.6.3-p191b3ea,machine-xml-758eb02,occ-84f3564,hostboot-binaries-38248b4,capp-ucode-p9-dd2-v2,sbe-99e2fe2
partition00=part,0x00000000,0x00001000,00,READWRITE
partition01=HBEL,0x00008000,0x0002c000,00,ECC,REPROVISION,READWRITE
partition02=GUARD,0x0002c000,0x00031000,00,ECC,PRESERVED,REPROVISION

Except, Dan Crowell identified that the reported offset is merely *indirectly*
related to the offending location in the PNOR layout description:

1) There is a bug in the openbmc code that causes them to remove space from
our pnor layout. We don't think that has a functional problem but it does
confuse things. The number pointed out in the printk was pointing me at
the HBEL partition but the problem is really inside the GUARD partition.
Adriana is going to be fixing this issue.

The GUARD partition requires the ClearOnEccErr flag[1], however Hostboot's
output indicates this action isn't taken; phosphor-mboxd failed to add this
information to the dynamically generated TOC data structure presented to
Hostboot.

Thus, add support for all miscellaneous flags to the ToC generator, allowing
the ClearOnEccErr (CLEARECC) flag to be propagated.

[1] https://github.com/open-power/pnor/blob/22a9eadc0b2afbd2aca1e054faa2cca90e7760c2/p9Layouts/defaultPnorLayout_64.xml#L90

The bug was confirmed on a Witherspoon system by creating a dummy GUARD
partition from /dev/urandom and beginning IPL. Leaving the dummy GUARD in
place, mboxd was replaced with the patched build and the host rebooted.
Hostboot successfully cleared the partition and triggered a reboot, then
successfully booted to Petitboot.

Resolves openbmc/openbmc#2704

Tested: As described above
Change-Id: I21c9bbc60b8c503194fcea03e74ab1d08aff57fe
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
[arj: Reworked the commit message to describe the bug and fallout]
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

2ad2132828-Nov-2017 Adriana Kobylak <anoo@us.ibm.com>

vpnor table: Set base address to actual offset

The base address for the partitions is used by mboxd to find
requested partitions, and for simplicity it's just a continous
number sequence.
But this d

vpnor table: Set base address to actual offset

The base address for the partitions is used by mboxd to find
requested partitions, and for simplicity it's just a continous
number sequence.
But this data is used by the host as the partition offsets,
which are expected to match to the offsets in the openpower xml:
https://github.com/open-power/pnor/blob/21d66daff697f8c13fb067340ca621e9208ab1ea/p9Layouts/defaultPnorLayout_64.xml

This xml pnor layout has empty spaces in between the partitions,
ex: part ends at address 0x2000 and the next partition HBEL starts
at 0x8000. Need to set base address to the actual offset that
corresponds to the xml file, so that the host traces that display
the partition offsets match the data in documented in the xml.
This doesn't affect the memory address allocation.

Part of openbmc/openbmc#2677

Change-Id: Ica142129aabd195655018a84f9a993596c333457
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

0a2cc95512-Oct-2017 Adriana Kobylak <anoo@us.ibm.com>

mboxd_flash_virtual.cpp: Fix variable name for checking mmap rc

The return code for mmap is stored in variable mapped_mem, but
then variable mem was being checked for the return code value.
Change t

mboxd_flash_virtual.cpp: Fix variable name for checking mmap rc

The return code for mmap is stored in variable mapped_mem, but
then variable mem was being checked for the return code value.
Change that to mapped_mem.

Change-Id: Ie198c78f1d404a34767d7781a2fdcc48e1724a44
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

6c3ccf8c10-Nov-2017 Brandon Wyman <bjwyman@gmail.com>

Point mailbox daemon documentation to mboxbridge

Simlar to the update to mbox_protocol.md, those looking for the
documentation on the mailbox daemon should refer to the more
up-to-date version in th

Point mailbox daemon documentation to mboxbridge

Simlar to the update to mbox_protocol.md, those looking for the
documentation on the mailbox daemon should refer to the more
up-to-date version in the openbmc/mboxbridge repository.

Change-Id: Iedea144ee70c9c4059f08ccb131ddc4ecec7ad36
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...

987672af10-Nov-2017 Brandon Wyman <bjwyman@gmail.com>

Point mailbox control protocol to mboxbridge

Similar to the update to mbox_protocol.md, those looking for this
documentation should refer to the more up-to-date version in the
openbmc/mboxbridge rep

Point mailbox control protocol to mboxbridge

Similar to the update to mbox_protocol.md, those looking for this
documentation should refer to the more up-to-date version in the
openbmc/mboxbridge repository.

Change-Id: I659f9a26822b81e99261c855f3ee61392bc9d6d5
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...

08b0a89c08-Nov-2017 Marri Devender Rao <devenrao@in.ibm.com>

Fix up InternalFailure to include metadata

Scope is to add missing logs for InternalFailure errors

Resolves openbmc/openbmc#2552, openbmc/openbmc#2568

Change-Id: Ic94b9d768e32b4d7be2b9b6746c1b675f

Fix up InternalFailure to include metadata

Scope is to add missing logs for InternalFailure errors

Resolves openbmc/openbmc#2552, openbmc/openbmc#2568

Change-Id: Ic94b9d768e32b4d7be2b9b6746c1b675f15e3b1e
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>

show more ...

59ce099b27-Oct-2017 Jayanth Othayoth <ojayanth@in.ibm.com>

Fix for mboxd segfault during flash read

mboxd segfaults during flash read when there is
no partition associated to the given offset within the
flash size.

Proposed fix is to generate elog instead

Fix for mboxd segfault during flash read

mboxd segfaults during flash read when there is
no partition associated to the given offset within the
flash size.

Proposed fix is to generate elog instead of returning
reference to zeroed out pnor_partition structure.

Resolves openbmc/openbmc#2365

Change-Id: I98bed1c09588c386d9ea2510618bb27eaa6dfbe0
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>

show more ...

6577ef3403-Oct-2017 Suraj Jitindar Singh <sjitindarsingh@gmail.com>

docs: Specify V3 of the mbox protocol

Version 3 of the mbox protocol makes four protocol changes:
- Add a requested block size argument to GET_MBOX_INFO
- Add a no erase argument to MARK_DIRTY
-

docs: Specify V3 of the mbox protocol

Version 3 of the mbox protocol makes four protocol changes:
- Add a requested block size argument to GET_MBOX_INFO
- Add a no erase argument to MARK_DIRTY
- Add a GET_FLASH_NAME command and support multiple flash devices
- Add a MARK_LOCKED command

Requested Block Size:
The requested block size argument has been added to the GET_MBOX_INFO
command to allow the host to request a specified block size which might
be required to allow data manipulation at a finer granularity. The
daemon should take this into account when choosing a block size for use
which it will specify in the response as before. The daemon has final
say and the host must use the block size the daemon chooses.

No Erase:
The no erase argument to the mark dirty command allows a host to specify
that an area of flash should not be erased before being written to, as is
the default behaviour. This can be used when a host has already erased a
large area and then performs many small writes which would normally mean
many erases due to the implicit erase before write, making this slow.

Add GET_FLASH_NAME command:
The ability to support multiple flash devices has been added so that the
mbox protocol can be used to arbitrate access from the host to a number
of flash devices which the daemon has access to. To facilitate this the
GET_FLASH_INFO, CREATE_{READ/WRITE}_WINDOW, and MARK_LOCKED commands now
take a flash ID, with the number of flash IDs allocated returned by the
GET_MBOX_INFO commands. There is also a new command GET_FLASH_NAME used
to convert a flash ID to a flash name.

Add MARK_LOCKED command:
The MARK_LOCKED command has been added to allow an area(s) of flash to be
locked, that is that area must be treated as read only and the host is
not allowed to dirty or erase any windows which map that area of flash.
Additionally another error code LOCKED_ERROR was added to be returned
when the host does try to dirty or erase a locked area.

The host cannot lock a currently dirty or erased area of the current
write window as it is not defined if the clean/dirty/erased value is
what should actually be "locked".

A locked area of flash remains so until the daemon receives an
mboxctl --clear-locked command and the locked areas are stored in a file
on the BMC filesystem to ensure persistence across BMC reboots/daemon
crashes.

Multiple flash device support proposed and defined by:
William A. Kennington III <wak@google.com>

Change-Id: I898698840dec221ae20e33943bb28e65abc4fe37
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
Acked-by: Adriana Kobylak <anoo@us.ibm.com>
Reviewed-by: William A. Kennington III <wak@google.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>

show more ...

8493c33b05-Oct-2017 Suraj Jitindar Singh <sjitindarsingh@gmail.com>

vpnor: Fix unable to read unaligned partition override files

Currently when using vpnor and an override file is applied which has
an unaligned size it is impossible to read the last unaligned bit of

vpnor: Fix unable to read unaligned partition override files

Currently when using vpnor and an override file is applied which has
an unaligned size it is impossible to read the last unaligned bit of
the file. This is because the response to the host truncates the window
size when converting from bytes to blocks (effectively aligning down
the size and causing the window to look smaller than it is).

We could blindly align up the size but then the host would be within
its rights to access uninitialised memory which we would like to avoid.
To work around this we always align the window size up to a multiple
of block size. Any memory not read from the file is set to 0xFF to
mimic erased flash.

Fixes: https://github.com/openbmc/openbmc/issues/2344

Reported-by: Stewart Smith <sesmith@au1.ibm.com>
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: Ic857c31e9402b98ab19dba1a23adc74eaf40491b

show more ...

7760fd8f20-Sep-2017 Suraj Jitindar Singh <sjitindarsingh@gmail.com>

mboxd/dbus: Unconditionally send BMC EVENT to host on resume

The "BMC Flash Control Lost" BMC Event (0x40) is used to signal to the
host that the daemon has been suspended, such as by mboxctl --susp

mboxd/dbus: Unconditionally send BMC EVENT to host on resume

The "BMC Flash Control Lost" BMC Event (0x40) is used to signal to the
host that the daemon has been suspended, such as by mboxctl --suspend.
When resumed, such as by mboxctl --resume, the bit is cleared and this
is again communicated to the host.

When the resume command is called with clean the clearing of this bit is
communicated to the host unconditionally. However when resume is called
with modified we rely on the reset windows function to communicate this to
the host at the same time it tells the host that the active window has
been closed. However the reset windows function is only called if there
was indeed an active window. This means that when resume is called with
modified and there isn't an active window, the host is never told that
the daemon has been resumed.

Fix this by communicating the BMC event to the host unconditionally on
resume irrespective of the argument.

Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: I2e921d897476a9e34516f8929e713057ea0622a4

show more ...

5cd1a43327-Jul-2017 Leonel Gonzalez <lgonzalez@us.ibm.com>

phosphor-mboxd: Define mboxd dbus properties and methods

Defines the mboxd yaml file, as the first change
to allow phosphor-mboxd to use sdbusplus.
Modifies gitignore to ignore mboxd binary but not

phosphor-mboxd: Define mboxd dbus properties and methods

Defines the mboxd yaml file, as the first change
to allow phosphor-mboxd to use sdbusplus.
Modifies gitignore to ignore mboxd binary but not
the mboxd directory in the yaml's path.
Describes the xyz.openbmc_project.Mboxd interface

Change-Id: Iec2876b93b5152b1fafdbefce277fcf64b9525f8
Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>

show more ...

6e6aa3a928-Aug-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

vpnor: gracefully handle missing HBB partition

The first thing the virtual pnor enabled mboxd does is look for the host
boot-loader partition. Not finding the same would result in an exception
that

vpnor: gracefully handle missing HBB partition

The first thing the virtual pnor enabled mboxd does is look for the host
boot-loader partition. Not finding the same would result in an exception
that was not handled, and hence mboxd would core. Commit this exception
instead; mboxd still won't be able to load the host bootloader if HBB is
missing.

Change-Id: I9cd4fe74238267ed9d6635d84298da38ac3c36cc
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...

97578a6b17-Aug-2017 Gunnar Mills <gmills@us.ibm.com>

Spelling and grammar fixes for mboxd.md

Change-Id: Ie653e70d709d5d616666bbc072042589d16a802f
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

4bcf02bf17-Aug-2017 Gunnar Mills <gmills@us.ibm.com>

Spelling and grammar fixes for mbox_protocol.md

Change-Id: I506fd571ad93ecd548c94ff119c910aa873bf1d7
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

1e1bdc7516-Aug-2017 Adriana Kobylak <anoo@us.ibm.com>

pnor_partition_table: Handle toc addresses starting with 0x

With open-power/skiboot commit 36bab76, pflash added a prefix
of 0x to the partition addresses, which is used to generate
the toc.
Add an

pnor_partition_table: Handle toc addresses starting with 0x

With open-power/skiboot commit 36bab76, pflash added a prefix
of 0x to the partition addresses, which is used to generate
the toc.
Add an optional prefix of 0x to the regex to handle this change
while being backwards compatible.
Also add the optional prefix of 0x to the 3rd parameter as this
should also change to specify it's a hex number.
The std::stoul function to convert the string to hex handles
the string with and without the 0x prefix.

Resolves openbmc/openbmc#2124

Change-Id: I2273e28781d57ed8e3640fd287df1fad2e1da3bf
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

eb08355004-Aug-2017 Adriana Kobylak <anoo@us.ibm.com>

Set partition actual size to file size if patch file present

A patch partition file may be of smaller size than the size allocated
for that partition. If that's the case then set the actual size val

Set partition actual size to file size if patch file present

A patch partition file may be of smaller size than the size allocated
for that partition. If that's the case then set the actual size value
to the smaller file size.
This mimics the pflash implementation of flashing an individual
partition, which updates the actual size in the toc to the size
of the provided file.

Change-Id: I7653f5570e9e2b32b095ee6d7be4557cf59d2de7
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

c71dfd7922-Jul-2017 Adriana Kobylak <anoo@us.ibm.com>

vpnor: Add patch location

Look for the requested partition in the designated patch location
(/usr/local/share/pnor/). If the partition is not found there,
continue with the existing logic of looking

vpnor: Add patch location

Look for the requested partition in the designated patch location
(/usr/local/share/pnor/). If the partition is not found there,
continue with the existing logic of looking in the other partition
directories.
This allows users to use patches in the virtual pnor implementation.

Resolves openbmc/openbmc#1551

Change-Id: I7f27dfc9cd69a3f8ab88cb6fa77b2c1096e32841
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...

88c7406f25-Jul-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

vpnor: mboxd reset: reconstruct TOC

Upon mboxd reset, reconstruct the virtual PNOR partition table, so that
an update in the PNOR can be accounted for.

The use case here is someone loads a new PNOR

vpnor: mboxd reset: reconstruct TOC

Upon mboxd reset, reconstruct the virtual PNOR partition table, so that
an update in the PNOR can be accounted for.

The use case here is someone loads a new PNOR while the BMC is at
standy, activates it, and boots the system. The TOC corresponding to
this PNOR would need to be reconstructed.

Change-Id: I3247e8cb594adc8ced7c5dd706ae1bda7b0a01b9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

show more ...

f9abed0317-Jul-2017 Deepak Kodihalli <dkodihal@in.ibm.com>

vpnor: return appropriate return code

Return -MBOX_R_SYSTEM_ERROR instead of -1.

Change-Id: Id8af94882cafd7b95eef9ee0e73d95c9f2e020f2
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>

12345678910