On Fri, Feb 6, 2009 at 10:19 AM, Myles Watson <[email protected]> wrote: > On Thu, Feb 5, 2009 at 8:18 PM, Myles Watson <[email protected]> wrote: >> >> >>> -----Original Message----- >>> From: Carl-Daniel Hailfinger [mailto:[email protected]] >>> Sent: Thursday, February 05, 2009 4:19 PM >>> To: Myles Watson >>> Cc: Coreboot >>> Subject: Re: [coreboot] flashrom: Can't mmap memory >>> >>> On 05.02.2009 21:26, Myles Watson wrote: >>> > When I boot using the factory BIOS on my s2895 flashrom works. When I >>> > boot with Coreboot, I get the Error: >>> > >>> > Can't mmap memory using /dev/mem: Operation not permitted >>> > >>> > It shouldn't be kernel parameters since I'm using the same grub2 entry >>> > to boot either way. >>> > >>> > This sounds a little too familiar, but I can't find a thread where >>> > this isn't linked to a newer, more restrictive kernel. >>> > >>> >>> Could be the memory map passed by cbtable or e820. A diff between dmesg >>> for each configuration would probably reveal quite a bit of info. >> >> Good idea. Tomorrow I'll look at that. The memory maps are quite >> different, but in both cases the ROM is marked uncacheable. > > It turns out that flashrom is getting confused and trying to map > 0xfff00000-0x10100000. The factory BIOS doesn't boost memory up > there, so it was fine. If I specify the chip with -c SST49LF080A it > succeeds. I don't know why the size is different depending on whether > you specify the chip or not. > > An added printf shows that flash->total_size = 0x800 when it fails, > and 0x400 when it succeeds.
I should have used flashrom -V earlier. Here it is: Probing for SST SST49LF040, 512 KB: probe_jedec: id1 0xbf, id2 0x5b Probing for SST SST49LF040B, 512 KB: probe_jedec: id1 0xbf, id2 0x5b Probing for SST SST49LF080A, 1024 KB: probe_jedec: id1 0xbf, id2 0x5b Found chip "SST SST49LF080A" (1024 KB) at physical address 0xfff00000. Probing for SST SST49LF160C, 2048 KB: Error accessing flash chip, 0x200000 bytes at 0xfff00000 /dev/mem mmap failed: Operation not permitted I don't know enough about flashrom to know if it should have stopped, or if it should have figured out a better base address for the SST49LF160C. Hopefully that's enough information to point in the right direction. Thanks, Myles -- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

