hughsie / fwupd-spi-dumps

0 stars 0 forks source link

Lenovo ThinkBook 14s Yoga ITL #11

Open a-andre opened 7 months ago

a-andre commented 7 months ago
checking /dev/mtd1...
reading from /dev/mtd1...
descriptor_map0=0x40103
descriptor_map1=0x46100208
descriptor_map2=0x1101A0
num_regions=0xA
flash_region_base_addr=0x40
flash_descriptor_reg0=0x0
flash_descriptor_reg1=0x17FF0800
flash_descriptor_reg2=0x7FF0001
flash_descriptor_reg3=0x7FFF
flash_descriptor_reg4=0x7FFF
flash_descriptor_reg5=0x7FFF
flash_descriptor_reg6=0x7FFF
flash_descriptor_reg7=0x7FFF
flash_descriptor_reg8=0x7FFF
flash_descriptor_reg9=0x7FFF
image_size=0x17fffff
reading... IfdPartition(region=desc, offset=0x0, size=0xfff)
reading... IfdPartition(region=bios, offset=0x800000, size=0xffffff)
reading... IfdPartition(region=me, offset=0x1000, size=0x7fefff)
writing -lenovo_mt_20we_bu_idea_fm_thinkbook_14s_yoga_itl.bin...
done!

lenovo-thinkbook_14s_yoga_itl-lenovo_mt_20we_bu_idea_fm_thinkbook_14s_yoga_itl.zip

hughsie commented 7 months ago

This one is super interesting -- it's triggering an error in the parser. I'll look more at this tomorrow -- thanks!

hughsie commented 7 months ago

Okay, weird -- the file is smaller than I expected:

du -h ../../fwupd-test-roms/lenovo-thinkbook_14s_yoga_itl-lenovo_mt_20we_bu_idea_fm_thinkbook_14s_yoga_itl.bin
8.1M

i.e. it's truncated at 0x800000 -- and included me, desc and not bios -- but we should have created a blob with image_size=0x17fffff -- i.e. there seems to be something funky with the dump script.

hughsie commented 7 months ago

@a-andre I've modified the script to be more paranoid -- can you try again (and re-paste the script console output) with https://raw.githubusercontent.com/fwupd/fwupd/wip/hughsie/ifd-helper/contrib/dump-mtd-ifd.py please. Thanks!

a-andre commented 7 months ago
checking /dev/mtd1...
reading from /dev/mtd1...
descriptor_map0=0x40103
descriptor_map1=0x46100208
descriptor_map2=0x1101A0
num_regions=0xA
flash_region_base_addr=0x40
flash_descriptor_reg0=0x0
flash_descriptor_reg1=0x17FF0800
flash_descriptor_reg2=0x7FF0001
flash_descriptor_reg3=0x7FFF
flash_descriptor_reg4=0x7FFF
flash_descriptor_reg5=0x7FFF
flash_descriptor_reg6=0x7FFF
flash_descriptor_reg7=0x7FFF
flash_descriptor_reg8=0x7FFF
flash_descriptor_reg9=0x7FFF
image_size=0x17fffff
reading... IfdPartition(region=0x0 (desc), offset=0x0, size=0xfff)
reading... IfdPartition(region=0x1 (bios), offset=0x800000, size=0xffffff)
tried to read 0xffffff and instead got 0x0
reading... IfdPartition(region=0x2 (me), offset=0x1000, size=0x7fefff)
writing lenovo-thinkbook_14s_yoga_itl-20we-lenovo_mt_20we_bu_idea_fm_thinkbook_14s_yoga_itl.bin...
done!

lenovo-thinkbook_14s_yoga_itl-20we-lenovo_mt_20we_bu_idea_fm_thinkbook_14s_yoga_itl.zip

I forgot to mention, this was created using Arch Linux.

hughsie commented 7 months ago

tried to read 0xffffff and instead got 0x0

Do you have any new lines in dmesg about intel-spi please?

a-andre commented 7 months ago

tried to read 0xffffff and instead got 0x0

Do you have any new lines in dmesg about intel-spi please?

No. There is no new line in dmesg after running the script.

hughsie commented 7 months ago

I've asked Mauro (the intel-spi MTD expert) to look at this as I'm a bit stumped.

hughsie commented 7 months ago

@a-andre can you get us the output of mtdinfo -a please

a-andre commented 7 months ago
Count of MTD devices:           3
Present MTD devices:            mtd0, mtd1, mtd2
Sysfs interface supported:      yes

mtd0
Name:                           0000:00:1f.5
Type:                           nor
Eraseblock size:                4096 bytes, 4.0 KiB
Amount of eraseblocks:          2048 (8388608 bytes, 8.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:0
Bad blocks are allowed:         false
Device is writable:             true

mtd1
Name:                           BIOS
Type:                           nor
Eraseblock size:                4096 bytes, 4.0 KiB
Amount of eraseblocks:          2048 (8388608 bytes, 8.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:2
Bad blocks are allowed:         false
Device is writable:             false

mtd2
Name:                           0000:00:1f.5
Type:                           nor
Eraseblock size:                4096 bytes, 4.0 KiB
Amount of eraseblocks:          4096 (16777216 bytes, 16.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size:                  1 byte
Character device major/minor:   90:4
Bad blocks are allowed:         false
Device is writable:             true
hughsie commented 7 months ago

@lemonpy -- expected?!