Hi I am using flashrom to upgrade the BIOS on AMD Geode db800 motherboard. I am getting the following error
EEPROM/flash device not found.
Please suggest me some pointers to solve the problem.
Regards.
Pratish Ganguly
On Tue, Aug 14, 2007 at 06:37:24PM +0530, pratish ganguly wrote:
Hi I am using flashrom to upgrade the BIOS on AMD Geode db800 motherboard. I am getting the following error
EEPROM/flash device not found.
Please suggest me some pointers to solve the problem.
Please see the ALIX thread. Everything there applies to db800 as well, except the possible need for a board_enable_db800 which is only dependant on the circuit design on the db800.
//Peter
Peter Stuge wrote:
On Tue, Aug 14, 2007 at 06:37:24PM +0530, pratish ganguly wrote:
Hi I am using flashrom to upgrade the BIOS on AMD Geode db800 motherboard. I am getting the following error
EEPROM/flash device not found.
Please suggest me some pointers to solve the problem.
Please see the ALIX thread. Everything there applies to db800 as well, except the possible need for a board_enable_db800 which is only dependant on the circuit design on the db800.
//Peter
This page on over on OLPC twiki should probably be brought over to the LinuxBIOS twiki. http://wiki.laptop.org/go/Flashing_LinuxBIOS
Is it worth adding rdmsr/wrmsr to flashrom?
Marc
On Tue, Aug 14, 2007 at 11:25:38AM -0600, Marc Jones wrote:
Is it worth adding rdmsr/wrmsr to flashrom?
Is there a better option?
Is it neccessary to always write all 64 bits of the MSR by the way?
//Peter
On 14/08/07 21:28 +0200, Peter Stuge wrote:
On Tue, Aug 14, 2007 at 11:25:38AM -0600, Marc Jones wrote:
Is it worth adding rdmsr/wrmsr to flashrom?
Is there a better option?
Nope. You need MSR acess, and thats the only way to get it from userspace.
Is it neccessary to always write all 64 bits of the MSR by the way?
Yes - at least this way, which uses just a straight wrmsr in the kernel.
Jordan
Jordan Crouse wrote:
On 14/08/07 21:28 +0200, Peter Stuge wrote:
On Tue, Aug 14, 2007 at 11:25:38AM -0600, Marc Jones wrote:
Is it worth adding rdmsr/wrmsr to flashrom?
Is there a better option?
Nope. You need MSR acess, and thats the only way to get it from userspace.
Is it neccessary to always write all 64 bits of the MSR by the way?
Yes - at least this way, which uses just a straight wrmsr in the kernel.
Okay, I hacked that in and it seems to work. My SST49LF040B flash chip is properly identified at 0xfff80000.
How would you call the enable_flash function in chipset_enable? E.g. enable_flash_cs5536 or enable_flash_geodelx ?
Ingmar
On Wed, Aug 15, 2007 at 11:21:46AM +0200, Ingmar Schraub wrote:
Is it neccessary to always write all 64 bits of the MSR by the way?
Yes - at least this way, which uses just a straight wrmsr in the kernel.
Okay, I hacked that in and it seems to work. My SST49LF040B flash chip is properly identified at 0xfff80000.
Great!
How would you call the enable_flash function in chipset_enable? E.g. enable_flash_cs5536 or enable_flash_geodelx ?
enable_flash_geodelx() yes.
Please send a patch! Check out http://linuxbios.org/Development_Guidelines
//Peter
Peter Stuge wrote:
enable_flash_geodelx() yes.
Please send a patch! Check out http://linuxbios.org/Development_Guidelines
Please have a look at the attached patch.
I've tested it first with a bunch of printf lines in between the read/write steps and it looked good. The 'production' version comes without the printfs, but with some sanity testing which works fine here.
cheers, Ingmar
Hi,
On Wed, Aug 15, 2007 at 04:16:39PM +0200, Ingmar Schraub wrote:
Please send a patch! Check out http://linuxbios.org/Development_Guidelines
Please have a look at the attached patch.
Please add a Signed-off-by line as per guidelines, otherwise we cannot commit the patch.
Uwe.
Ingmar Schraub wrote:
Peter Stuge wrote:
enable_flash_geodelx() yes.
Please send a patch! Check out http://linuxbios.org/Development_Guidelines
Please have a look at the attached patch.
I've tested it first with a bunch of printf lines in between the read/write steps and it looked good. The 'production' version comes without the printfs, but with some sanity testing which works fine here.
Hm I wonder whether it might make sense to use asm("rdmsr") instead of /dev/... so that it will work on non-linux systems as well?
Great work!
On 15/08/07 18:28 +0200, Stefan Reinauer wrote:
Ingmar Schraub wrote:
Peter Stuge wrote:
enable_flash_geodelx() yes.
Please send a patch! Check out http://linuxbios.org/Development_Guidelines
Please have a look at the attached patch.
I've tested it first with a bunch of printf lines in between the read/write steps and it looked good. The 'production' version comes without the printfs, but with some sanity testing which works fine here.
Hm I wonder whether it might make sense to use asm("rdmsr") instead of /dev/... so that it will work on non-linux systems as well?
the rdmsr instruction won't work in ring 3, unfortunately. There is a way to access the MSRs through a VSA virtual register, but I'm loath to mention it, because it makes me feel all icky.
Jordan
* Jordan Crouse jordan.crouse@amd.com [070815 16:43]:
the rdmsr instruction won't work in ring 3, unfortunately. There is a way to access the MSRs through a VSA virtual register, but I'm loath to mention it, because it makes me feel all icky.
oops. ioperm() is not enough?
How are rdmsr/wrmsr done on opensolaris?
Stefan
On Wed, Aug 15, 2007 at 04:16:39PM +0200, Ingmar Schraub wrote:
Please have a look at the attached patch.
Thanks!
- unsigned char wrbuf[] = { 0x00, 0xbf, 0xf7, 0x10, 0x02, 0x80, 0xff, 0x22};
..
- lseek64(fd_msr, (off64_t)addr, SEEK_SET);
- read(fd_msr, buf, 8);
- close(fd_msr);
Do you know if it's neccessary to close and reopen?
- fd_msr = open("/dev/cpu/0/msr", O_WRONLY);
- lseek64(fd_msr, (off64_t)addr, SEEK_SET);
- write(fd_msr, wrbuf, 8);
I thought about this. I don't think we should blindly overwrite the entire MSR. The only thing we really want to do is change the MSB of this MSR (ROMRP, ROM Region Properties) by clearing bit 2 and setting either bit 1 or bit 0. (0x22 on OLPC wiki sets bit 1 but bit 0 makes more sense to me, looking at the databook. Anyway, whatever works. :)
- if (memcmp(buf, wrbuf, 8))
return -1;
Verify is good! Maybe print a success message with the current setting before returning too?
//Peter
On 15/08/07 11:21 +0200, Ingmar Schraub wrote:
Jordan Crouse wrote:
On 14/08/07 21:28 +0200, Peter Stuge wrote:
On Tue, Aug 14, 2007 at 11:25:38AM -0600, Marc Jones wrote:
Is it worth adding rdmsr/wrmsr to flashrom?
Is there a better option?
Nope. You need MSR acess, and thats the only way to get it from userspace.
Is it neccessary to always write all 64 bits of the MSR by the way?
Yes - at least this way, which uses just a straight wrmsr in the kernel.
Okay, I hacked that in and it seems to work. My SST49LF040B flash chip is properly identified at 0xfff80000.
How would you call the enable_flash function in chipset_enable? E.g. enable_flash_cs5536 or enable_flash_geodelx ?
I vote for enabled_flash_cs5536.
Ingmar
Jordan Crouse wrote:
How would you call the enable_flash function in chipset_enable? E.g. enable_flash_cs5536 or enable_flash_geodelx ?
I vote for enabled_flash_cs5536.
hmmm, my very first version used enable_flash_cs5536. ;-) I changed it for the patch I submitted.
Well, Peter and you should agree an something. At least it's easy to change ;-)
regards, Ingmar
On Wed, Aug 15, 2007 at 04:36:15PM +0200, Ingmar Schraub wrote:
Jordan Crouse wrote:
I vote for enabled_flash_cs5536.
Well, Peter and you should agree an something.
I prefer geodelx because that's where the 1808 MSR seems to be - it's in the LX databook, and it tells the memory controller in the LX how to handle writes to the top of the address space.
We may need a enable_flash_cs5536() as well, to fiddle with the 51400010-51400013 (maybe 0015) DIVIL MSRs for the flash controller in the 5536.
5536 has subtractive decode to LPC, so no decoding needs to be set up like for 5530. But maybe there is a write protect bit somewhere in the 5536 that needs to be flipped? I've looked through the data book briefly but didn't spot one. Jordan?
//Peter