<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-skiboot/libflash, 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-16T03:18:50+00:00</updated>
<entry>
<title>libflash/blocklevel: Add missing newline to debug messages</title>
<updated>2018-04-16T03:18:50+00:00</updated>
<author>
<name>Pridhiviraj Paidipeddi</name>
<email>ppaidipe@linux.vnet.ibm.com</email>
</author>
<published>2018-04-12T06:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=ecde3f4f211aaac2ff72e1fd0004c6faac1f7634'/>
<id>urn:sha1:ecde3f4f211aaac2ff72e1fd0004c6faac1f7634</id>
<content type='text'>
Signed-off-by: Pridhiviraj Paidipeddi &lt;ppaidipe@linux.vnet.ibm.com&gt;
Signed-off-by: Stewart Smith &lt;stewart@linux.ibm.com&gt;
</content>
</entry>
<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/ecc: Add functions to deal with unaligned ECC memcpy</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:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=07c4573d06785b06ce36fd8feab28e153f4756f7'/>
<id>urn:sha1:07c4573d06785b06ce36fd8feab28e153f4756f7</id>
<content type='text'>
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>libffs: Fix bad checks for partition overlap</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-15T05:58:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=14cefe11f745a1d929263d4c033610b5bc4b4aa8'/>
<id>urn:sha1:14cefe11f745a1d929263d4c033610b5bc4b4aa8</id>
<content type='text'>
Not all TOCs are written at zero

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>external/ffspart: Use new interface</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-15T05:58:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=9bd1bef2e583bde35912b1a8e013fa2f6d4eb096'/>
<id>urn:sha1:9bd1bef2e583bde35912b1a8e013fa2f6d4eb096</id>
<content type='text'>
This also updated the pflash tests which use ffspart to generate pnors

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/libffs: Allow caller to specifiy header partition</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-15T05:58:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=1622957255a66c026d9502219171b0f9e4996b4c'/>
<id>urn:sha1:1622957255a66c026d9502219171b0f9e4996b4c</id>
<content type='text'>
An FFS TOC is comprised of two parts. A small header which has a magic
and very minimmal information about the TOC which will be common to all
partitions, things like number of patritions, block sizes and the like.
Following this small header are a series of entries. Importantly there
is always an entry which encompases the TOC its self, this is usually
called the 'part' partition.

Currently libffs always assumes that the 'part' partition is at zero.
While there is always a TOC and zero there doesn't actually have to be.
PNORs may have multiple TOCs within them, therefore libffs needs to be
flexible enough to allow callers to specify TOCs not at zero.

The 'part' partition is otherwise a regular partition which may have
flags associated with it. libffs should allow the user to set the flags
for the 'part' partition.

This patch achieves both by allowing the caller to specify the 'part'
partition. The caller can not and libffs will provide a sensible
default.

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/libffs: Refcount ffs entries</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-15T05:58:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=79316cb6aca6fc79585f4f47c18a37f2eb177780'/>
<id>urn:sha1:79316cb6aca6fc79585f4f47c18a37f2eb177780</id>
<content type='text'>
Currently consumers can add an new ffs entry to multiple headers, this
is fine but freeing any of the headers will cause the entry to be freed,
this causes double free problems.

Even if only one header is uses, the consumer of the library still has a
reference to the entry, which they may well reuse at some other point.

libffs will now refcount entries and only free when there are no more
references.

This patch also removes the pointless return value of ffs_hdr_free()

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/libffs: Switch to storing header entries in an array</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-15T05:58:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-skiboot/commit/?id=3d47dbb4fb8dc010c1905a878794731e812a05ac'/>
<id>urn:sha1:3d47dbb4fb8dc010c1905a878794731e812a05ac</id>
<content type='text'>
Since the libffs no longer needs to sort the entries as they get added
it makes little sense to have the complexity of a linked list when an
array will suffice.

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>
</feed>
