diff options
Diffstat (limited to 'src/include/usr/i2c/eeprom_const.H')
-rw-r--r-- | src/include/usr/i2c/eeprom_const.H | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/src/include/usr/i2c/eeprom_const.H b/src/include/usr/i2c/eeprom_const.H index e9e157757..275388450 100644 --- a/src/include/usr/i2c/eeprom_const.H +++ b/src/include/usr/i2c/eeprom_const.H @@ -108,7 +108,7 @@ enum EECACHE_VERSION * * uniqueRecord is useful if you want to quickly compare the "unique" * bits of a header entry which includes the target_huid, port, engine, -* devAddr, mux_huid, and mux_select. +* devAddr, mux_huid, and mux_select, and size * */ union eepromRecordHeader @@ -124,7 +124,10 @@ union eepromRecordHeader uint32_t cache_copy_size; // Size of data saved in cache (in KB) uint32_t internal_offset; // offset from start of EECACHE section where cached // data exists - uint8_t cached_copy_valid; // if == 0 , cached data is invalid + uint8_t cached_copy_valid : 1, // This bit is set when we think the contents of the + // cache is valid. + unused : 7; + } PACKED completeRecord; struct uniqueRecord @@ -167,9 +170,9 @@ struct eecacheSectionHeader */ struct eeprom_addr_t { - uint64_t port; - uint64_t engine; - uint64_t devAddr; + uint8_t port; + uint8_t engine; + uint8_t devAddr; int64_t eepromRole; uint64_t offset; eeprom_addr_size_t addrSize; @@ -235,5 +238,30 @@ struct EepromInfo_t } }; +/** + * @brief Define a set of information that describes the + different virtual addresses associated with a given + cache entry along with a byte telling us if there has been + an update detected on the eeprom this boot + */ +struct EeepromEntryMetaData_t +{ + uint64_t header_entry_address; + uint64_t cache_entry_address; + uint8_t mark_target_changed; // This byte is set after we detect a target has changed. + // Either removed, replaced, or added we don't care. But + // we need to use this bits so future targets associated + // with this eeprom can know they need to notify HWAS that + // they have been changed. This bit should get cleared after + // all eeproms have been cached. + + EeepromEntryMetaData_t() + : header_entry_address(0), + cache_entry_address(0), + mark_target_changed(0) + { + } +}; + } #endif
\ No newline at end of file |