Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asus_kgpe-d16: hardware write protection not works #67

Closed
sulewskiprzemyslaw opened this issue Mar 23, 2022 · 3 comments
Closed

asus_kgpe-d16: hardware write protection not works #67

sulewskiprzemyslaw opened this issue Mar 23, 2022 · 3 comments

Comments

@sulewskiprzemyslaw
Copy link

sulewskiprzemyslaw commented Mar 23, 2022

Dasharo version
asus_kgpe-d16_v0.3.0

Dasharo variant
ASUS KGPE-D16

Affected component(s) or functionality
Write Protection Mechanism

Brief summary
Write Protection Mechanism does not work on the platform ASUS KGPE-D16 with 16MB flash chip.

How reproducible
Always

How to reproduce

Steps to reproduce the behavior:

  1. Build flashrom in accordance with the following documentation: https://docs.dasharo.com/variants/asus_kgpe_d16/spi-wp/
  2. Try to use any of described in the above-mentioned documentation commands to set or read WP.

Expected behavior
Hardware Write protection works on ASUS KGPE-D16 with 16MB flash chip.

Actual behavior
Hardware Write protection does not work on ASUS KGPE-D16 with 16MB flash chip.

Screenshots

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
coreboot table found at 0xbfd56000.
Found chipset "AMD SB7x0/SB8x0/SB9x0".
Enabling flash write... OK.
Error accessing GD25Q256D, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip GD25Q256D at 0x00000000fe000000.
Error accessing IS25LP256, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip IS25LP256 at 0x00000000fe000000.
Error accessing IS25WP256, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip IS25WP256 at 0x00000000fe000000.
Error accessing MX25L25635F/MX25L25645G, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip MX25L25635F/MX25L25645G at 0x00000000fe000000.
Error accessing MX25U25635F, 0x2000000 bytes at 0x00000000fe000000
    [ Message content over the limit has been removed. ]
/dev/mem mmap failed: Operation not permitted
Could not map flash chip W25Q256JV_M at 0x00000000fe000000.
Error accessing W25Q256.W, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip W25Q256.W at 0x00000000fe000000.
Error accessing W25Q256JW_DTR, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip W25Q256JW_DTR at 0x00000000fe000000.
Error accessing W25Q512JV, 0x4000000 bytes at 0x00000000fc000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip W25Q512JV at 0x00000000fc000000.
Error accessing XM25QH256C, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip XM25QH256C at 0x00000000fe000000.
Error accessing XM25QU256C, 0x2000000 bytes at 0x00000000fe000000
/dev/mem mmap failed: Operation not permitted
Could not map flash chip XM25QU256C at 0x00000000fe000000.
Error: write protect support is not implemented for this flash chip.

Additional context

Solutions you've tried

  1. Rebuild the flashrom tool.
@SergiiDmytruk
Copy link
Member

Error: write protect support is not implemented for this flash chip. means that the chip was identified, but code lacks implementation of WP for it.

The code used for testing was still in review and has changed before landing in master. In particular WP metadata wasn't specified for W25Q128.V..M at the time, but it there now. Testing with current master should work for this variation of W25Q128FV.

@PrzemyslawBanasiak13
Copy link

I've built flashrom from this branch, and write protection works properly

@Pokisiekk
Copy link

Work also with flashrom built from this branch

coreboot-org-bot pushed a commit to flashrom/flashrom that referenced this issue Oct 23, 2022
This is based on information from:
 * commit a850fd0
   - GD25LQ128C/GD25LQ128D/GD25LQ128E
   - GD25LQ64(B)
   - GD25Q127C/GD25Q128C
   - GD25Q256D/GD25Q256E
   - GD25Q64(B)
 * commit a8204dd
   - GD25Q32(B)
 * commit 7b4c4f3
   - W25Q64BV/W25Q64CV/W25Q64FV
 * Dasharo/dasharo-issues#67
   - W25Q128.V..M
 * Dasharo#8
   - W25Q64.W

Change-Id: I090188bad568885f78778e7fc7d8dbe20fb2445f
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: Kamil Pokornicki <kamil.pokornicki@3mdeb.com>
Tested-by: Przemyslaw Banasiak <przemyslaw.banasiak@3mdeb.com>
Tested-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68180
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants