<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-skiboot/libflash/test, branch master</title>
<subtitle>Talos™ II skiboot sources</subtitle>
<id>https://git.raptorcs.com/git/talos-skiboot/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-skiboot/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/'/>
<updated>2018-04-10T00:02:11+00:00</updated>
<entry>
<title>libflash/blocklevel: Make read/write be ECC agnostic for callers</title>
<updated>2018-04-10T00:02:11+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyril.bur@au1.ibm.com</email>
</author>
<published>2018-03-07T06:04:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=5616c42d900afb04a4df77fe0a882f5258239211'/>
<id>urn:sha1:5616c42d900afb04a4df77fe0a882f5258239211</id>
<content type='text'>
The blocklevel abstraction allows for regions of the backing store to be
marked as ECC protected so that blocklevel can decode/encode the ECC
bytes into the buffer automatically without the caller having to be ECC
aware.

Unfortunately this abstraction is far from perfect, this is only useful
if reads and writes are performed at the start of the ECC region or in
some circumstances at an ECC aligned position - which requires the
caller be aware of the ECC regions.

The problem that has arisen is that the blocklevel abstraction is
initialised somewhere but when it is later called the caller is unaware
if ECC exists in the region it wants to arbitrarily read and write to.
This should not have been a problem since blocklevel knows. Currently
misaligned reads will fail ECC checks and misaligned writes will
overwrite ECC bytes and the backing store will become corrupted.

This patch add the smarts to blocklevel_read() and blocklevel_write() to
cope with the problem. Note that ECC can always be bypassed by calling
blocklevel_raw_() functions.

All this work means that the gard tool can can safely call
blocklevel_read() and blocklevel_write() and as long as the blocklevel
knows of the presence of ECC then it will deal with all cases.

This also commit removes code in the gard tool which compensated for
inadequacies no longer present in blocklevel.

