| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ie7f6f1806c203ddf46fb8d5a651ebd908ea921cb
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1440
Change-Id: I8e6ae35e4c5ba2936a578349e6cea464de6ab40d
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I709c410009fb0047d7e59ddd3a681f25e49341a0
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I35af6c4c43e9a43f6a21992bfb0c13542a2c8f0d
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if we write "int i;" in header file, c compiler treats
as a tentative definition while c++ compiler
treats as a definition.
so when two cpp file includes the same header file
then during linking time compiler says that there are
multiple definitions.
so to overcome this problem we are declaring it as extern
and defining it in the corresponding c file.
Change-Id: I91378c4c587414edf35f8313f2497268be36e2f4
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
|
|
|
|
|
|
|
|
| |
In view of some of the upcoming C++ code, check for the C++ compiler.
Also enable compiling C++14 code.
Change-Id: I7ac587e3b40385845b39f7ae0655227c45ed055b
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I70e1b1f8d709ce79e0664d5f916115e77427b1e8
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
|
|
|
|
| |
Change-Id: I3fc6819ce7c1dfc63ea1f14e4f23097b48b8a115
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works around the bug where Ubuntu Zesty's autoconf-archive package
at version 20160916-1 doesn't support Zesty's lcov package, which is
1.13. This leads to a non-zero exit by ./configure when enabling
code-coverage support on Zesty.
Revert when Zesty isn't broken.
Change-Id: I4050abdf9ea1b0ce7e131f334847f8f57a7281cc
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I2fe0974182c2f207232b8e9b1f2d0acb7b57512c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I11812d5aa19d4a293282ab776663bdfe6154069a
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
| |
Avoid conflicts in the protocol documentation by pointing back to the
reference implementation.
Change-Id: I380f32dab2e9b8bbeec25b9abffe9c5427b76bd3
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update to package version V2.1.0 to reflect that a backwards compatible
API change was made. This API change was the introduction of the timeout
to the GET_MBOX_INFO command.
This version update also encompasses previous bug fixes.
The versioning scheme is now aligned to semver.
Use the version from config.h for both mboxd and mboxctl instead of an
independant value for the daemon and control programs.
Change-Id: I12d7fe8e40697801594b1727054342613923a784
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mbox_vlog contains the function pointer for the logging function called in
MSG_<ERR/INFO/DEBUG>. Currently we don't set it in the
<write/copy/erase>_flash tests meaning if there is any test output that we
try to dereference a null pointer and thus segfault.
Set it in these tests so that we can get test output which can be useful
for debugging and most importantly so that we don't segfault which is
annoying...
Change-Id: If91725ded0ee5d6c3ab0a8925126065ec43b0cc3
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It would be nice to suggest to the host how long it should wait for a
response to a command before assuming that the BMC is not going to
respond and timing out.
Add a response argument for this to the GET_MBOX_INFO command. We don't want
to require a BMC to set this so we allow it to be zero to indicate that no
suggestion has been given.
This doesn't require us to bump the protocol number since the current daemon
just sets this to zero (which is allowed) and the host is free to ignore this,
which it currently does.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: Idd65a5660e0092b9abd98829403b981fd26f8bbe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Writes to register 13 (Response Code) are what is used to generate an
interrupt to the host. On receiving this interrupt the host can start
processing the entire response message. Thus to ensure that the host
is processing the correct mbox response register 13 must be the last
to be written.
Stipulate in the protocol documentation that the last register to be
written by the BMC when writing a response must be the response code
into register 13.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: I2b4e14a81d7bbffc990cfb83321ab219e3df1d82
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Arguments and responses to most commands are given in block size which
is decided on during the version negotiation process when GET_MBOX_INFO
is called.
We require that block size is greater than 4K (12 bit). The lpc bus
address space is 28 bit and commands which return an lpc bus address have
a 16 bit variable space, this means we can correctly specify anywhere in
the lpc address space.
This also allows us to support flash sizes up to 256MB where we can
correctly specify any flash offset in the command arguments.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: Ia08979017a3c0ff229ce412948dc4c67d357e82b
|
|
|
|
|
|
|
|
|
| |
Reword the create_{read/write}_window command specification to make it
easier to understand and remove sentences which add no value or are
unnecessarily verbose.
Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com>
Change-Id: Idb1ac8da82d4a1ab379c55ff650ef410de86e715
|
|
|
|
|
|
|
|
|
|
| |
However, don't download it if the file is already present in the local
directory. The AC_CHECK_HEADER macro can't test this case, so the
condition will always trigger if the header isn't installed on the
system.
Change-Id: I7de8ff24823fe2ce54add9a33125cee5ad0b53f0
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Ida6123bf27445f0fb65099fbf6d9520344d33f10
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Iaa967b7e0732ebc0322ea89e74861a5bedb34867
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I42bc056e5c6b6fdd078bc622e40db39583b53c64
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I16d2488e75dde619da39d755e00666bc24778217
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I40e3e29e8064f7ec156cdfd579071563d1cc35c3
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I17b237f66e57a40df136d47e2e963eae4c3de535
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I7ab43db7d69b0f085574b40701d48dfa99f00856
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Ia2ce45977b2735663e9745e1da72378df5819a01
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ib64fe711e7e7922ad90cb8e9a84972df4cbc5b2d
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I59f3c1e92b519d4f52b6d4fe031d425f161e4dd3
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I944046be71b6973e8bd1760678fcfaea39d7bc12
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Id6966ce54ddfdc2c2ec3933c0dde12451223a61c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I74f98b63f9971b53a90b4cc8e81ebeddaec1431d
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I567be3c016f6d96bb5e7b36342e162dfdff2f836
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I9a6fe86eff739c8bf377e7a700e79e8d28b90361
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I2ca90440333f1b06c408884f59af22ab0f9c596d
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I26992306b7de4ece0b14b51a4a9c443ef47ce302
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I2b1295faea3df207cce5430653b4e0a78176e13c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: I55916bb3b8538701b0f54f9ce259b1ac4715941c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Ia18a5e7c472d8fe55fb90a13be21f731e407e6e9
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
| |
Change-Id: Ibd4d9c7880bc427edcecafcc2e9abeb487620fdb
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The primary entry point to the system abstraction is through its
ioctl() implementation, which handles ioctl calls for the MTD and LPC
subsystems. The MBOX portion needs no support as it is driven purely by
read() and write() calls.
Two helpers are exposed to configure the MTD and LPC subsystems
respectively.
Change-Id: Id50abdb967f6ea2ece2e3b21288412d276439c36
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
| |
The helpers enable initialising the mbox context to the point that
dispatch_mbox() can be usefully called in a controlled environment, and
then testing any side-effects that resulted.
Change-Id: I590841f70dd51e0993b491e537ed4a73ab696e14
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|