DMI write error - ERR_DMI_READ_ONLY

Discussion in 'BIOS Mods' started by Gelip, Apr 27, 2024.

  1. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    319
    139
    10
    Using the AMIDEEFI64 Utility v5.22.0066 under UEFI Shell, I successfully changed the data in DMI in part System Information from Default string:
    • Manufacturer
    • Product Name
    • Version
    • Serial Number
    • SKU
    • Family
    & in part Base Board Information only one entry:
    • Manufacturer
    I want to set back a Default string in a Base Board > Manufacturer entry but I can't:
    Code:
    amidmi /bm "Default string"
    +---------------------------------------------------------------------------+
    |                       AMIDEEFI64 Utility v5.22.0066                       |
    |      Copyright (C)2018 American Megatrends Inc. All Rights Reserved.      |
    +---------------------------------------------------------------------------+
    
    Initializing the SMBIOS interface.  Please wait a moment......
    
    ERR_DMI_READ_ONLY
    e2 - Error: DMI Data write failed.
    I tried various tools DMI Edit for Windows, DOS and UEFI Shell but not helps. I can only change the values in the DMI part System Information.
    Why can't I change the value of the Base Board > Manufacturer again ???

    UEFI BIOS AMI Aptio V 5.13

    How unlock DMI part Base Board ?
     
  2. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    319
    139
    10
    Bypassing the problem. Fortunately, I had a copy of the BIOS aimb.bin maked before I edited DMI - I use CH341A by the SPI port but BIOS can also be backup with Fpt.efi (from CSME Tools for compatible platform - my is v12):
    Code:
    fpt -d dump.bin
    • I flashing aimb.bin using the Fpt.efi
      Code:
      fpt -f aimb.bin
    • using AMIDEEFI64 Utility v5.22.0066 I edited DMI data in System table with this options: /sm /sp /sv /ss /sk /sf
     
  3. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    319
    139
    10
    I found a complete solution to the problem on my PC Gen 8 :cool:
    • In the hex editor, I compared the bios dump before the DMI (aimb.bin) and after the DMI edition (dmi_locked.bin) and I found it:
      WriteOnceStatus.png
    • under UEFI Shell 2 I checked it:
      Code:
      FS1:\> dmpstore WriteOnceStatus -guid 4b3082a3-80c6-4d7e-9cd0-583917265df1
      Variable NV+RT+BS '4B3082A3-80C6-4D7E-9CD0-583917265DF1:WriteOnceStatus' DataSize = 0x40
        00000000: 01 04 01 00 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
        00000010: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
        00000020: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
        00000030: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      
    • I checked the same on another Gen 4 PC and it is different - all data 7F:
      Code:
      FS1:\> dmpstore WriteOnceStatus -guid 4b3082a3-80c6-4d7e-9cd0-583917265df1
      Variable NV+RT+BS '4B3082A3-80C6-4D7E-9CD0-583917265DF1:WriteOnceStatus' DataSize = 0x40
        00000000: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
        00000010: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
        00000020: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
        00000030: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      
    • I saved the value to the unlock.bin file:
      Code:
      FS1:\> dmpstore WriteOnceStatus -guid 4b3082a3-80c6-4d7e-9cd0-583917265df1 -s unlock.bin
      
    • I copied on a pendrive and load it in my PC Gen 8:
      Code:
      FS1:\> dmpstore WriteOnceStatus -guid 4b3082a3-80c6-4d7e-9cd0-583917265df1 -l unlock.bin
      Load and set variables from file: unlock.bin.
      Variable NV+RT+BS '4B3082A3-80C6-4D7E-9CD0-583917265DF1:WriteOnceStatus' DataSize = 0x40
      
    • Now you can easily change DMI SM or BM with AMIDEEFI64 Utility ;)
    Code:
    FS1:\> dir
    Directory of: FS1:\
    04/21/2024  09:51 <DIR>         1,024  EFI
    08/14/2018  08:08       r     577,472  SceEfi64.efi
    08/02/2017  16:01              12,864  AmiSetupWriter.efi
    04/27/2024  14:42                 938  e2.log
    04/27/2024  14:59             617,267  new.txt
    05/22/2018  10:24             433,264  522_2018.efi
    02/09/2021  14:06             434,288  521_2018.efi
    02/24/2023  14:10             366,256  527_2023.efi
    04/28/2024  08:00           3,454,304  Fpt.efi
    04/28/2024  07:10                 143  one.txt
    05/02/2024  08:45                  44  error.log
    05/02/2024  09:21          33,554,432  dmi_ok.bin
    05/03/2024  10:49                 128  status_lock.bin
    05/03/2024  11:09                 128  unlock.bin
             15 File(s)  39,507,632 bytes
              1 Dir(s)
    
    FS1:\> 522_2018 /sm
    +---------------------------------------------------------------------------+
    |                       AMIDEEFI64 Utility v5.22.0066                       |
    |      Copyright (C)2018 American Megatrends Inc. All Rights Reserved.      |
    +---------------------------------------------------------------------------+
    
    Initializing the SMBIOS interface.  Please wait a moment......
              Name              R/W  Status  Information
    --------------------------  ---  ------  ----------------------------------
    (/SM)System manufacture      R    Done   "BlaBlaBla"
    
    FS1:\> 522_2018 /sm "Advantech"
    +---------------------------------------------------------------------------+
    |                       AMIDEEFI64 Utility v5.22.0066                       |
    |      Copyright (C)2018 American Megatrends Inc. All Rights Reserved.      |
    +---------------------------------------------------------------------------+
    
    Initializing the SMBIOS interface.  Please wait a moment......
    
    ERR_DMI_READ_ONLY
    e2 - Error: DMI Data write failed.
    
    FS1:\> dmpstore WriteOnceStatus -guid 4b3082a3-80c6-4d7e-9cd0-583917265df1
    Variable NV+RT+BS '4B3082A3-80C6-4D7E-9CD0-583917265DF1:WriteOnceStatus' DataSize = 0x40
      00000000: 01 04 01 00 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      00000010: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      00000020: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      00000030: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
    
    FS1:\> dmpstore WriteOnceStatus -guid 4b3082a3-80c6-4d7e-9cd0-583917265df1 -l unlock.bin
    Load and set variables from file: unlock.bin.
    Variable NV+RT+BS '4B3082A3-80C6-4D7E-9CD0-583917265DF1:WriteOnceStatus' DataSize = 0x40
    
    FS1:\> dmpstore WriteOnceStatus -guid 4b3082a3-80c6-4d7e-9cd0-583917265df1
    Variable NV+RT+BS '4B3082A3-80C6-4D7E-9CD0-583917265DF1:WriteOnceStatus' DataSize = 0x40
      00000000: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      00000010: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      00000020: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
      00000030: 7F 7F 7F 7F 7F 7F 7F 7F-7F 7F 7F 7F 7F 7F 7F 7F  *................*
    
    FS1:\> 522_2018 /sm "Advantech"
    +---------------------------------------------------------------------------+
    |                       AMIDEEFI64 Utility v5.22.0066                       |
    |      Copyright (C)2018 American Megatrends Inc. All Rights Reserved.      |
    +---------------------------------------------------------------------------+
    
    Initializing the SMBIOS interface.  Please wait a moment......
              Name              R/W  Status  Information
    --------------------------  ---  ------  ----------------------------------
    (/SM)System manufacture      W    Done   "Advantech"
    
    FS1:\> 522_2018 /sm
    +---------------------------------------------------------------------------+
    |                       AMIDEEFI64 Utility v5.22.0066                       |
    |      Copyright (C)2018 American Megatrends Inc. All Rights Reserved.      |
    +---------------------------------------------------------------------------+
    
    Initializing the SMBIOS interface.  Please wait a moment......
              Name              R/W  Status  Information
    --------------------------  ---  ------  ----------------------------------
    (/SM)System manufacture      R    Done   "Advantech"
    
    FS1:\>
    
    
     
  4. Gelip

    Gelip MDL Senior Member

    Feb 28, 2011
    319
    139
    10
    Of course, the same can be done using RU.EFI
    ru.efi.png