Editing Non Volatile Storage

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 3: Line 3:
On PS4, there are 2 Non Volatile Storages, one in the [[Serial Flash]] and one in the [[Syscon]] EEPROM. On PS3, NVS is stored in Serial Flash (NAND or NOR) whilst on PS Vita, NVS is part of Syscon EEPROM. On PS Vita and PS4, there is also the Secure NVS (SNVS), which is a secure area of the Syscon NVS. PS4 SNVS is encrypted with some SAMU keys and can be accessed only after doing a handshake.
On PS4, there are 2 Non Volatile Storages, one in the [[Serial Flash]] and one in the [[Syscon]] EEPROM. On PS3, NVS is stored in Serial Flash (NAND or NOR) whilst on PS Vita, NVS is part of Syscon EEPROM. On PS Vita and PS4, there is also the Secure NVS (SNVS), which is a secure area of the Syscon NVS. PS4 SNVS is encrypted with some SAMU keys and can be accessed only after doing a handshake.


See also [https://www.psdevwiki.com/ps5/Non_Volatile_Storage PS5 Non Volatile Storage].
= Syscon NVS =


= Syscon NVS =
See [[Syscon]].
 
https://fail0verflow.com/blog/2018/ps4-syscon/
 
Syscon NVS is accessible from [[EMC]] but only after doing the handshake to unlock EMC functionalities.


See [[Syscon#Syscon_Non_Volatile_Storage]].
Syscon NVS contains the Secure NVS which is encrypted.


= Serial Flash NVS =
= Serial Flash NVS =
Line 17: Line 21:
== Serial Flash NVS Banks ==
== Serial Flash NVS Banks ==


A total of 7 NVS blocks are separated into 2 banks: main bank and backup bank. The kernel makes use only of the bank 0 block 4 and the bank 1 block 1, even though it is allowed to read/write the other 5 banks. Indeed, <code>/dev/sflash0s0x34</code> access is provided to System applications and to Kernel. [[EMC]] is also able to access Serial Flash NVS through ICC and provides a [[Southbridge#EMC_UART_Debug_Communication|RPC interface through UART]] to read and write to NVS.
A total of 7 NVS blocks are separated into 2 banks: main bank and backup bank. The kernel makes use only of the bank 0 block 4 and the bank 1 block 1, even though it is allowed to read/write the other 5 banks. Indeed, <code>/dev/sflash0s0x34</code> access is provided to System applications and to Kernel. [[EMC]] is also certainly able to access Serial Flash NVS through ICC.


{| class="wikitable sortable"
{| class="wikitable sortable"
Line 23: Line 27:
! Bank Index !! Block Index !! Offset in /dev/sflash0s0x34 !! Size !! Notes
! Bank Index !! Block Index !! Offset in /dev/sflash0s0x34 !! Size !! Notes
|-
|-
| 0 || 0 || 0 || 0x3000 || emc region. From 0x1000 to 0x2000 is a region containing statistics.
| 0 || 0 || 0 || 0x3000 || emc region
|-
|-
| 0 || 1 || 0x3000 || 0x1000 || pd region
| 0 || 1 || 0x3000 || 0x1000 || pd region
Line 46: Line 50:
! Bank Index !! Block Index !! Offset in /dev/iccnvs<block> !! Size !! Notes
! Bank Index !! Block Index !! Offset in /dev/iccnvs<block> !! Size !! Notes
|-
|-
| 0 || 0 || 0 || 0x8 || [[Platform ID]]
| 0 || 0 || 0 || 0x8 || Platform ID (e.g 04 01 01 01 01 01 04 01)
|-
|-
| 0 || 0 || 0x21 || 0x6 || Ethernet [[MAC Address]] #1 (e.g BC 60 A7 28 83 66)
| 0 || 0 || 0x21 || 0x6 || Ethernet MAC Address #1 (e.g BC 60 A7 28 83 66)
|-
|-
| 0 || 0 || 0x27 || 0x6 || Ethernet [[MAC Address]] #2. If there is a second ethernet port (e.g. on DevKit), it is (Ethernet MAC Address #1) + 1, else FFed. (e.g BC 60 A7 28 83 67, FF FF FF FF FF FF)
| 0 || 0 || 0x27 || 0x6 || Ethernet MAC Address #2 (e.g BC 60 A7 28 83 67)
|-
|-
| 0 || 0 || 0x4E || 0x2 || Unknown (e.g 25 16)
| 0 || 0 || 0x4E || 0x2 || Unknown (e.g 25 16)
Line 112: Line 116:
| 0 || 0 || 0x100C || 0x4 || eap wakeup source beep (Possible Values 00 00 00 04) or (anything between 00 00 00 00 and FF 03 00 00)
| 0 || 0 || 0x100C || 0x4 || eap wakeup source beep (Possible Values 00 00 00 04) or (anything between 00 00 00 00 and FF 03 00 00)
|-
|-
| 0 || 0 || 0x1030 || 0x4 || NumberOfBootShutdown type A #1. Updated on each boot or shutdown. (e.g. 1167, 1168)
| 0 || 0 || 0x1030 || 0x4 || NumberOfBootShutdown
|-
|-
| 0 || 0 || 0x1034 || 0x4 || NumberOfBootShutdown type A #2. Updated on each boot or shutdown. (e.g. 1167, 1168)
| 0 || 0 || 0x1034 || 0x4 || NumberOfBootShutdown as well
|-
|-
| 0 || 0 || 0x1038 || 0x8 || dbi_time type A. Updated on each boot or shutdown. (e.g. 10890480, 10896060 -> delta_t = 5580)
| 0 || 0 || 0x1038 || 0x8 || dbi_time
|-
|-
| 0 || 0 || 0x1040 || 0x4 || NumberOfBootShutdown type B #1. Updated on each boot or shutdown. (e.g. 221, 222). Maybe related to HDD or power AC.
| 0 || 0 || 0x1040 || 0x4 || NumberOfBootShutdown as well
|-
|-
| 0 || 0 || 0x1044 || 0x4 || NumberOfBootShutdown type B #2. Updated on each boot or shutdown. (e.g. 221, 222). Maybe related to HDD or power AC.
| 0 || 0 || 0x1044 || 0x4 || NumberOfBootShutdown as well
|-
|-
| 0 || 0 || 0x1048 || 0x8 || dbi_time type B. Updated on each boot or shutdown. (e.g. 10067580, 10117800 -> delta_t = 50220)
| 0 || 0 || 0x1048 || 0x8 || dbi_time as well
|-
|-
| 0 || 0 || 0x1050 || 0x4 || NumberOfBoot type C. Updated on each boot. (e.g. 1099, 1100). Maybe related to suspend mode.
| 0 || 0 || 0x1050 || 0x4 || NumberOfBootShutdown as well
|-
|-
| 0 || 0 || 0x1054 || 0x4 || NumberOfShutdown type C. Updated on each shutdown. (e.g. 1098, 1099). Maybe related to suspend mode.
| 0 || 0 || 0x1054 || 0x4 || NumberOfBootShutdown as well
|-
|-
| 0 || 0 || 0x1058 || 0x8 || dbi_time type C. (e.g. 13855980, 13861620 -> delta_t = 5640)
| 0 || 0 || 0x1058 || 0x8 || dbi_time as well
|-
|-
| 0 || 0 || 0x1220 || 0x18 || Unknown
| 0 || 0 || 0x1220 || 0x18 || Unknown
Line 190: Line 194:
| 0 || 0 || 0x15C0 || 0x18 || Unknown
| 0 || 0 || 0x15C0 || 0x18 || Unknown
|-
|-
| 0 || 0 || 0x2000 || 0x8 || Unknown #1 (e.g. 05 4D 7E 5C 5A A0 00 03 on a DUH-T2000JA, 71 BD 2D 85 53 A4 00 03 on a DUH-T1200AA, D5 71 D4 5F 89 90 00 03 on a CUH-2216B B01Y SAF-003)
| 0 || 0 || 0x2000 || 0x8 || Unknown
|-
| 0 || 0 || 0x2008 || 0x8 || Unknown #2 (e.g. F8 9C DE 5F 57 6E 00 03 on a DUH-T2000JA, D1 03 75 5F 1B 40 00 03 on a DUH-T1200AA, FFed on a CUH-2216B B01Y SAF-003)
|-
| 0 || 0 || 0x2010 || 0x8 || Unknown #3 (e.g. 09 93 BF 5F 89 90 00 03 on a DUH-T2000JA, FFed on a DUH-T1200AA, CUH-2216B B01Y SAF-003)
|-
| 0 || 0 || 0x2018 || 0x8 || Unknown #4 (e.g. 3F A0 92 9F 93 F4 00 03 on a DUH-T2000JA, FFed on a DUH-T1200AA, CUH-2216B B01Y SAF-003)
|-
| 0 || 0 || 0x2020 || 0x8 || Unknown #5 (e.g. 99 16 06 4C 03 88 00 03 on a DUH-T2000JA, FFed on a DUH-T1200AA, CUH-2216B B01Y SAF-003)
|-
| 0 || 0 || 0x2028 || 0x8 || Unknown #6 (e.g. D5 6A A0 E9 B6 98 00 03 on a DUH-T2000JA, FFed on a DUH-T1200AA, CUH-2216B B01Y SAF-003)
|-
| 0 || 0 || 0x2030 || 0x8 || Unknown #7 (e.g. D6 8C 00 31 10 58 00 03 on a DUH-T2000JA, FFed on a DUH-T1200AA, CUH-2216B B01Y SAF-003)
|-
| 0 || 0 || 0x2038 || ... || Unknown... (FFed on a DUH-T2000JA, DUH-T1200AA, CUH-2216B B01Y SAF-003)
|}
|}


Line 359: Line 349:
| 1 || 0 || 0x0 || 0x2000 || Equivalent (active/inactive bank) of NVS area 0x5000-0x6FFF (part of OSAREA). First 0x1000 bytes are usually a 1:1 copy but the rest depends on Registry Settings.
| 1 || 0 || 0x0 || 0x2000 || Equivalent (active/inactive bank) of NVS area 0x5000-0x6FFF (part of OSAREA). First 0x1000 bytes are usually a 1:1 copy but the rest depends on Registry Settings.
|-
|-
| 1 || 0 || 0x2000 || 0x1000 || Equivalent (active/inactive bank) of NVS area 0x1000-0x1FFF (part of EMCAREA). Differences (non-exhaustive):
| 1 || 0 || 0x2000 || 0x1000 || Equivalent (active/inactive bank) of NVS area 0x1000-0x1FFF (part of EMCAREA).
* NumberOfBootShutdown type B #1 and #2, type C #1 and #2 are decremented by one (values before last update)
* dbi_time type B and type C are set to their values of before last update
|}
|}


Line 437: Line 425:
| 0 || 4 || 0x1600 || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_SPECIFIC_idu_mode (0x01 enabled, 0x00 or 0xFF disabled)
| 0 || 4 || 0x1600 || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_SPECIFIC_idu_mode (0x01 enabled, 0x00 or 0xFF disabled)
|-
|-
| 0 || 4 || 0x1601 || 0X1 || SCE_REGMGR_ENT_KEY_SYSTEM_update_mode (0xFF or 0x00 disabled, 0x10, 0x20, 0x30, 0x31, 0x32, 0x50 enabled)
| 0 || 4 || 0x1601 || 0X1 || SCE_REGMGR_ENT_KEY_SYSTEM_update_mode (0xFF or 0x00 disabled) (0x10, 0x20, 0x30, 0x31, 0x32, 0x50 enabled)
|-
|-
| 0 || 4 || 0x1602 || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_SPECIFIC_show_mode (0x01 enabled, 0x00 or 0xFF disabled)
| 0 || 4 || 0x1602 || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_SPECIFIC_show_mode (0x01 Enabled, 0x00 Disabled) (TestKit only)
|-
|-
| 0 || 4 || 0x1603 || 0x1 || SCE_REGMGR_ENT_KEY_REGISTRY_recover (ex: 0 on a DUH-D1000AA, DUH-D1000JA, DUH-T1000AA, DUH-T2000JA, 1 on a CUH-10xx, DUH-T1200AA)
| 0 || 4 || 0x1603 || 0x1 || SCE_REGMGR_ENT_KEY_REGISTRY_recover
|-
|-
| 0 || 4 || 0x1604 || 0x4 || SCE_REGMGR_ENT_KEY_SYSTEM_soft_version. This is the minimal System Software Version that should match [[SMI]]. (00 00 50 01 on a DUH-T1000AA, 00 00 51 01 on a DUH-D1000AA, 00 00 61 01 on a DUH-D1000AA, 00 00 62 01 on a DUH-D1000JA and CUH-10xx, FFed on some DUH-D1000AA and later models)
| 0 || 4 || 0x1604 || 0x4 || SCE_REGMGR_ENT_KEY_SYSTEM_soft_version (deprecated) (DevKit only?)
|-
| 0 || 4 || 0x1608 || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_unk (ex: 0 on a DUH-T1200AA, 0xFF on a DUH-T1000AA, DUH-T2000JA)
|-
|-
| 0 || 4 || 0x1609 || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_SPECIFIC_arcade_mode
| 0 || 4 || 0x1609 || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_SPECIFIC_arcade_mode
|-
| 0 || 4 || 0x160A || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_unk (ex: 0xFF)
|-
| 0 || 4 || 0x160B || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_unk (ex: 0xFF)
|-
| 0 || 4 || 0x160C || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_unk (ex: 0 on a DUH-T2000JA, 0xFF on a DUH-T1000AA, DUH-T1200AA, DUH-D1000AA, DUH-D1000JA, CUH-10xx)
|-
| 0 || 4 || 0x160D || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_unk (ex: 0 on a DUH-T2000JA, 0xFF on a DUH-T1000AA, DUH-T1200AA, DUH-D1000AA, DUH-D1000JA, CUH-10xx)
|-
| 0 || 4 || 0x160E || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_unk (ex: 0 on a DUH-T2000JA, 0xFF on a DUH-T1000AA, DUH-T1200AA, DUH-D1000AA, DUH-D1000JA, CUH-10xx)
|-
| 0 || 4 || 0x160F || 0x1 || SCE_REGMGR_ENT_KEY_SYSTEM_unk (ex: 0 on a DUH-T2000JA, 0xFF on a DUH-T1000AA, DUH-T1200AA, DUH-D1000AA, DUH-D1000JA, CUH-10xx)
|}
|}
Please note that all contributions to PS4 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS4 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)