Skip to content

Instantly share code, notes, and snippets.

@hanetzer
Created March 10, 2023 23:19
Show Gist options
  • Save hanetzer/1661cb62ca9bcb6c68cd06e359a1bf61 to your computer and use it in GitHub Desktop.
Save hanetzer/1661cb62ca9bcb6c68cd06e359a1bf61 to your computer and use it in GitHub Desktop.
change-72584
(gdb) run
Starting program: /home/hanetzer/Projects/flashrom/flashrom -p internal -r test.rom
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".
flashrom-stable v1.2.1-525-g2323aa16 on Linux 6.2.1-gentoo (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 "AMD Raven Ridge/Matisse/Starship".
Enabling flash write... OK.
Found Winbond flash chip "W25Q256JW" (32768 kB, SPI) mapped at physical address 0x00000000fe000000.
Reading flash...
Program received signal SIGSEGV, Segmentation fault.
0x00005555555b0817 in mmio_readn_aligned (addr=0x7ffff7c01000, dst=0x7ffff5f8a010 "", len=13066240, align=8) at hwaccess_physmap.c:458
458 *(uint64_t *)dst = *(volatile const uint64_t *)src;
(gdb) bt
#0 0x00005555555b0817 in mmio_readn_aligned (addr=0x7ffff7c01000, dst=0x7ffff5f8a010 "", len=13066240, align=8) at hwaccess_physmap.c:458
#1 0x00005555555a8779 in spi100_read (flash=0x7fffffffd420, buf=0x7ffff5c00010 "", start=16777216, len=16777216) at amd_spi100.c:145
#2 0x0000555555595ef2 in spi_chip_read (flash=0x7fffffffd420, buf=0x7ffff5c00010 "", start=16777216, len=16777216) at spi.c:108
#3 0x00005555555b5328 in read_by_layout (flashrom_flashctx=0x7fffffffd420,
buffer=0x7ffff4c00010 "\357\030\377ARl\314\"\"\261-82\345\335\302\"\033\234N1o\327/h\006\233\257\004\032\r\233\235.\n\351\232j\350\345\373?a~\374`JD\vm\343LI`8X\332B\225\330\336\307f\251\200")
at flashrom.c:925
#4 0x00005555555b6bf2 in flashrom_image_read (flashrom_flashctx=0x7fffffffd420, buffer=0x7ffff4c00010, buffer_len=33554432) at flashrom.c:1630
#5 0x0000555555591cc5 in do_read (flash=0x7fffffffd420, filename=0x5555556756b0 "test.rom") at cli_classic.c:131
#6 0x00005555555936e4 in main (argc=5, argv=0x7fffffffd9c8) at cli_classic.c:771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment