Page MenuHomeFreeBSD

sfxge: select whether to read current or backup partition in Medford A/B scheme
ClosedPublic

Authored by arybchik on Jan 18 2016, 6:52 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 12:59 AM
Unknown Object (File)
Feb 22 2024, 12:03 PM
Unknown Object (File)
Dec 23 2023, 12:01 PM
Unknown Object (File)
Sep 30 2023, 1:11 PM
Unknown Object (File)
Sep 13 2023, 4:37 PM
Unknown Object (File)
Sep 9 2023, 5:49 PM
Unknown Object (File)
Aug 8 2023, 10:44 AM
Unknown Object (File)
Jul 5 2023, 9:20 AM
Subscribers

Details

Summary

The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes. This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by: Mark Spender <mspender at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days

Test Plan

Build tested.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

arybchik retitled this revision from to sfxge: select whether to read current or backup partition in Medford A/B scheme.
arybchik updated this object.
arybchik edited the test plan for this revision. (Show Details)
arybchik added reviewers: gnn, philip, np, bz.
This revision was automatically updated to reflect the committed changes.