diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-07-11 23:01:39 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-07-19 22:58:34 +0000 |
commit | d1d7930d5d86e7a537fa46e1137bb4131ee52c07 (patch) | |
tree | fe4721011e034e2b264fa1255918883390411e6f /pnor_partition_table.hpp | |
parent | abd52a78941e91bb603772a252c3a98477fec44d (diff) | |
download | phosphor-mboxd-d1d7930d5d86e7a537fa46e1137bb4131ee52c07.tar.gz phosphor-mboxd-d1d7930d5d86e7a537fa46e1137bb4131ee52c07.zip |
vpnor: make PNOR block size configurable
The vpnor code would assume a PNOR FFS block size of 4K. Make it
possible to supply this value, since it needn't always be 4K.
Change-Id: I21463b05f1047e93705ba82d46f746056568dcc5
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'pnor_partition_table.hpp')
-rw-r--r-- | pnor_partition_table.hpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/pnor_partition_table.hpp b/pnor_partition_table.hpp index b6c50f4..d933b67 100644 --- a/pnor_partition_table.hpp +++ b/pnor_partition_table.hpp @@ -75,10 +75,23 @@ class Table * that houses the PNOR partition files. * * @param[in] directory - path of the directory housing PNOR partitions + * @param[in] blockSize - PNOR block size, in bytes. See + * open-power/hostboot/blob/master/src/usr/pnor/ffs.h for + * the PNOR FFS structure. + * @param[in] pnorSize - PNOR size, in bytes */ - Table(fs::path&& directory); + Table(fs::path&& directory, + size_t blockSize, + size_t pnorSize); + + /** @brief Constructor - creates partition table + * + * @param[in] blockSize - PNOR block size, in bytes + * @param[in] pnorSize - PNOR size, in bytes + */ + Table(size_t blockSize, + size_t pnorSize); - Table(); Table(const Table&) = delete; Table& operator=(const Table&) = delete; Table(Table&&) = delete; @@ -207,6 +220,12 @@ class Table /** @brief Number of partitions */ size_t numParts; + + /** @brief PNOR block size, in bytes */ + size_t blockSize; + + /** @brief PNOR size, in bytes */ + size_t pnorSize; }; } // namespace partition |