comparison doc/Flash-write-protection @ 999:30fad2b3afd2

doc/Flash-write-protection: document flash lock-state retrieval
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 04 Dec 2023 20:40:50 +0000
parents 67513b9446da
children 11391cb6bdc0
comparison
equal deleted inserted replaced
998:fb7442e3d430 999:30fad2b3afd2
25 however, at least one Calypso-based phone out there (Sony Ericsson K2x0 family) 25 however, at least one Calypso-based phone out there (Sony Ericsson K2x0 family)
26 in which the shipping state of the device includes some flash sector locks - 26 in which the shipping state of the device includes some flash sector locks -
27 but these locks are of the "soft" kind, removable by performing a PPB erase 27 but these locks are of the "soft" kind, removable by performing a PPB erase
28 operation which is not further blocked. 28 operation which is not further blocked.
29 29
30 As of fc-host-tools-r21, fc-loadtool provides support for programming and 30 fc-loadtool support for sector write-protection
31 erasing PPBs on select Spansion and Samsung flash chips, primarily aimed at 31 ===============================================
32 unlocking flash regions that have been write-protected by previous parties. 32
33 It is very helpful, however, to understand some theory before using these 33 As of fc-host-tools-r21, fc-loadtool provides the following facilities in
34 commands, which the present document aims to explain. 34 relation to sector write-protection features on AMD-style flash chips:
35
36 * flash lock-state command is available when operating on those flash chips for
37 which we've implemented the necessary table, listing how sectors are grouped
38 for the purpose of write protection, how they are grouped for the purpose of
39 lock status retrieval via Autoselect read mode, and what additional lock
40 status words should be checked. We have implemented the necessary knowledge
41 tables for all chips on which we support PPB manipulation (see below), but
42 also for some chips on which sector lock state can be modified only by high-
43 voltage methods - on the latter chips we can examine the lock state, but not
44 modify it.
45
46 * flash ppb-* commands actively alter sector write protection state by
47 programming and erasing PPBs on those Spansion and Samsung flash chips that
48 allow these PPB alterations by software commands alone (without high-voltage
49 circuits) and for which we have implemented the necessary knowledge tables.
50 The set of flash chips for which we have implemented these active commands is
51 a proper subset of those for which we have implemented flash lock-state
52 retrieval.
53
54 These commands are primarily aimed at unlocking flash regions that have been
55 write-protected by previous parties. It is very helpful, however, to understand
56 some theory before using these commands, which the present document aims to
57 explain.
58
59 How PPBs work
60 =============
35 61
36 Spansion and Samsung flash chips that feature PPBs have one PPB per sector or 62 Spansion and Samsung flash chips that feature PPBs have one PPB per sector or
37 per sector group - some sectors are aggregated into groups (of 4 sectors max) 63 per sector group - some sectors are aggregated into groups (of 4 sectors max)
38 for the purpose of write protection control. All of these PPBs are contained 64 for the purpose of write protection control. All of these PPBs are contained
39 in one special-purpose non-volatile memory element inside the flash chip, and 65 in one special-purpose non-volatile memory element inside the flash chip, and