#121: flashrom runtime error ---------------------------------+------------------------------------------ Reporter: lymanrb@… | Owner: somebody Type: defect | Status: new Priority: major | Milestone: Component: flashrom | Version: Keywords: | Dependencies: Patchstatus: there is no patch | ---------------------------------+------------------------------------------ I got such errors when running flashrom. {{{ Calibrating delay loop... OK. Can't mmap memory using /dev/mem: Invalid argument }}}
My env {{{ Linux xxx 2.6.28-ARCH #1 SMP PREEMPT Sun Jan 18 19:41:52 UTC 2009 x86_64 Intel(R) Core(TM)2 Duo CPU T7250 @ 2.00GHz GenuineIntel GNU/Linux
core/pciutils 3.0.3-1 [installed] (base) PCI bus configuration space access library and tools core/zlib 1.2.3.3-3 [installed] (base) A compression/decompression Library
$ ./flashrom -R flashrom r3869 }}}
#121: Failure to mmap /dev/mem needs a better error message ---------------------------------+------------------------------------------ Reporter: lymanrb@… | Owner: stuge Type: enhancement | Status: assigned Priority: minor | Milestone: Component: flashrom | Version: Keywords: | Dependencies: Patchstatus: there is no patch | ---------------------------------+------------------------------------------ Changes (by stuge):
* owner: somebody => stuge * priority: major => minor * type: defect => enhancement * status: new => assigned
Comment:
This happens because CONFIG_NONPROMISC_DEVMEM (pre 2008-07), CONFIG_STRICT_DEVMEM or CONFIG_X86_PAT are set in your kernel.
Although flashrom can do nothing about any of these, I will add this information to the error message, so I'm not closing the ticket just yet.
Dear Peter,
Am Donnerstag, den 22.01.2009, 16:24 +0000 schrieb coreboot:
This happens because CONFIG_NONPROMISC_DEVMEM (pre 2008-07), CONFIG_STRICT_DEVMEM or CONFIG_X86_PAT are set in your kernel.
Although flashrom can do nothing about any of these, I will add this information to the error message, so I'm not closing the ticket just yet.
There is an entry in the FAQ for this issue [1].
Thanks,
Paul
[1] http://www.coreboot.org/FAQ#Can.27t_mmap_memory_using_.2Fdev.2Fmem:_Invalid_...
Paul Menzel wrote:
Although flashrom can do nothing about any of these, I will add this information to the error message, so I'm not closing the ticket just yet.
There is an entry in the FAQ for this issue [1].
Thanks! Might include the URL in the error message then.
//Peter
On 22.01.2009 17:52, Peter Stuge wrote:
Paul Menzel wrote:
Although flashrom can do nothing about any of these, I will add this information to the error message, so I'm not closing the ticket just yet.
There is an entry in the FAQ for this issue [1].
Thanks! Might include the URL in the error message then.
Any change which improves the error message (with an URL or a detailed explanation (preferred because it is usable if you have no internet connection)) is Acked-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Regards, Carl-Daniel
Hello,
This happens because CONFIG_NONPROMISC_DEVMEM (pre 2008-07), CONFIG_STRICT_DEVMEM or CONFIG_X86_PAT are set in your kernel.
Although flashrom can do nothing about any of these, I will add this information to the error message, so I'm not closing the ticket just yet.
I did not try it but this kernel patch may fix the issue with CONFIG_X86_PAT since flashrom tries to mmap the first MB in cbtable.c: http://bugzilla.kernel.org/show_bug.cgi?id=12372
Kind regards
Ole
#121: Failure to mmap /dev/mem needs a better error message ----------------------------------+----------------------------------------- Reporter: lymanrb@… | Owner: stuge Type: enhancement | Status: closed Priority: minor | Milestone: Component: flashrom | Version: Resolution: fixed | Keywords: Dependencies: | Patchstatus: there is no patch ----------------------------------+----------------------------------------- Changes (by stuge):
* status: assigned => closed * resolution: => fixed
Comment:
More info in error message added in r3889.
#121: Failure to mmap /dev/mem needs a better error message ----------------------------------+----------------------------------------- Reporter: lymanrb@… | Owner: stuge Type: enhancement | Status: closed Priority: minor | Milestone: Component: flashrom | Version: Resolution: fixed | Keywords: Dependencies: | Patchstatus: there is no patch ----------------------------------+-----------------------------------------
Comment(by lymanrb@…):
I've seen the info you added in source code. However, I didn't get it printed when I recompile and run.
I debugged a little and found that the error occurred at line 193 of cbtable.c, the errno is 22. I'm not sure whether this helps.
#121: Failure to mmap /dev/mem needs a better error message ----------------------------------+----------------------------------------- Reporter: lymanrb@… | Owner: stuge Type: enhancement | Status: closed Priority: minor | Milestone: Component: flashrom | Version: Resolution: fixed | Keywords: Dependencies: | Patchstatus: there is no patch ----------------------------------+-----------------------------------------
Comment(by stuge):
Helps a lot! Sloppy me didn't catch all occurences of mmap().
Fixed in r3890. Thanks!
#121: Failure to mmap /dev/mem needs a better error message ----------------------------------+----------------------------------------- Reporter: lymanrb@… | Owner: stuge Type: enhancement | Status: closed Priority: minor | Milestone: Component: flashrom | Version: Resolution: fixed | Keywords: Dependencies: | Patchstatus: there is no patch ----------------------------------+-----------------------------------------
Comment(by stuge):
http://bugzilla.kernel.org/show_bug.cgi?id=12372 is possibly related to CONFIG_X86_PAT being problematic here, but no testing has been made to verify if that is the case. All test results most welcome. Thanks to Niels Ole Salscheider for pointing this out.
#121: Failure to mmap /dev/mem needs a better error message ----------------------------------+----------------------------------------- Reporter: lymanrb@… | Owner: stuge Type: enhancement | Status: closed Priority: minor | Milestone: Component: flashrom | Version: Resolution: fixed | Keywords: Dependencies: | Patchstatus: there is no patch ----------------------------------+-----------------------------------------
Comment(by dahuletam):
interesting stuff hope it works.