Signed-off-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
Tested-by: Pridhiviraj Paidipeddi &lt;ppaidipe@linux.vnet.ibm.com&gt;
[stewart: core/flash: Adapt to new libflash ECC API
Signed-off-by: Stewart Smith &lt;stewart@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>libflash/blocklevel: Return region start from ecc_protected()</title>
<updated>2018-04-09T08:45:23+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyril.bur@au1.ibm.com</email>
</author>
<published>2018-03-07T06:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=3df9b3cc82cd9c386a68250b46e3c3648daafd4b'/>
<id>urn:sha1:3df9b3cc82cd9c386a68250b46e3c3648daafd4b</id>
<content type='text'>
Currently all ecc_protected() does is say if a region is ECC protected
or not. Knowing a region is ECC protected is one thing but there isn't
much that can be done afterwards if this is the only known fact. A lot
more can be done if the caller is told where the ECC region begins.

Knowing where the ECC region start it allows to caller to align its
read/and writes. This allows for more flexibility calling read and write
without knowing exactly how the backing store is organised.

Signed-off-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
Signed-off-by: Stewart Smith &lt;stewart@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>libflash/ecc: Add helpers to align a position within an ecc buffer</title>
<updated>2018-04-09T08:45:23+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyril.bur@au1.ibm.com</email>
</author>
<published>2018-03-07T06:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=f7713517d90a14853dc9cfb66ee33dbc084e6ddf'/>
<id>urn:sha1:f7713517d90a14853dc9cfb66ee33dbc084e6ddf</id>
<content type='text'>
As part of ongoing work to make ECC invisible to higher levels up the
stack this function converts a 'position' which should be ECC agnostic
to the equivalent position within an ECC region starting at a specified
location.

Signed-off-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
Signed-off-by: Stewart Smith &lt;stewart@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>libflash/test: Add tests for mbox-flash</title>
<updated>2017-12-18T23:58:32+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyril.bur@au1.ibm.com</email>
</author>
<published>2017-12-05T01:01:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=b9774c47eecd0c90e503919432ec1e4a86355398'/>
<id>urn:sha1:b9774c47eecd0c90e503919432ec1e4a86355398</id>
<content type='text'>
A first basic set of tests for mbox-flash. These tests do their testing
by stubbing out or otherwise replacing functions not in
libflash/mbox-flash.c. The stubbed out version of the function can then
be used to emulate a BMC mbox daemon talking to back to the code in
mbox-flash and it can ensure that there is some adherence to the
protocol and that from a blocklevel api point of view the world appears
sane.

This makes these tests simple to run and they have been integrated into
`make check`. The down side is that these tests rely on duplicated
feature incomplete BMC daemon behaviour. Therefore these tests are a
strong indicator of broken behaviour but a very unreliable indicator of
correctness.

Full integration tests with a 'real' BMC daemon are probably beyond the
scope of this repository.

Signed-off-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
[stewart: fix TESTS_LOOPS printf]
Signed-off-by: Stewart Smith &lt;stewart@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>libflash/test/test-blocklevel: fix memory leak on exit</title>
<updated>2017-08-24T02:59:15+00:00</updated>
<author>
<name>Stewart Smith</name>
<email>stewart@linux.vnet.ibm.com</email>
</author>
<published>2017-08-23T06:13:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=d708090c6e52c5b70e0f032068e0465e9a66d67e'/>
<id>urn:sha1:d708090c6e52c5b70e0f032068e0465e9a66d67e</id>
<content type='text'>
==8304==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x7f70eda8f850 in malloc (/lib64/libasan.so.4+0xde850)
    #1 0x408ba0 in main libflash/test/test-blocklevel.c:298
    #2 0x7f70ec8e1509 in __libc_start_main (/lib64/libc.so.6+0x20509)

Signed-off-by: Stewart Smith &lt;stewart@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>libflash/test/test-flash.c: fix memory leak on exit</title>
<updated>2017-08-24T02:59:15+00:00</updated>
<author>
<name>Stewart Smith</name>
<email>stewart@linux.vnet.ibm.com</email>
</author>
<published>2017-08-23T06:04:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=8654891fa90161292201b8f7a37e1c1eeef14a71'/>
<id>urn:sha1:8654891fa90161292201b8f7a37e1c1eeef14a71</id>
<content type='text'>
LeakSanitizer spotted this:

Direct leak of 131072 byte(s) in 1 object(s) allocated from:
    #0 0x7fb99e42b850 in malloc (/lib64/libasan.so.4+0xde850)
    #1 0x408612 in main libflash/test/test-flash.c:380
    #2 0x7fb99d27d509 in __libc_start_main (/lib64/libc.so.6+0x20509)

Signed-off-by: Stewart Smith &lt;stewart@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>external/pflash: tests: Move the test-miscprint to pflash tests</title>
<updated>2017-08-01T03:58:07+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyril.bur@au1.ibm.com</email>
</author>
<published>2017-07-28T06:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=1f2f67aa78fa1e4f9ce7b2e5a4e9fe29760e5b72'/>
<id>urn:sha1:1f2f67aa78fa1e4f9ce7b2e5a4e9fe29760e5b72</id>
<content type='text'>
New code that is very much pflash functionality was added in commit
f2c87a3d2f6 "pflash option to retrieve PNOR partition flags".
Unfortunately at the time there wasn't an easy way to test pflash.

The previous patch adds pflash infrastructure and plumbs it into
`make check` nicely. This commit converts the tests originally added to
libflash tests.

Signed-off-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
Reviewed-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: Stewart Smith &lt;stewart@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>libflash: Adding debugging output</title>
<updated>2017-08-01T03:57:02+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyril.bur@au1.ibm.com</email>
</author>
<published>2017-07-28T06:46:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=4e1e9f12b5f2b18fa0aa71c6558fb799de49625e'/>
<id>urn:sha1:4e1e9f12b5f2b18fa0aa71c6558fb799de49625e</id>
<content type='text'>
Also add usage text to pflash.

Signed-off-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
Reviewed-by: Samuel Mendoza-Jonas &lt;sam@mendozajonas.com&gt;
Signed-off-by: Stewart Smith &lt;stewart@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>pflash option to retrieve PNOR partition flags</title>
<updated>2017-07-19T05:49:39+00:00</updated>
<author>
<name>Michael Tritz</name>
<email>mtritz@us.ibm.com</email>
</author>
<published>2017-07-12T20:31:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=f2c87a3d2f6df0886124636239d9950ef0abcab0'/>
<id>urn:sha1:f2c87a3d2f6df0886124636239d9950ef0abcab0</id>
<content type='text'>
This commit extends pflash with an option to retrieve and print
information for a particular partition, including the content from
"pflash -i" and a verbose list of set miscellaneous flags. -i option
is also updated to print a short list of flags in addition to the
ECC flag, with one character per flag. A test of the new option is
included in libflash/test.

Signed-off-by: Michael Tritz &lt;mtritz@us.ibm.com&gt;
Reviewed-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
[stewart@linux.vnet.ibm.com: various test fixes, enable gcov]
Signed-off-by: Stewart Smith &lt;stewart@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>libflash: Add tests for blocklevel_smart_erase()</title>
<updated>2017-04-07T04:51:34+00:00</updated>
<author>
<name>Cyril Bur</name>
<email>cyril.bur@au1.ibm.com</email>
</author>
<published>2017-04-06T01:38:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=479d17588e73b42291e54999bf9777edca656e8c'/>
<id>urn:sha1:479d17588e73b42291e54999bf9777edca656e8c</id>
<content type='text'>
Signed-off-by: Cyril Bur &lt;cyril.bur@au1.ibm.com&gt;
Signed-off-by: Stewart Smith &lt;stewart@linux.vnet.ibm.com&gt;
</content>
</entry>
</feed>
