[flashrom] Re: Asus Z87-A

2022-10-24 Thread Sami via flashrom

Thanks,

that's what I actually thought when reading those debug printouts, but 
ending closure was just soo scary.

Yes, it did nothing and computer works as before.

// Sami

On 2022-10-15 23:16, Angel Pons wrote:

Hi Sami,

On Sat, Oct 15, 2022 at 7:44 PM Sami via flashrom 
 wrote:


Is there anything I can do anymore?


See in-line messages.


// Sami

flashrom --programmer internal --ifd -i bios --noverify-all -w 
Z87A.bin

flashrom v1.2 on Linux 5.10.0-18-amd64 (x86_64)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found chipset "Intel Z87".
Enabling flash write... Warning: BIOS region SMM protection is 
enabled!

Warning: Setting Bios Control at 0xdc from 0x2a to 0x09 failed.
New value is 0x2a.


This means your mainboard's BIOS/UEFI firmware restricts write access
to the flash chip. Enabling writes failed.


SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x-0x0fff) is read-only.
FREG2: Management Engine region (0x1000-0x0017) is locked.
Not all flash regions are freely accessible by flashrom. This is most
likely
due to an active ME. Please see https://flashrom.org/ME for details.
At least some flash regions are read protected. You have to use a 
flash
layout and include only accessible regions. For write operations, 
you'll

additionally need the --noverify-all switch. See manpage for more
details.


This means some part of the flash chip (the ME region) cannot be read.


OK.
Found Winbond flash chip "W25Q64.V" (8192 kB, SPI) mapped at physical
address 0xff80.
Reading ich descriptor... done.
Using region: "bios".
Reading old flash chip contents... done.
Erasing and writing flash chip... Transaction error!
spi_write_cmd failed during command execution at address 0x18
Reading current flash chip contents... done. Looking for another erase
function.
spi_write_cmd failed during command execution at address 0x18
Reading current flash chip contents... done. Looking for another erase
function.
spi_write_cmd failed during command execution at address 0x18
Reading current flash chip contents... done. Looking for another erase
function.
Transaction error!
Can't read! Aborting.


This is because the ME region is not readable. Why flashrom still
tries to read it anyway is rather puzzling.


FAILED!
Uh oh. Erase/write failed.
Your flash chip is in an unknown state.


This is because flashrom could not read the ME region, and could not
check whether the flash chip contents have changed. However, we know
that SMM BIOS write protection is enabled, which prevents flashrom
from writing to the flash chip. So, flashrom couldn't have modified
the flash chip contents.


Get help on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org with the subject "FAILED: name>"!

---
DO NOT REBOOT OR POWEROFF!


Based on the reasonings given earlier, it should be safe to reboot
because flashrom couldn't have possibly changed the flash chip
contents.


___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


Best regards,
Angel

___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org


[flashrom] Re: Asus Z87-A

2022-10-15 Thread Angel Pons
Hi Sami,

On Sat, Oct 15, 2022 at 7:44 PM Sami via flashrom  wrote:
>
> Is there anything I can do anymore?

See in-line messages.

> // Sami
>
> flashrom --programmer internal --ifd -i bios --noverify-all -w Z87A.bin
> flashrom v1.2 on Linux 5.10.0-18-amd64 (x86_64)
> flashrom is free software, get the source code at https://flashrom.org
>
> Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
> Found chipset "Intel Z87".
> Enabling flash write... Warning: BIOS region SMM protection is enabled!
> Warning: Setting Bios Control at 0xdc from 0x2a to 0x09 failed.
> New value is 0x2a.

This means your mainboard's BIOS/UEFI firmware restricts write access
to the flash chip. Enabling writes failed.

> SPI Configuration is locked down.
> FREG0: Flash Descriptor region (0x-0x0fff) is read-only.
> FREG2: Management Engine region (0x1000-0x0017) is locked.
> Not all flash regions are freely accessible by flashrom. This is most
> likely
> due to an active ME. Please see https://flashrom.org/ME for details.
> At least some flash regions are read protected. You have to use a flash
> layout and include only accessible regions. For write operations, you'll
> additionally need the --noverify-all switch. See manpage for more
> details.

This means some part of the flash chip (the ME region) cannot be read.

> OK.
> Found Winbond flash chip "W25Q64.V" (8192 kB, SPI) mapped at physical
> address 0xff80.
> Reading ich descriptor... done.
> Using region: "bios".
> Reading old flash chip contents... done.
> Erasing and writing flash chip... Transaction error!
> spi_write_cmd failed during command execution at address 0x18
> Reading current flash chip contents... done. Looking for another erase
> function.
> spi_write_cmd failed during command execution at address 0x18
> Reading current flash chip contents... done. Looking for another erase
> function.
> spi_write_cmd failed during command execution at address 0x18
> Reading current flash chip contents... done. Looking for another erase
> function.
> Transaction error!
> Can't read! Aborting.

This is because the ME region is not readable. Why flashrom still
tries to read it anyway is rather puzzling.

> FAILED!
> Uh oh. Erase/write failed.
> Your flash chip is in an unknown state.

This is because flashrom could not read the ME region, and could not
check whether the flash chip contents have changed. However, we know
that SMM BIOS write protection is enabled, which prevents flashrom
from writing to the flash chip. So, flashrom couldn't have modified
the flash chip contents.

> Get help on IRC at chat.freenode.net (channel #flashrom) or
> mail flashrom@flashrom.org with the subject "FAILED: "!
> ---
> DO NOT REBOOT OR POWEROFF!

Based on the reasonings given earlier, it should be safe to reboot
because flashrom couldn't have possibly changed the flash chip
contents.

> ___
> flashrom mailing list -- flashrom@flashrom.org
> To unsubscribe send an email to flashrom-le...@flashrom.org

Best regards,
Angel
___
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org