Patchwork AMD - SP5100 - take SPI ownership (1/2)

login
register
about
Submitter Rudolf Marek
Date 2013-03-26 15:36:25
Message ID <5151C079.1010101@assembler.cz>
Download mbox | patch
Permalink /patch/3894/
State Superseded
Headers show

Comments

Rudolf Marek - 2013-03-26 15:36:25
Hi all

I tried with IMC activated on coreboot (Hudson chipset) and it works as 
expected. Attached patch only tweaks messages and removes now redundant check 
from sb600 SPI. If IMC is active and firmware handoff fails, then it exits with 
fatal error.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

It would be nice if someone else could test this (and dont forget to be able to 
recover from bad flash)

Thanks
Rudolf
Racine, Michel - 2013-03-27 15:35:45
Hello Rudolf,

I'm assuming I only need to apply the a.patch you sent (not the imc.patch) to the source for 0.9.6.1. I will test this on an AMD Persimmon board (it won't boot currently, I need a dediProg because I bricked it).

I'll update soon,
Cheers,
Michel.


-----Original Message-----
From: Rudolf Marek [mailto:r.marek@assembler.cz] 
Sent: Tuesday, March 26, 2013 9:36 AM
To: roxfan
Cc: frederic.temporelli@bull.net; wmkamp@datakamp.de; flashrom@flashrom.org; Racine, Michel
Subject: Re: [flashrom] AMD - SP5100 - take SPI ownership (1/2)

Hi all

I tried with IMC activated on coreboot (Hudson chipset) and it works as expected. Attached patch only tweaks messages and removes now redundant check from sb600 SPI. If IMC is active and firmware handoff fails, then it exits with fatal error.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

It would be nice if someone else could test this (and dont forget to be able to recover from bad flash)

Thanks
Rudolf
Racine, Michel - 2013-03-27 16:28:22
Hello Rudolf,

With your patch, I had a small compile issue (imc.c, function mbox_wait_ack, commented call to msg_pwarn).

I attempted to use the exe, but it cannot turn off IMC. Not sure what you need from here. I can change the code, or gather any data you want.

Output of flashrom execution:

./flashrom_imcpatch -p internal

flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... (Shutting down IMC failed!)
FAILED!
FATAL ERROR!
Error: Programmer initialization failed.


Please let me know what you suggest we do next.

Thanks,
Michel.


-----Original Message-----
From: Racine, Michel 
Sent: Wednesday, March 27, 2013 9:36 AM
To: Rudolf Marek; roxfan
Cc: frederic.temporelli@bull.net; wmkamp@datakamp.de; flashrom@flashrom.org; Racine, Michel
Subject: RE: [flashrom] AMD - SP5100 - take SPI ownership (1/2)

Hello Rudolf,

I'm assuming I only need to apply the a.patch you sent (not the imc.patch) to the source for 0.9.6.1. I will test this on an AMD Persimmon board (it won't boot currently, I need a dediProg because I bricked it).

I'll update soon,
Cheers,
Michel.


-----Original Message-----
From: Rudolf Marek [mailto:r.marek@assembler.cz] 
Sent: Tuesday, March 26, 2013 9:36 AM
To: roxfan
Cc: frederic.temporelli@bull.net; wmkamp@datakamp.de; flashrom@flashrom.org; Racine, Michel
Subject: Re: [flashrom] AMD - SP5100 - take SPI ownership (1/2)

Hi all

I tried with IMC activated on coreboot (Hudson chipset) and it works as expected. Attached patch only tweaks messages and removes now redundant check from sb600 SPI. If IMC is active and firmware handoff fails, then it exits with fatal error.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

It would be nice if someone else could test this (and dont forget to be able to recover from bad flash)

Thanks
Rudolf
Stefan Tauner - 2013-03-27 16:44:19
On Wed, 27 Mar 2013 16:28:22 +0000
"Racine, Michel" <michel.racine@hp.com> wrote:

> With your patch, I had a small compile issue (imc.c, function mbox_wait_ack, commented call to msg_pwarn).

Hello,

thanks for testing it. What kind of compile issue? There should not be
any problem with calls to msg_pwarn with that patch.

> I attempted to use the exe, but it cannot turn off IMC. Not sure what you need from here. I can change the code, or gather any data you want.

That's interesting, I can't comment on that yet and there isn't a lot
of debug code in there yet, so running with additional -V parameters
won't help much I guess.
Rudolf Marek - 2013-03-28 07:31:15
Hi,

Please try with -V

I need to see ioport addresses and we can check some other stuff.

Thanks
Rudolf
Racine, Michel - 2013-03-28 14:26:07
Hello,

I attached imc.c. The compiler complained with:

imc.c: In function ‘mbox_wait_ack’:
imc.c:107:2: error: implicit declaration of function ‘msg_pwarn’ [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make: *** [imc.o] Error 1

Thanks,
Michel.

-----Original Message-----
From: Stefan Tauner [mailto:stefan.tauner@student.tuwien.ac.at] 

Sent: Wednesday, March 27, 2013 10:44 AM
To: Racine, Michel
Cc: flashrom@flashrom.org; Rudolf Marek; roxfan
Subject: Re: [flashrom] AMD - SP5100 - take SPI ownership (1/2)

On Wed, 27 Mar 2013 16:28:22 +0000
"Racine, Michel" <michel.racine@hp.com> wrote:

> With your patch, I had a small compile issue (imc.c, function mbox_wait_ack, commented call to msg_pwarn).


Hello,

thanks for testing it. What kind of compile issue? There should not be any problem with calls to msg_pwarn with that patch.

> I attempted to use the exe, but it cannot turn off IMC. Not sure what you need from here. I can change the code, or gather any data you want.


That's interesting, I can't comment on that yet and there isn't a lot of debug code in there yet, so running with additional -V parameters won't help much I guess.

--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
/*
 * This file is part of the flashrom project.
 *
 * Copyright (C) 2013 Rudolf Marek <r.marek@assembler.cz>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 */

#if defined(__i386__) || defined(__x86_64__)

#include "flash.h"
#include "programmer.h"
#include "hwaccess.h"
#include "spi.h"

/* same as serverengines */
static void enter_conf_mode_ec(uint16_t port)
{
	outb(0x5a, port);
}

static void exit_conf_mode_ec(uint16_t port)
{
	outb(0xa5, port);
}

static uint16_t get_sio_port(struct pci_dev *dev)
{
	uint16_t ec_port;

	if (!dev) {
		return 0;
	}

	if (!(pci_read_byte(dev, 0x40) & (1 << 7)))
		return 0;

	ec_port = pci_read_word(dev, 0xa4);

	if (!(ec_port & 0x1))
		return 0;

	ec_port &= ~0x1;

	return ec_port;
}


static void write_data(uint16_t port, uint8_t off, uint8_t data)
{
	outb(off, port);
	outb(data, port + 1);
}

static uint8_t read_data(uint16_t port, uint8_t off)
{
	outb(off, port);
	return inb(port + 1);
}


static uint16_t get_mbox_port(uint16_t sio_port)
{
	uint16_t mbox_port;

	enter_conf_mode_ec(sio_port);

	/* go to LDN 9, mailbox */
	write_data(sio_port, 7, 9);

	/* MBOX not active ? */
	if (!(read_data(sio_port, 0x30) & 1)) {
		exit_conf_mode_ec(sio_port);
		return 0;
	}

	mbox_port = read_data(sio_port, 0x60) << 8;
	mbox_port |= read_data(sio_port, 0x61);

	exit_conf_mode_ec(sio_port);
	return mbox_port;
}

static int mbox_wait_ack(uint16_t mbox_port)
{
	int i;

	for (i = 0; i < 10; i++) {
		/* sleep 1ms */
		programmer_delay(1000);
		if (read_data(mbox_port, 0x82) == 0xfa) {
			return 0;
		}
	}
	msg_pinfo("IMC MBOX: Timeout!\n");
	return 1;

}

static int send_cmd(uint16_t mbox_port, uint8_t cmd)
{
	write_data(mbox_port, 0x82, 0x0);
	write_data(mbox_port, 0x83, cmd);
	/* trigger transfer 0x96 with subcommand cmd */
	write_data(mbox_port, 0x80, 0x96);

	return mbox_wait_ack(mbox_port);
}

static int imc_cmd(struct pci_dev *dev, uint8_t cmd)
{
	uint16_t sio_port;
	uint16_t mbox_port;
	sio_port = get_sio_port(dev);

	if (!sio_port)
		return -1;

	msg_pdbg("\nEC SIO is at 0x%x\n", sio_port);

	mbox_port = get_mbox_port(sio_port);

	if (!mbox_port)
		return -1;

	msg_pdbg("EC MBOX is at 0x%x\n", mbox_port);

	/* put IMC to sleep */
	return send_cmd(mbox_port, cmd);
}

static int imc_try_resume(void *data)
{
	struct pci_dev *dev = data;
	int ret = imc_cmd(dev, 0xb5);

	msg_pinfo("(IMC resume%s)\n", ret ? " failed!" : "d");
	return ret;
}

int imc_try_shutdown(struct pci_dev *dev)
{
	int ret = imc_cmd(dev, 0xb4);

	/* No IMC active, fake OK */
	if (ret < 0)
		return 0;

	msg_pinfo("(Shutting down IMC%s)\n", ret ? " failed!" : "");

	/* restore IMC on exit */
	if ((!ret) && (register_shutdown(imc_try_resume, dev)))
		return 1;

	return ret;
}

#endif
Rudolf Marek - 2013-03-28 14:37:53
That's interesting, I can't comment on that yet and there isn't a lot of 
debug code in there yet, so running with additional -V parameters won't 
help much I guess.

It helps please go on. I need to check the IMC mailbox and SIO addreses. 
We can continue with some other programs to verify that IMC
accepts at least some commands.

Thanks
Rudolf

> --
> Kind regards/Mit freundlichen Grüßen, Stefan Tauner
>
Idwer Vollering - 2013-03-28 15:19:41
2013/3/28 Racine, Michel <michel.racine@hp.com>:
> Hello,
>
> I attached imc.c. The compiler complained with:
>
> imc.c: In function ‘mbox_wait_ack’:
> imc.c:107:2: error: implicit declaration of function ‘msg_pwarn’ [-Werror=implicit-function-declaration]
> cc1: all warnings being treated as errors
> make: *** [imc.o] Error 1
>
> Thanks,
> Michel.

Did you delete imc.bin before applying Rudolf's follow-up patch?
Idwer Vollering - 2013-03-28 15:20:09
2013/3/28 Idwer Vollering <vidwer@gmail.com>:
> 2013/3/28 Racine, Michel <michel.racine@hp.com>:
>> Hello,
>>
>> I attached imc.c. The compiler complained with:
>>
>> imc.c: In function ‘mbox_wait_ack’:
>> imc.c:107:2: error: implicit declaration of function ‘msg_pwarn’ [-Werror=implicit-function-declaration]
>> cc1: all warnings being treated as errors
>> make: *** [imc.o] Error 1
>>
>> Thanks,
>> Michel.
>
> Did you delete imc.bin before applying Rudolf's follow-up patch?

That should have been imc.c
Stefan Tauner - 2013-03-28 15:32:35
On Thu, 28 Mar 2013 14:26:07 +0000
"Racine, Michel" <michel.racine@hp.com> wrote:

> I attached imc.c. The compiler complained with:
> 
> imc.c: In function ‘mbox_wait_ack’:
> imc.c:107:2: error: implicit declaration of function ‘msg_pwarn’ [-Werror=implicit-function-declaration]
> cc1: all warnings being treated as errors
> make: *** [imc.o] Error 1

Hi,

we can not reproduce that problem. Please post the complete build log
and tell us how you did apply the patch. The imc.c you posted is valid
and I have successfully compiled it in my tree.

And as Rudolf already wrote, please post the output of flashrom when
run with -V too.
Racine, Michel - 2013-03-28 16:36:02
Hello Rudolf, Stefan,

I will resume testing shortly. I can add that it works if I connect the DediProg emulator, and I let flashrom reprogram the emulator (instead of the onboard rom memory). I need to reprogram the onboard memory before I can do a definitive test of flashrom (I cannot boot at the moment without the emulator). This will take me a few days to get my hands on an in-circuit programmer. Attached is the output when flashrom reprograms the emulator.

PS: about the compile issue; don't worry about it. If the main repro is fine, ignore my issue.

Thanks,
Michel.


-----Original Message-----
From: Rudolf Marek [mailto:r.marek@assembler.cz] 
Sent: Thursday, March 28, 2013 1:31 AM
To: Racine, Michel
Cc: roxfan; frederic.temporelli@bull.net; wmkamp@datakamp.de; flashrom@flashrom.org
Subject: Re: [flashrom] AMD - SP5100 - take SPI ownership (1/2)

Hi,

Please try with -V

I need to see ioport addresses and we can check some other stuff.

Thanks
Rudolf
flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
flashrom is free software, get the source code at http://www.flashrom.org

flashrom was built with libpci 3.1.8, GCC 4.6.3, little endian
Command line (5 args): ./flashrom_imcpatch -V -p internal -w coreboot.rom
Calibrating delay loop... OS timer resolution is 2 usecs, 499M loops per second, 10 myus = 10 us, 100 myus = 100 us, 1000 myus = 999 us, 10000 myus = 10007 us, 8 myus = 9 us, OK.
Initializing internal programmer
No coreboot table found.
DMI string system-manufacturer: "To be filled by O.E.M."
DMI string system-product-name: "To be filled by O.E.M."
DMI string system-version: "To be filled by O.E.M."
DMI string baseboard-manufacturer: "AMD Corporation"
DMI string baseboard-product-name: "Inagua CRB"
DMI string baseboard-version: "To be filled by O.E.M."
DMI string chassis-type: "Desktop"
Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write... 
EC SIO is at 0x16e
EC MBOX is at 0x3e
(Shutting down IMC)
SPI base address is at 0xfec10000
AltSpiCSEnable=0, SpiRomEnable=1, AbortEnable=0
PrefetchEnSPIFromIMC=1, PrefetchEnSPIFromHost=1, SpiOpEnInLpcMode=1
SpiArbEnable=1, SpiAccessMacRomEn=1, SpiHostAccessRomEn=1, ArbWaitCount=7, SpiBridgeDisable=1, DropOneClkOnRd=0
NormSpeed is 22 MHz
GPIO11 used for SPI_DO
GPIO12 used for SPI_DI
GPIO31 used for SPI_HOLD
GPIO32 used for SPI_CS
GPIO47 used for SPI_CLK
SB700 IMC is active.
ROM strap override is not active
OK.
The following protocols are supported: LPC, FWH, SPI.
Probing for AMIC A25L05PT, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L05PU, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L10PT, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L10PU, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L20PT, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L20PU, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L40PT, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L40PU, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L80P, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L16PT, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L16PU, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L512, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L010, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L020, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L040, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L080, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L016, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25L032, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for AMIC A25LQ032, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF021, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF041A, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF081, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF081A, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF161, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF321, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF321A, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DF641(A), 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25DQ161, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25F512B, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25FS010, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT25FS040, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT26DF041, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT26DF081A, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT26DF161, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT26DF161A, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT26F004, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45CS1282, 16896 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB011D, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB021D, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB041D, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB081D, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB161D, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB321C, 4224 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB321D, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel AT45DB642D, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for EMST F25L008A, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B05, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B05T, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B10, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B10T, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B20, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B20T, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B40, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B40T, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B80, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B80T, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B16T, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B32T, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B64, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25B64T, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25F05, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25F10, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25F20, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25F40, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25F80, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25F16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25F32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25Q40, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25Q80(A), 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25Q16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25Q32(A/B), 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25Q64, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25Q128, 16384 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25QH16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon EN25QH32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for GigaDevice GD25Q20, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for GigaDevice GD25Q40, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for GigaDevice GD25Q80, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for GigaDevice GD25Q16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for GigaDevice GD25Q32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for GigaDevice GD25Q64, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for GigaDevice GD25Q128, 16384 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L512, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L1005, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L2005, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L4005, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L8005, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L1605, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L1635D, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L1635E, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L3205, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L3235D, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L6405, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix MX25L12805, 16384 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Numonyx M25PE10, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Numonyx M25PE20, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Numonyx M25PE40, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Numonyx M25PE80, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Numonyx M25PE16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Numonyx N25Q064, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for PMC Pm25LV010, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for PMC Pm25LV016B, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for PMC Pm25LV020, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for PMC Pm25LV040, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for PMC Pm25LV080B, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for PMC Pm25LV512, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Sanyo LF25FW203A, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Spansion S25FL004A, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Spansion S25FL008A, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Spansion S25FL016A, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Spansion S25FL032A, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Spansion S25FL064A, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for SST SST25LF040A, 512 kB: probe_spi_res2: id1 0x4a, id2 0x4a
Probing for SST SST25LF080A, 1024 kB: probe_spi_res2: id1 0x4a, id2 0x4a
Probing for SST SST25VF010, 128 kB: probe_spi_rems: id1 0xbf, id2 0x4a
Probing for SST SST25VF016B, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for SST SST25VF032B, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Chip status register is 00
Chip status register: Block Protect Write Disable (BPL) is not set
Chip status register: Auto Address Increment Programming (AAI) is not set
Chip status register: Block Protect 3 (BP3) is not set
Chip status register: Block Protect 2 (BP2) is not set
Chip status register: Block Protect 1 (BP1) is not set
Chip status register: Block Protect 0 (BP0) is not set
Chip status register: Write Enable Latch (WEL) is not set
Chip status register: Write In Progress (WIP/BUSY) is not set
Found SST flash chip "SST25VF032B" (4096 kB, SPI) at physical address 0xffc00000.
Probing for SST SST25VF064C, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for SST SST25VF040, 512 kB: probe_spi_rems: id1 0xbf, id2 0x4a
Probing for SST SST25VF040B, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for SST SST25VF040B.REMS, 512 kB: probe_spi_rems: id1 0xbf, id2 0x4a
Probing for SST SST25VF080B, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P05-A, 64 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P05, 64 kB: Ignoring RES in favour of RDID.
Probing for ST M25P10-A, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P10, 128 kB: Ignoring RES in favour of RDID.
Probing for ST M25P20, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P40, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P40-old, 512 kB: Ignoring RES in favour of RDID.
Probing for ST M25P80, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P64, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25P128, 16384 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25PX16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25PX32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST M25PX64, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25Q80, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25Q16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25Q32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25Q64, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25Q128, 16384 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25X10, 128 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25X20, 256 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25X40, 512 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25X80, 1024 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25X16, 2048 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25X32, 4096 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Winbond W25X64, 8192 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Unknown SFDP-capable chip, 0 kB: No SFDP signature found.
Probing for AMIC unknown AMIC SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Atmel unknown Atmel SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Eon unknown Eon SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Macronix unknown Macronix SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for PMC unknown PMC SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for SST unknown SST SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for ST unknown ST SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Sanyo unknown Sanyo SPI chip, 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Generic unknown SPI chip (RDID), 0 kB: probe_spi_rdid_generic: id1 0xbf, id2 0x254a
Probing for Generic unknown SPI chip (REMS), 0 kB: probe_spi_rems: id1 0xbf, id2 0x4a
Probing for AMIC A49LF040A, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Atmel AT49LH002, 256 kB: probe_82802ab: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for Intel 82802AB, 512 kB: probe_82802ab: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Intel 82802AC, 1024 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for PMC Pm49FL002, 256 kB: probe_jedec_common: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for PMC Pm49FL004, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Sharp LHF00L04, 1024 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF002A/B, 256 kB: probe_jedec_common: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF003A/B, 384 kB: probe_jedec_common: id1 0x73, id2 0x05, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF004A/B, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF004C, 512 kB: probe_82802ab: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF008A, 1024 kB: probe_jedec_common: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF008C, 1024 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF016C, 2048 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF020, 256 kB: probe_jedec_common: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF020A, 256 kB: probe_jedec_common: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF040, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF040B, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF080A, 1024 kB: Chip lacks correct probe timing information, using default 10mS/40uS. probe_jedec_common: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for SST SST49LF160C, 2048 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FLW040A, 512 kB: probe_82802ab: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FLW040B, 512 kB: probe_82802ab: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FLW080A, 1024 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FLW080B, 1024 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FW002, 256 kB: probe_82802ab: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FW016, 2048 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FW040, 512 kB: probe_82802ab: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for ST M50FW080, 1024 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for ST M50LPW116, 2048 kB: probe_82802ab: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V040A, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V040B, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V040C, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V040FA, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V040FB, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V040FC, 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V080A, 1024 kB: probe_jedec_common: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W49V002A, 256 kB: probe_jedec_common: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W49V002FA, 256 kB: probe_jedec_common: id1 0x00, id2 0x00, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V080FA, 1024 kB: probe_jedec_common: id1 0xff, id2 0xff, id1 parity violation, id1 is normal flash content, id2 is normal flash content
Probing for Winbond W39V080FA (dual mode), 512 kB: probe_jedec_common: id1 0xea, id2 0xd0, id1 is normal flash content, id2 is normal flash content
Found SST flash chip "SST25VF032B" (4096 kB, SPI).
coreboot last image size (not ROM size) is 4194304 bytes.
Manufacturer: AMD
Mainboard ID: Persimmon
Note: If the following flash access fails, try -p internal:mainboard=<vendor>:<mainboard>.
Reading old flash chip contents... done.
Erasing and writing flash chip... Trying erase function 0... 0x000000-0x000fff:W, 0x001000-0x001fff:W, 0x002000-0x002fff:W, 0x003000-0x003fff:W, 0x004000-0x004fff:W, 0x005000-0x005fff:W, 0x006000-0x006fff:W, 0x007000-0x007fff:W, 0x008000-0x008fff:W, 0x009000-0x009fff:W, 0x00a000-0x00afff:W, 0x00b000-0x00bfff:W, 0x00c000-0x00cfff:W, 0x00d000-0x00dfff:W, 0x00e000-0x00efff:W, 0x00f000-0x00ffff:W, 0x010000-0x010fff:W, 0x011000-0x011fff:W, 0x012000-0x012fff:W, 0x013000-0x013fff:W, 0x014000-0x014fff:W, 0x015000-0x015fff:W, 0x016000-0x016fff:W, 0x017000-0x017fff:W, 0x018000-0x018fff:W, 0x019000-0x019fff:W, 0x01a000-0x01afff:W, 0x01b000-0x01bfff:W, 0x01c000-0x01cfff:W, 0x01d000-0x01dfff:W, 0x01e000-0x01efff:W, 0x01f000-0x01ffff:W, 0x020000-0x020fff:EW, 0x021000-0x021fff:W, 0x022000-0x022fff:W, 0x023000-0x023fff:W, 0x024000-0x024fff:W, 0x025000-0x025fff:W, 0x026000-0x026fff:W, 0x027000-0x027fff:W, 0x028000-0x028fff:W, 0x029000-0x029fff:W, 0x02a000-0x02afff:W, 0x02b000-0x02bfff:W, 0x02c000-0x02cfff:W, 0x02d000-0x02dfff:W, 0x02e000-0x02efff:W, 0x02f000-0x02ffff:W, 0x030000-0x030fff:EW, 0x031000-0x031fff:EW, 0x032000-0x032fff:W, 0x033000-0x033fff:W, 0x034000-0x034fff:W, 0x035000-0x035fff:W, 0x036000-0x036fff:W, 0x037000-0x037fff:W, 0x038000-0x038fff:W, 0x039000-0x039fff:W, 0x03a000-0x03afff:W, 0x03b000-0x03bfff:W, 0x03c000-0x03cfff:W, 0x03d000-0x03dfff:W, 0x03e000-0x03efff:W, 0x03f000-0x03ffff:W, 0x040000-0x040fff:W, 0x041000-0x041fff:W, 0x042000-0x042fff:W, 0x043000-0x043fff:W, 0x044000-0x044fff:W, 0x045000-0x045fff:W, 0x046000-0x046fff:W, 0x047000-0x047fff:W, 0x048000-0x048fff:W, 0x049000-0x049fff:W, 0x04a000-0x04afff:W, 0x04b000-0x04bfff:W, 0x04c000-0x04cfff:W, 0x04d000-0x04dfff:W, 0x04e000-0x04efff:W, 0x04f000-0x04ffff:EW, 0x050000-0x050fff:EW, 0x051000-0x051fff:W, 0x052000-0x052fff:W, 0x053000-0x053fff:W, 0x054000-0x054fff:W, 0x055000-0x055fff:W, 0x056000-0x056fff:W, 0x057000-0x057fff:W, 0x058000-0x058fff:W, 0x059000-0x059fff:W, 0x05a000-0x05afff:W, 0x05b000-0x05bfff:W, 0x05c000-0x05cfff:W, 0x05d000-0x05dfff:W, 0x05e000-0x05efff:W, 0x05f000-0x05ffff:W, 0x060000-0x060fff:W, 0x061000-0x061fff:W, 0x062000-0x062fff:W, 0x063000-0x063fff:W, 0x064000-0x064fff:W, 0x065000-0x065fff:W, 0x066000-0x066fff:W, 0x067000-0x067fff:W, 0x068000-0x068fff:W, 0x069000-0x069fff:W, 0x06a000-0x06afff:W, 0x06b000-0x06bfff:W, 0x06c000-0x06cfff:W, 0x06d000-0x06dfff:W, 0x06e000-0x06efff:W, 0x06f000-0x06ffff:EW, 0x070000-0x070fff:W, 0x071000-0x071fff:W, 0x072000-0x072fff:W, 0x073000-0x073fff:W, 0x074000-0x074fff:W, 0x075000-0x075fff:W, 0x076000-0x076fff:W, 0x077000-0x077fff:W, 0x078000-0x078fff:W, 0x079000-0x079fff:W, 0x07a000-0x07afff:W, 0x07b000-0x07bfff:W, 0x07c000-0x07cfff:W, 0x07d000-0x07dfff:W, 0x07e000-0x07efff:W, 0x07f000-0x07ffff:W, 0x080000-0x080fff:EW, 0x081000-0x081fff:EW, 0x082000-0x082fff:EW, 0x083000-0x083fff:EW, 0x084000-0x084fff:EW, 0x085000-0x085fff:EW, 0x086000-0x086fff:EW, 0x087000-0x087fff:EW, 0x088000-0x088fff:EW, 0x089000-0x089fff:EW, 0x08a000-0x08afff:EW, 0x08b000-0x08bfff:EW, 0x08c000-0x08cfff:EW, 0x08d000-0x08dfff:EW, 0x08e000-0x08efff:EW, 0x08f000-0x08ffff:EW, 0x090000-0x090fff:EW, 0x091000-0x091fff:EW, 0x092000-0x092fff:EW, 0x093000-0x093fff:EW, 0x094000-0x094fff:EW, 0x095000-0x095fff:EW, 0x096000-0x096fff:EW, 0x097000-0x097fff:EW, 0x098000-0x098fff:E, 0x099000-0x099fff:E, 0x09a000-0x09afff:E, 0x09b000-0x09bfff:E, 0x09c000-0x09cfff:E, 0x09d000-0x09dfff:E, 0x09e000-0x09efff:E, 0x09f000-0x09ffff:E, 0x0a0000-0x0a0fff:E, 0x0a1000-0x0a1fff:E, 0x0a2000-0x0a2fff:E, 0x0a3000-0x0a3fff:E, 0x0a4000-0x0a4fff:E, 0x0a5000-0x0a5fff:E, 0x0a6000-0x0a6fff:E, 0x0a7000-0x0a7fff:E, 0x0a8000-0x0a8fff:E, 0x0a9000-0x0a9fff:E, 0x0aa000-0x0aafff:E, 0x0ab000-0x0abfff:E, 0x0ac000-0x0acfff:E, 0x0ad000-0x0adfff:E, 0x0ae000-0x0aefff:E, 0x0af000-0x0affff:E, 0x0b0000-0x0b0fff:E, 0x0b1000-0x0b1fff:E, 0x0b2000-0x0b2fff:E, 0x0b3000-0x0b3fff:E, 0x0b4000-0x0b4fff:E, 0x0b5000-0x0b5fff:E, 0x0b6000-0x0b6fff:E, 0x0b7000-0x0b7fff:E, 0x0b8000-0x0b8fff:E, 0x0b9000-0x0b9fff:E, 0x0ba000-0x0bafff:E, 0x0bb000-0x0bbfff:E, 0x0bc000-0x0bcfff:E, 0x0bd000-0x0bdfff:E, 0x0be000-0x0befff:E, 0x0bf000-0x0bffff:E, 0x0c0000-0x0c0fff:E, 0x0c1000-0x0c1fff:E, 0x0c2000-0x0c2fff:E, 0x0c3000-0x0c3fff:E, 0x0c4000-0x0c4fff:E, 0x0c5000-0x0c5fff:E, 0x0c6000-0x0c6fff:E, 0x0c7000-0x0c7fff:E, 0x0c8000-0x0c8fff:E, 0x0c9000-0x0c9fff:E, 0x0ca000-0x0cafff:E, 0x0cb000-0x0cbfff:E, 0x0cc000-0x0ccfff:E, 0x0cd000-0x0cdfff:E, 0x0ce000-0x0cefff:E, 0x0cf000-0x0cffff:E, 0x0d0000-0x0d0fff:E, 0x0d1000-0x0d1fff:E, 0x0d2000-0x0d2fff:E, 0x0d3000-0x0d3fff:E, 0x0d4000-0x0d4fff:E, 0x0d5000-0x0d5fff:E, 0x0d6000-0x0d6fff:E, 0x0d7000-0x0d7fff:E, 0x0d8000-0x0d8fff:E, 0x0d9000-0x0d9fff:E, 0x0da000-0x0dafff:E, 0x0db000-0x0dbfff:E, 0x0dc000-0x0dcfff:E, 0x0dd000-0x0ddfff:E, 0x0de000-0x0defff:E, 0x0df000-0x0dffff:E, 0x0e0000-0x0e0fff:E, 0x0e1000-0x0e1fff:E, 0x0e2000-0x0e2fff:E, 0x0e3000-0x0e3fff:E, 0x0e4000-0x0e4fff:E, 0x0e5000-0x0e5fff:E, 0x0e6000-0x0e6fff:E, 0x0e7000-0x0e7fff:E, 0x0e8000-0x0e8fff:E, 0x0e9000-0x0e9fff:E, 0x0ea000-0x0eafff:E, 0x0eb000-0x0ebfff:E, 0x0ec000-0x0ecfff:E, 0x0ed000-0x0edfff:E, 0x0ee000-0x0eefff:E, 0x0ef000-0x0effff:E, 0x0f0000-0x0f0fff:E, 0x0f1000-0x0f1fff:E, 0x0f2000-0x0f2fff:E, 0x0f3000-0x0f3fff:E, 0x0f4000-0x0f4fff:E, 0x0f5000-0x0f5fff:E, 0x0f6000-0x0f6fff:E, 0x0f7000-0x0f7fff:E, 0x0f8000-0x0f8fff:E, 0x0f9000-0x0f9fff:E, 0x0fa000-0x0fafff:E, 0x0fb000-0x0fbfff:E, 0x0fc000-0x0fcfff:E, 0x0fd000-0x0fdfff:E, 0x0fe000-0x0fefff:E, 0x0ff000-0x0fffff:E, 0x100000-0x100fff:E, 0x101000-0x101fff:E, 0x102000-0x102fff:E, 0x103000-0x103fff:E, 0x104000-0x104fff:E, 0x105000-0x105fff:E, 0x106000-0x106fff:E, 0x107000-0x107fff:E, 0x108000-0x108fff:E, 0x109000-0x109fff:E, 0x10a000-0x10afff:E, 0x10b000-0x10bfff:E, 0x10c000-0x10cfff:E, 0x10d000-0x10dfff:E, 0x10e000-0x10efff:E, 0x10f000-0x10ffff:E, 0x110000-0x110fff:E, 0x111000-0x111fff:E, 0x112000-0x112fff:E, 0x113000-0x113fff:E, 0x114000-0x114fff:E, 0x115000-0x115fff:E, 0x116000-0x116fff:E, 0x117000-0x117fff:E, 0x118000-0x118fff:E, 0x119000-0x119fff:E, 0x11a000-0x11afff:E, 0x11b000-0x11bfff:E, 0x11c000-0x11cfff:E, 0x11d000-0x11dfff:E, 0x11e000-0x11efff:E, 0x11f000-0x11ffff:E, 0x120000-0x120fff:E, 0x121000-0x121fff:E, 0x122000-0x122fff:E, 0x123000-0x123fff:E, 0x124000-0x124fff:E, 0x125000-0x125fff:E, 0x126000-0x126fff:E, 0x127000-0x127fff:E, 0x128000-0x128fff:E, 0x129000-0x129fff:E, 0x12a000-0x12afff:E, 0x12b000-0x12bfff:E, 0x12c000-0x12cfff:E, 0x12d000-0x12dfff:E, 0x12e000-0x12efff:E, 0x12f000-0x12ffff:E, 0x130000-0x130fff:E, 0x131000-0x131fff:E, 0x132000-0x132fff:E, 0x133000-0x133fff:E, 0x134000-0x134fff:E, 0x135000-0x135fff:E, 0x136000-0x136fff:E, 0x137000-0x137fff:E, 0x138000-0x138fff:E, 0x139000-0x139fff:E, 0x13a000-0x13afff:E, 0x13b000-0x13bfff:E, 0x13c000-0x13cfff:E, 0x13d000-0x13dfff:E, 0x13e000-0x13efff:E, 0x13f000-0x13ffff:E, 0x140000-0x140fff:E, 0x141000-0x141fff:E, 0x142000-0x142fff:E, 0x143000-0x143fff:E, 0x144000-0x144fff:E, 0x145000-0x145fff:E, 0x146000-0x146fff:E, 0x147000-0x147fff:E, 0x148000-0x148fff:E, 0x149000-0x149fff:E, 0x14a000-0x14afff:E, 0x14b000-0x14bfff:E, 0x14c000-0x14cfff:E, 0x14d000-0x14dfff:E, 0x14e000-0x14efff:E, 0x14f000-0x14ffff:E, 0x150000-0x150fff:E, 0x151000-0x151fff:E, 0x152000-0x152fff:E, 0x153000-0x153fff:E, 0x154000-0x154fff:E, 0x155000-0x155fff:E, 0x156000-0x156fff:E, 0x157000-0x157fff:E, 0x158000-0x158fff:E, 0x159000-0x159fff:E, 0x15a000-0x15afff:E, 0x15b000-0x15bfff:E, 0x15c000-0x15cfff:E, 0x15d000-0x15dfff:E, 0x15e000-0x15efff:E, 0x15f000-0x15ffff:E, 0x160000-0x160fff:E, 0x161000-0x161fff:E, 0x162000-0x162fff:E, 0x163000-0x163fff:E, 0x164000-0x164fff:E, 0x165000-0x165fff:E, 0x166000-0x166fff:E, 0x167000-0x167fff:E, 0x168000-0x168fff:E, 0x169000-0x169fff:E, 0x16a000-0x16afff:E, 0x16b000-0x16bfff:E, 0x16c000-0x16cfff:E, 0x16d000-0x16dfff:E, 0x16e000-0x16efff:E, 0x16f000-0x16ffff:E, 0x170000-0x170fff:E, 0x171000-0x171fff:E, 0x172000-0x172fff:E, 0x173000-0x173fff:E, 0x174000-0x174fff:E, 0x175000-0x175fff:E, 0x176000-0x176fff:E, 0x177000-0x177fff:E, 0x178000-0x178fff:E, 0x179000-0x179fff:E, 0x17a000-0x17afff:E, 0x17b000-0x17bfff:E, 0x17c000-0x17cfff:E, 0x17d000-0x17dfff:E, 0x17e000-0x17efff:E, 0x17f000-0x17ffff:E, 0x180000-0x180fff:E, 0x181000-0x181fff:E, 0x182000-0x182fff:E, 0x183000-0x183fff:E, 0x184000-0x184fff:E, 0x185000-0x185fff:E, 0x186000-0x186fff:E, 0x187000-0x187fff:E, 0x188000-0x188fff:E, 0x189000-0x189fff:E, 0x18a000-0x18afff:E, 0x18b000-0x18bfff:E, 0x18c000-0x18cfff:E, 0x18d000-0x18dfff:E, 0x18e000-0x18efff:E, 0x18f000-0x18ffff:E, 0x190000-0x190fff:E, 0x191000-0x191fff:E, 0x192000-0x192fff:E, 0x193000-0x193fff:E, 0x194000-0x194fff:E, 0x195000-0x195fff:E, 0x196000-0x196fff:E, 0x197000-0x197fff:E, 0x198000-0x198fff:E, 0x199000-0x199fff:E, 0x19a000-0x19afff:E, 0x19b000-0x19bfff:E, 0x19c000-0x19cfff:E, 0x19d000-0x19dfff:E, 0x19e000-0x19efff:E, 0x19f000-0x19ffff:E, 0x1a0000-0x1a0fff:S, 0x1a1000-0x1a1fff:S, 0x1a2000-0x1a2fff:S, 0x1a3000-0x1a3fff:S, 0x1a4000-0x1a4fff:S, 0x1a5000-0x1a5fff:S, 0x1a6000-0x1a6fff:S, 0x1a7000-0x1a7fff:S, 0x1a8000-0x1a8fff:S, 0x1a9000-0x1a9fff:S, 0x1aa000-0x1aafff:S, 0x1ab000-0x1abfff:S, 0x1ac000-0x1acfff:S, 0x1ad000-0x1adfff:S, 0x1ae000-0x1aefff:S, 0x1af000-0x1affff:S, 0x1b0000-0x1b0fff:S, 0x1b1000-0x1b1fff:S, 0x1b2000-0x1b2fff:S, 0x1b3000-0x1b3fff:S, 0x1b4000-0x1b4fff:S, 0x1b5000-0x1b5fff:S, 0x1b6000-0x1b6fff:S, 0x1b7000-0x1b7fff:S, 0x1b8000-0x1b8fff:S, 0x1b9000-0x1b9fff:S, 0x1ba000-0x1bafff:S, 0x1bb000-0x1bbfff:S, 0x1bc000-0x1bcfff:S, 0x1bd000-0x1bdfff:S, 0x1be000-0x1befff:S, 0x1bf000-0x1bffff:S, 0x1c0000-0x1c0fff:S, 0x1c1000-0x1c1fff:S, 0x1c2000-0x1c2fff:S, 0x1c3000-0x1c3fff:S, 0x1c4000-0x1c4fff:S, 0x1c5000-0x1c5fff:S, 0x1c6000-0x1c6fff:S, 0x1c7000-0x1c7fff:S, 0x1c8000-0x1c8fff:S, 0x1c9000-0x1c9fff:S, 0x1ca000-0x1cafff:S, 0x1cb000-0x1cbfff:S, 0x1cc000-0x1ccfff:S, 0x1cd000-0x1cdfff:S, 0x1ce000-0x1cefff:S, 0x1cf000-0x1cffff:S, 0x1d0000-0x1d0fff:S, 0x1d1000-0x1d1fff:S, 0x1d2000-0x1d2fff:S, 0x1d3000-0x1d3fff:S, 0x1d4000-0x1d4fff:S, 0x1d5000-0x1d5fff:S, 0x1d6000-0x1d6fff:S, 0x1d7000-0x1d7fff:S, 0x1d8000-0x1d8fff:S, 0x1d9000-0x1d9fff:S, 0x1da000-0x1dafff:S, 0x1db000-0x1dbfff:S, 0x1dc000-0x1dcfff:S, 0x1dd000-0x1ddfff:S, 0x1de000-0x1defff:S, 0x1df000-0x1dffff:S, 0x1e0000-0x1e0fff:S, 0x1e1000-0x1e1fff:S, 0x1e2000-0x1e2fff:S, 0x1e3000-0x1e3fff:S, 0x1e4000-0x1e4fff:S, 0x1e5000-0x1e5fff:S, 0x1e6000-0x1e6fff:S, 0x1e7000-0x1e7fff:S, 0x1e8000-0x1e8fff:S, 0x1e9000-0x1e9fff:S, 0x1ea000-0x1eafff:S, 0x1eb000-0x1ebfff:S, 0x1ec000-0x1ecfff:S, 0x1ed000-0x1edfff:S, 0x1ee000-0x1eefff:S, 0x1ef000-0x1effff:S, 0x1f0000-0x1f0fff:S, 0x1f1000-0x1f1fff:S, 0x1f2000-0x1f2fff:S, 0x1f3000-0x1f3fff:S, 0x1f4000-0x1f4fff:S, 0x1f5000-0x1f5fff:S, 0x1f6000-0x1f6fff:S, 0x1f7000-0x1f7fff:S, 0x1f8000-0x1f8fff:S, 0x1f9000-0x1f9fff:S, 0x1fa000-0x1fafff:S, 0x1fb000-0x1fbfff:S, 0x1fc000-0x1fcfff:S, 0x1fd000-0x1fdfff:S, 0x1fe000-0x1fefff:S, 0x1ff000-0x1fffff:S, 0x200000-0x200fff:S, 0x201000-0x201fff:S, 0x202000-0x202fff:S, 0x203000-0x203fff:S, 0x204000-0x204fff:S, 0x205000-0x205fff:S, 0x206000-0x206fff:S, 0x207000-0x207fff:S, 0x208000-0x208fff:S, 0x209000-0x209fff:S, 0x20a000-0x20afff:S, 0x20b000-0x20bfff:S, 0x20c000-0x20cfff:S, 0x20d000-0x20dfff:S, 0x20e000-0x20efff:S, 0x20f000-0x20ffff:S, 0x210000-0x210fff:S, 0x211000-0x211fff:S, 0x212000-0x212fff:S, 0x213000-0x213fff:S, 0x214000-0x214fff:S, 0x215000-0x215fff:S, 0x216000-0x216fff:E, 0x217000-0x217fff:S, 0x218000-0x218fff:S, 0x219000-0x219fff:S, 0x21a000-0x21afff:S, 0x21b000-0x21bfff:S, 0x21c000-0x21cfff:S, 0x21d000-0x21dfff:S, 0x21e000-0x21efff:S, 0x21f000-0x21ffff:S, 0x220000-0x220fff:S, 0x221000-0x221fff:S, 0x222000-0x222fff:S, 0x223000-0x223fff:S, 0x224000-0x224fff:S, 0x225000-0x225fff:S, 0x226000-0x226fff:S, 0x227000-0x227fff:S, 0x228000-0x228fff:S, 0x229000-0x229fff:S, 0x22a000-0x22afff:S, 0x22b000-0x22bfff:S, 0x22c000-0x22cfff:S, 0x22d000-0x22dfff:S, 0x22e000-0x22efff:S, 0x22f000-0x22ffff:S, 0x230000-0x230fff:S, 0x231000-0x231fff:S, 0x232000-0x232fff:S, 0x233000-0x233fff:S, 0x234000-0x234fff:S, 0x235000-0x235fff:S, 0x236000-0x236fff:S, 0x237000-0x237fff:S, 0x238000-0x238fff:S, 0x239000-0x239fff:S, 0x23a000-0x23afff:S, 0x23b000-0x23bfff:S, 0x23c000-0x23cfff:S, 0x23d000-0x23dfff:S, 0x23e000-0x23efff:S, 0x23f000-0x23ffff:S, 0x240000-0x240fff:S, 0x241000-0x241fff:S, 0x242000-0x242fff:S, 0x243000-0x243fff:S, 0x244000-0x244fff:S, 0x245000-0x245fff:S, 0x246000-0x246fff:S, 0x247000-0x247fff:S, 0x248000-0x248fff:S, 0x249000-0x249fff:S, 0x24a000-0x24afff:S, 0x24b000-0x24bfff:S, 0x24c000-0x24cfff:S, 0x24d000-0x24dfff:S, 0x24e000-0x24efff:S, 0x24f000-0x24ffff:S, 0x250000-0x250fff:S, 0x251000-0x251fff:S, 0x252000-0x252fff:S, 0x253000-0x253fff:S, 0x254000-0x254fff:S, 0x255000-0x255fff:S, 0x256000-0x256fff:S, 0x257000-0x257fff:S, 0x258000-0x258fff:S, 0x259000-0x259fff:S, 0x25a000-0x25afff:S, 0x25b000-0x25bfff:S, 0x25c000-0x25cfff:S, 0x25d000-0x25dfff:S, 0x25e000-0x25efff:S, 0x25f000-0x25ffff:S, 0x260000-0x260fff:S, 0x261000-0x261fff:S, 0x262000-0x262fff:S, 0x263000-0x263fff:S, 0x264000-0x264fff:S, 0x265000-0x265fff:S, 0x266000-0x266fff:S, 0x267000-0x267fff:S, 0x268000-0x268fff:S, 0x269000-0x269fff:S, 0x26a000-0x26afff:S, 0x26b000-0x26bfff:S, 0x26c000-0x26cfff:S, 0x26d000-0x26dfff:S, 0x26e000-0x26efff:S, 0x26f000-0x26ffff:S, 0x270000-0x270fff:S, 0x271000-0x271fff:S, 0x272000-0x272fff:S, 0x273000-0x273fff:S, 0x274000-0x274fff:S, 0x275000-0x275fff:S, 0x276000-0x276fff:S, 0x277000-0x277fff:S, 0x278000-0x278fff:S, 0x279000-0x279fff:S, 0x27a000-0x27afff:S, 0x27b000-0x27bfff:S, 0x27c000-0x27cfff:S, 0x27d000-0x27dfff:S, 0x27e000-0x27efff:S, 0x27f000-0x27ffff:S, 0x280000-0x280fff:S, 0x281000-0x281fff:S, 0x282000-0x282fff:S, 0x283000-0x283fff:S, 0x284000-0x284fff:S, 0x285000-0x285fff:S, 0x286000-0x286fff:S, 0x287000-0x287fff:S, 0x288000-0x288fff:S, 0x289000-0x289fff:S, 0x28a000-0x28afff:S, 0x28b000-0x28bfff:S, 0x28c000-0x28cfff:S, 0x28d000-0x28dfff:S, 0x28e000-0x28efff:S, 0x28f000-0x28ffff:S, 0x290000-0x290fff:S, 0x291000-0x291fff:S, 0x292000-0x292fff:S, 0x293000-0x293fff:S, 0x294000-0x294fff:S, 0x295000-0x295fff:S, 0x296000-0x296fff:S, 0x297000-0x297fff:S, 0x298000-0x298fff:S, 0x299000-0x299fff:S, 0x29a000-0x29afff:S, 0x29b000-0x29bfff:S, 0x29c000-0x29cfff:S, 0x29d000-0x29dfff:S, 0x29e000-0x29efff:S, 0x29f000-0x29ffff:S, 0x2a0000-0x2a0fff:S, 0x2a1000-0x2a1fff:S, 0x2a2000-0x2a2fff:S, 0x2a3000-0x2a3fff:S, 0x2a4000-0x2a4fff:S, 0x2a5000-0x2a5fff:S, 0x2a6000-0x2a6fff:S, 0x2a7000-0x2a7fff:S, 0x2a8000-0x2a8fff:S, 0x2a9000-0x2a9fff:S, 0x2aa000-0x2aafff:S, 0x2ab000-0x2abfff:S, 0x2ac000-0x2acfff:S, 0x2ad000-0x2adfff:S, 0x2ae000-0x2aefff:S, 0x2af000-0x2affff:S, 0x2b0000-0x2b0fff:S, 0x2b1000-0x2b1fff:S, 0x2b2000-0x2b2fff:S, 0x2b3000-0x2b3fff:S, 0x2b4000-0x2b4fff:S, 0x2b5000-0x2b5fff:S, 0x2b6000-0x2b6fff:S, 0x2b7000-0x2b7fff:S, 0x2b8000-0x2b8fff:S, 0x2b9000-0x2b9fff:S, 0x2ba000-0x2bafff:S, 0x2bb000-0x2bbfff:S, 0x2bc000-0x2bcfff:S, 0x2bd000-0x2bdfff:S, 0x2be000-0x2befff:S, 0x2bf000-0x2bffff:S, 0x2c0000-0x2c0fff:S, 0x2c1000-0x2c1fff:S, 0x2c2000-0x2c2fff:S, 0x2c3000-0x2c3fff:S, 0x2c4000-0x2c4fff:S, 0x2c5000-0x2c5fff:S, 0x2c6000-0x2c6fff:S, 0x2c7000-0x2c7fff:S, 0x2c8000-0x2c8fff:S, 0x2c9000-0x2c9fff:S, 0x2ca000-0x2cafff:S, 0x2cb000-0x2cbfff:S, 0x2cc000-0x2ccfff:S, 0x2cd000-0x2cdfff:S, 0x2ce000-0x2cefff:S, 0x2cf000-0x2cffff:S, 0x2d0000-0x2d0fff:S, 0x2d1000-0x2d1fff:S, 0x2d2000-0x2d2fff:S, 0x2d3000-0x2d3fff:S, 0x2d4000-0x2d4fff:S, 0x2d5000-0x2d5fff:S, 0x2d6000-0x2d6fff:S, 0x2d7000-0x2d7fff:S, 0x2d8000-0x2d8fff:S, 0x2d9000-0x2d9fff:S, 0x2da000-0x2dafff:S, 0x2db000-0x2dbfff:S, 0x2dc000-0x2dcfff:S, 0x2dd000-0x2ddfff:S, 0x2de000-0x2defff:S, 0x2df000-0x2dffff:S, 0x2e0000-0x2e0fff:S, 0x2e1000-0x2e1fff:S, 0x2e2000-0x2e2fff:S, 0x2e3000-0x2e3fff:S, 0x2e4000-0x2e4fff:S, 0x2e5000-0x2e5fff:S, 0x2e6000-0x2e6fff:S, 0x2e7000-0x2e7fff:S, 0x2e8000-0x2e8fff:S, 0x2e9000-0x2e9fff:S, 0x2ea000-0x2eafff:S, 0x2eb000-0x2ebfff:S, 0x2ec000-0x2ecfff:S, 0x2ed000-0x2edfff:S, 0x2ee000-0x2eefff:S, 0x2ef000-0x2effff:S, 0x2f0000-0x2f0fff:S, 0x2f1000-0x2f1fff:S, 0x2f2000-0x2f2fff:S, 0x2f3000-0x2f3fff:S, 0x2f4000-0x2f4fff:S, 0x2f5000-0x2f5fff:S, 0x2f6000-0x2f6fff:S, 0x2f7000-0x2f7fff:S, 0x2f8000-0x2f8fff:S, 0x2f9000-0x2f9fff:S, 0x2fa000-0x2fafff:S, 0x2fb000-0x2fbfff:S, 0x2fc000-0x2fcfff:S, 0x2fd000-0x2fdfff:S, 0x2fe000-0x2fefff:S, 0x2ff000-0x2fffff:S, 0x300000-0x300fff:S, 0x301000-0x301fff:S, 0x302000-0x302fff:S, 0x303000-0x303fff:S, 0x304000-0x304fff:S, 0x305000-0x305fff:S, 0x306000-0x306fff:S, 0x307000-0x307fff:S, 0x308000-0x308fff:S, 0x309000-0x309fff:S, 0x30a000-0x30afff:S, 0x30b000-0x30bfff:S, 0x30c000-0x30cfff:S, 0x30d000-0x30dfff:S, 0x30e000-0x30efff:S, 0x30f000-0x30ffff:S, 0x310000-0x310fff:S, 0x311000-0x311fff:S, 0x312000-0x312fff:S, 0x313000-0x313fff:S, 0x314000-0x314fff:S, 0x315000-0x315fff:S, 0x316000-0x316fff:S, 0x317000-0x317fff:S, 0x318000-0x318fff:S, 0x319000-0x319fff:S, 0x31a000-0x31afff:S, 0x31b000-0x31bfff:S, 0x31c000-0x31cfff:S, 0x31d000-0x31dfff:S, 0x31e000-0x31efff:S, 0x31f000-0x31ffff:S, 0x320000-0x320fff:S, 0x321000-0x321fff:S, 0x322000-0x322fff:S, 0x323000-0x323fff:S, 0x324000-0x324fff:S, 0x325000-0x325fff:S, 0x326000-0x326fff:S, 0x327000-0x327fff:S, 0x328000-0x328fff:S, 0x329000-0x329fff:S, 0x32a000-0x32afff:S, 0x32b000-0x32bfff:S, 0x32c000-0x32cfff:S, 0x32d000-0x32dfff:S, 0x32e000-0x32efff:S, 0x32f000-0x32ffff:S, 0x330000-0x330fff:S, 0x331000-0x331fff:S, 0x332000-0x332fff:S, 0x333000-0x333fff:S, 0x334000-0x334fff:S, 0x335000-0x335fff:S, 0x336000-0x336fff:S, 0x337000-0x337fff:S, 0x338000-0x338fff:S, 0x339000-0x339fff:S, 0x33a000-0x33afff:S, 0x33b000-0x33bfff:S, 0x33c000-0x33cfff:S, 0x33d000-0x33dfff:S, 0x33e000-0x33efff:S, 0x33f000-0x33ffff:S, 0x340000-0x340fff:S, 0x341000-0x341fff:S, 0x342000-0x342fff:S, 0x343000-0x343fff:S, 0x344000-0x344fff:S, 0x345000-0x345fff:S, 0x346000-0x346fff:S, 0x347000-0x347fff:S, 0x348000-0x348fff:S, 0x349000-0x349fff:S, 0x34a000-0x34afff:S, 0x34b000-0x34bfff:S, 0x34c000-0x34cfff:S, 0x34d000-0x34dfff:S, 0x34e000-0x34efff:S, 0x34f000-0x34ffff:S, 0x350000-0x350fff:S, 0x351000-0x351fff:S, 0x352000-0x352fff:S, 0x353000-0x353fff:S, 0x354000-0x354fff:S, 0x355000-0x355fff:S, 0x356000-0x356fff:S, 0x357000-0x357fff:S, 0x358000-0x358fff:S, 0x359000-0x359fff:S, 0x35a000-0x35afff:S, 0x35b000-0x35bfff:S, 0x35c000-0x35cfff:S, 0x35d000-0x35dfff:S, 0x35e000-0x35efff:S, 0x35f000-0x35ffff:S, 0x360000-0x360fff:S, 0x361000-0x361fff:S, 0x362000-0x362fff:S, 0x363000-0x363fff:S, 0x364000-0x364fff:S, 0x365000-0x365fff:S, 0x366000-0x366fff:S, 0x367000-0x367fff:S, 0x368000-0x368fff:S, 0x369000-0x369fff:S, 0x36a000-0x36afff:S, 0x36b000-0x36bfff:S, 0x36c000-0x36cfff:S, 0x36d000-0x36dfff:S, 0x36e000-0x36efff:S, 0x36f000-0x36ffff:S, 0x370000-0x370fff:E, 0x371000-0x371fff:E, 0x372000-0x372fff:E, 0x373000-0x373fff:E, 0x374000-0x374fff:E, 0x375000-0x375fff:E, 0x376000-0x376fff:E, 0x377000-0x377fff:E, 0x378000-0x378fff:E, 0x379000-0x379fff:E, 0x37a000-0x37afff:E, 0x37b000-0x37bfff:E, 0x37c000-0x37cfff:E, 0x37d000-0x37dfff:E, 0x37e000-0x37efff:E, 0x37f000-0x37ffff:E, 0x380000-0x380fff:E, 0x381000-0x381fff:E, 0x382000-0x382fff:E, 0x383000-0x383fff:E, 0x384000-0x384fff:E, 0x385000-0x385fff:E, 0x386000-0x386fff:E, 0x387000-0x387fff:E, 0x388000-0x388fff:E, 0x389000-0x389fff:E, 0x38a000-0x38afff:E, 0x38b000-0x38bfff:E, 0x38c000-0x38cfff:E, 0x38d000-0x38dfff:E, 0x38e000-0x38efff:E, 0x38f000-0x38ffff:E, 0x390000-0x390fff:E, 0x391000-0x391fff:E, 0x392000-0x392fff:E, 0x393000-0x393fff:E, 0x394000-0x394fff:E, 0x395000-0x395fff:E, 0x396000-0x396fff:E, 0x397000-0x397fff:E, 0x398000-0x398fff:E, 0x399000-0x399fff:E, 0x39a000-0x39afff:E, 0x39b000-0x39bfff:E, 0x39c000-0x39cfff:E, 0x39d000-0x39dfff:E, 0x39e000-0x39efff:E, 0x39f000-0x39ffff:E, 0x3a0000-0x3a0fff:E, 0x3a1000-0x3a1fff:E, 0x3a2000-0x3a2fff:E, 0x3a3000-0x3a3fff:E, 0x3a4000-0x3a4fff:E, 0x3a5000-0x3a5fff:E, 0x3a6000-0x3a6fff:E, 0x3a7000-0x3a7fff:E, 0x3a8000-0x3a8fff:E, 0x3a9000-0x3a9fff:E, 0x3aa000-0x3aafff:E, 0x3ab000-0x3abfff:E, 0x3ac000-0x3acfff:E, 0x3ad000-0x3adfff:E, 0x3ae000-0x3aefff:E, 0x3af000-0x3affff:E, 0x3b0000-0x3b0fff:E, 0x3b1000-0x3b1fff:E, 0x3b2000-0x3b2fff:E, 0x3b3000-0x3b3fff:E, 0x3b4000-0x3b4fff:E, 0x3b5000-0x3b5fff:E, 0x3b6000-0x3b6fff:E, 0x3b7000-0x3b7fff:E, 0x3b8000-0x3b8fff:E, 0x3b9000-0x3b9fff:E, 0x3ba000-0x3bafff:E, 0x3bb000-0x3bbfff:E, 0x3bc000-0x3bcfff:E, 0x3bd000-0x3bdfff:E, 0x3be000-0x3befff:E, 0x3bf000-0x3bffff:E, 0x3c0000-0x3c0fff:E, 0x3c1000-0x3c1fff:E, 0x3c2000-0x3c2fff:E, 0x3c3000-0x3c3fff:E, 0x3c4000-0x3c4fff:E, 0x3c5000-0x3c5fff:E, 0x3c6000-0x3c6fff:E, 0x3c7000-0x3c7fff:E, 0x3c8000-0x3c8fff:E, 0x3c9000-0x3c9fff:E, 0x3ca000-0x3cafff:E, 0x3cb000-0x3cbfff:E, 0x3cc000-0x3ccfff:E, 0x3cd000-0x3cdfff:E, 0x3ce000-0x3cefff:E, 0x3cf000-0x3cffff:E, 0x3d0000-0x3d0fff:E, 0x3d1000-0x3d1fff:S, 0x3d2000-0x3d2fff:S, 0x3d3000-0x3d3fff:S, 0x3d4000-0x3d4fff:S, 0x3d5000-0x3d5fff:S, 0x3d6000-0x3d6fff:S, 0x3d7000-0x3d7fff:S, 0x3d8000-0x3d8fff:S, 0x3d9000-0x3d9fff:S, 0x3da000-0x3dafff:S, 0x3db000-0x3dbfff:S, 0x3dc000-0x3dcfff:S, 0x3dd000-0x3ddfff:S, 0x3de000-0x3defff:S, 0x3df000-0x3dffff:S, 0x3e0000-0x3e0fff:S, 0x3e1000-0x3e1fff:S, 0x3e2000-0x3e2fff:S, 0x3e3000-0x3e3fff:S, 0x3e4000-0x3e4fff:S, 0x3e5000-0x3e5fff:S, 0x3e6000-0x3e6fff:S, 0x3e7000-0x3e7fff:S, 0x3e8000-0x3e8fff:S, 0x3e9000-0x3e9fff:S, 0x3ea000-0x3eafff:S, 0x3eb000-0x3ebfff:S, 0x3ec000-0x3ecfff:S, 0x3ed000-0x3edfff:S, 0x3ee000-0x3eefff:S, 0x3ef000-0x3effff:W, 0x3f0000-0x3f0fff:S, 0x3f1000-0x3f1fff:S, 0x3f2000-0x3f2fff:S, 0x3f3000-0x3f3fff:S, 0x3f4000-0x3f4fff:S, 0x3f5000-0x3f5fff:S, 0x3f6000-0x3f6fff:S, 0x3f7000-0x3f7fff:S, 0x3f8000-0x3f8fff:W, 0x3f9000-0x3f9fff:S, 0x3fa000-0x3fafff:S, 0x3fb000-0x3fbfff:S, 0x3fc000-0x3fcfff:S, 0x3fd000-0x3fdfff:E, 0x3fe000-0x3fefff:E, 0x3ff000-0x3fffff:EW
Erase/write done.
Verifying flash... VERIFIED.          

EC SIO is at 0x16e
EC MBOX is at 0x3e
(IMC resume failed!)
Stefan Tauner - 2013-03-28 16:52:55
On Thu, 28 Mar 2013 16:36:02 +0000
"Racine, Michel" <michel.racine@hp.com> wrote:

> I will resume testing shortly. I can add that it works if I connect the DediProg emulator, and I let flashrom reprogram the emulator (instead of the onboard rom memory). I need to reprogram the onboard memory before I can do a definitive test of flashrom (I cannot boot at the moment without the emulator). This will take me a few days to get my hands on an in-circuit programmer. Attached is the output when flashrom reprograms the emulator.

What's different between this time now and the last time were flashrom
could not shutdown the IMC? Was the hardware setup equal or did
something change? Apparently it worked as it should this time, so this
does not help us debug any issue if there is one.

> PS: about the compile issue; don't worry about it. If the main repro is fine, ignore my issue.

I care because maybe there were other problems with applying the
changes or even something more severe that influence the testing.
Racine, Michel - 2013-03-28 17:10:45
Hi Stefan,

Here's how I applied the path to the latest source. In the flashrom directory, I copied the patch file, and simply did: patch < a.patch
It completed without complaints.
I then do a make clean, then a make.

Unfortunately, I cannot be sure about why it failed yesterday. I may have made a mistake, and turned off the emulator from the PC before running flashrom. That's why I retried today, and flashrom was able to access the emulator as expected.

Other thoughts?

Thanks,
Michel.

-----Original Message-----
From: Stefan Tauner [mailto:stefan.tauner@student.tuwien.ac.at] 

Sent: Thursday, March 28, 2013 10:53 AM
To: Racine, Michel
Cc: flashrom@flashrom.org; Rudolf Marek
Subject: Re: [flashrom] AMD - SP5100 - take SPI ownership (1/2)

On Thu, 28 Mar 2013 16:36:02 +0000
"Racine, Michel" <michel.racine@hp.com> wrote:

> I will resume testing shortly. I can add that it works if I connect the DediProg emulator, and I let flashrom reprogram the emulator (instead of the onboard rom memory). I need to reprogram the onboard memory before I can do a definitive test of flashrom (I cannot boot at the moment without the emulator). This will take me a few days to get my hands on an in-circuit programmer. Attached is the output when flashrom reprograms the emulator.


What's different between this time now and the last time were flashrom could not shutdown the IMC? Was the hardware setup equal or did something change? Apparently it worked as it should this time, so this does not help us debug any issue if there is one.


> PS: about the compile issue; don't worry about it. If the main repro is fine, ignore my issue.


I care because maybe there were other problems with applying the changes or even something more severe that influence the testing.
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
Rudolf Marek - 2013-03-30 09:54:13
Hi,

Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash 
write...
EC SIO is at 0x16e
EC MBOX is at 0x3e
(Shutting down IMC)
SPI base address is at 0xfec10000

This means that firmware correctly responded to the command and most likely 
moved itself to internal RAM.

Verifying flash... VERIFIED.

EC SIO is at 0x16e
EC MBOX is at 0x3e
(IMC resume failed!)

This means that firmware was not able to continue at the end?

I have a couple of questions:

1) did you perform full power cycle (even unplugging the PSU)?

I suspect that the IMC may run even if main cpu is off. I also suspect it fully 
initializes only if performing this "cold boot".

2) what was the update? It was from original BIOS to coreboot? Does coreboot 
have a embedded IMC image? Does the IMC image start at the same location?

What we could  additionally check is if the IMC firmware location does not match 
in source and dest image, bail out. Or if the base addr has been changed.

Thanks
Rudolf
Racine, Michel - 2013-04-02 18:26:15
Hello Rudolf,

Here's more information; this email is quite lengthy. Please let me know how you would like to proceed. I should be getting my own SF100 soon, so my turn-around will be faster.

---

Using a DediProg SF100 in system programmer to unbrick; reprogram with previous AMI (original BIOS on the AMD board).
NOTE:
    Needed to tell programmer software to auto-unprotect protected blocks before programming.
Boot is Ok. Poweroff, reboot

---

Using flashrom (with IMC patch), flash coreboot base build for AMD Persimmon board.
Passes verifying flash; but IMC resume failed.
Poweroff - doesn't fully power off. Stops with "Power down."; manual poweroff

---

Reboot system, and able to ssh into system; no VGA from the board itself.
No VGA is expected because I did not add a vBios to the coreboot image.

---

Trying to flash back the AMI original bios; fails with:

root@debian:~# ./flashrom_imcpatch -p internal -w AMI.rom
flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
coreboot table found at 0xc717d000.
Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... (Shutting down IMC failed!)
FAILED!
FATAL ERROR!
Error: Programmer initialization failed.

---

Power off, unplug board power supply, moving both jumpers (JP12, JP13 on pin 2-3) for 30 seconds to clear CMOS settings.
Reboot; Retry flashrom AMI; outputs:

root@debian:~# ./flashrom_imcpatch -p internal -w AMI.rom
flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
coreboot table found at 0xc717d000.
Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... OK.
Found SST flash chip "SST25VF032B" (4096 kB, SPI) at physical address 0xffc00000                                                             .
Flash image seems to be a legacy BIOS. Disabling coreboot-related checks.
Reading old flash chip contents... done.
Erasing and writing flash chip... ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00000fff: 0x200
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000008! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00007fff: 0xfff
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000008! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x1fff
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000008! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x7ffff
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x80000
ERASE FAILED!
FAILED!
Uh oh. Erase/write failed. Checking if anything changed.
Your flash chip is in an unknown state.
Get help on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org with the subject "FAILED: <your board name>"!
-------------------------------------------------------------------------------
DO NOT REBOOT OR POWEROFF!

---

Try again:

root@debian:~# ./flashrom_imcpatch -p internal -w AMI.rom
flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
coreboot table found at 0xc717d000.
Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... OK.
Found SST flash chip "SST25VF032B" (4096 kB, SPI) at physical address 0xffc00000.
Flash image seems to be a legacy BIOS. Disabling coreboot-related checks.
Reading old flash chip contents... done.
Erasing and writing flash chip... ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00000fff: 0x200
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00007fff: 0x1000
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x2000
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x80000
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x80000
ERASE FAILED!
FAILED!
Uh oh. Erase/write failed. Checking if anything changed.
Good. It seems nothing was changed.
Writing to the flash chip apparently didn't do anything.
This means we have to add special support for your board, programmer or flash chip.
Please report this on IRC at irc.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org!
-------------------------------------------------------------------------------
You may now reboot or simply leave the machine running.

---

Strongly suspect bricked.
Now trying (note, no mention of IMC):

root@debian:~# ./flashrom_imcpatch -p internal
flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
coreboot table found at 0xc717d000.
Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... OK.
Found SST flash chip "SST25VF032B" (4096 kB, SPI) at physical address 0xffc00000.
No operations were specified.

---

Trying erase:

root@debian:~# ./flashrom_imcpatch -p internal --erase
flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
flashrom is free software, get the source code at http://www.flashrom.org

Calibrating delay loop... OK.
coreboot table found at 0xc717d000.
Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... OK.
Found SST flash chip "SST25VF032B" (4096 kB, SPI) at physical address 0xffc00000.
Erasing and writing flash chip... ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00000fff: 0x200
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00007fff: 0x1000
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x2000
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x80000
ERASE FAILED!
Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x80000
ERASE FAILED!
FAILED!
Your flash chip is in an unknown state.
Get help on IRC at chat.freenode.net (channel #flashrom) or
mail flashrom@flashrom.org with the subject "FAILED: <your board name>"!
-------------------------------------------------------------------------------
DO NOT REBOOT OR POWEROFF!

---

Try reboot; nothing
Manual poweroff, unplug jumpers and power supply for 30 seconds
Power on
Nothing

---

Cheers,
Michel.


-----Original Message-----
From: Rudolf Marek [mailto:r.marek@assembler.cz] 
Sent: Saturday, March 30, 2013 3:54 AM
To: Racine, Michel
Cc: Stefan Tauner; roxfan; frederic.temporelli@bull.net; wmkamp@datakamp.de; flashrom@flashrom.org
Subject: Re: [flashrom] AMD - SP5100 - take SPI ownership (1/2)

Hi,

Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write...
EC SIO is at 0x16e
EC MBOX is at 0x3e
(Shutting down IMC)
SPI base address is at 0xfec10000

This means that firmware correctly responded to the command and most likely moved itself to internal RAM.

Verifying flash... VERIFIED.

EC SIO is at 0x16e
EC MBOX is at 0x3e
(IMC resume failed!)

This means that firmware was not able to continue at the end?

I have a couple of questions:

1) did you perform full power cycle (even unplugging the PSU)?

I suspect that the IMC may run even if main cpu is off. I also suspect it fully initializes only if performing this "cold boot".

2) what was the update? It was from original BIOS to coreboot? Does coreboot have a embedded IMC image? Does the IMC image start at the same location?

What we could  additionally check is if the IMC firmware location does not match in source and dest image, bail out. Or if the base addr has been changed.

Thanks
Rudolf
Rudolf Marek - 2013-04-02 22:35:09
Hi All



 > Using flashrom (with IMC patch), flash coreboot base build for AMD Persimmon 
 > board.
> Passes verifying flash; but IMC resume failed.
> Poweroff - doesn't fully power off. Stops with "Power down."; manual poweroff

I guess because coreboot does not provide any IMC firmware here.

>
> ---
>
> Reboot system, and able to ssh into system; no VGA from the board itself.
> No VGA is expected because I did not add a vBios to the coreboot image.
>
> ---
>
> Trying to flash back the AMI original bios; fails with:
>
> root@debian:~# ./flashrom_imcpatch -p internal -w AMI.rom
> flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
> flashrom is free software, get the source code at http://www.flashrom.org
>
> Calibrating delay loop... OK.
> coreboot table found at 0xc717d000.
> Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... (Shutting down IMC failed!)
> FAILED!
> FATAL ERROR!
> Error: Programmer initialization failed.

Here I guess the bit which is telling that IMC is active survived reboot.

> ---
>
> Power off, unplug board power supply, moving both jumpers (JP12, JP13 on pin 2-3) for 30 seconds to clear CMOS settings.
> Reboot; Retry flashrom AMI; outputs:
>
> root@debian:~# ./flashrom_imcpatch -p internal -w AMI.rom
> flashrom v0.9.6.1-r1564 on Linux 2.6.32-5-686 (i686)
> flashrom is free software, get the source code at http://www.flashrom.org
>
> Calibrating delay loop... OK.
> coreboot table found at 0xc717d000.
> Found chipset "AMD SB7x0/SB8x0/SB9x0". Enabling flash write... OK.

This confirms that IMC is "dead" here, there is no MBOX interface no bit which 
tells if IMC is active.

> Found SST flash chip "SST25VF032B" (4096 kB, SPI) at physical address 0xffc00000                                                             .
> Flash image seems to be a legacy BIOS. Disabling coreboot-related checks.
> Reading old flash chip contents... done.
> Erasing and writing flash chip... ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00000fff: 0x200
> ERASE FAILED!
> Reading current flash chip contents... done. ERASE FAILED at 0x00000008! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x00007fff: 0xfff
> ERASE FAILED!
> Reading current flash chip contents... done. ERASE FAILED at 0x00000008! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x0000ffff: 0x1fff
> ERASE FAILED!
> Reading current flash chip contents... done. ERASE FAILED at 0x00000008! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x7ffff
> ERASE FAILED!
> Reading current flash chip contents... done. ERASE FAILED at 0x00000000! Expected=0xff, Read=0x7f, failed byte count from 0x00000000-0x003fffff: 0x80000
> ERASE FAILED!


I admit this is strange. The only explanation is that the IMC tries to run 
non-existing stuff. So it in fact tries to execute something and there is no way 
it could tell us that it is active. Not sure what to do here. I know there is 
some soft strap override but I dont know if current strap can be read to detect 
if IMC is enabled but actually not doing anything.

Maybe this is getChipSysMode() in CIMX.

> Power on
> Nothing
>

Yes because it erased most of the flash ;)

So... This is going to be complicated. Can you please send me in private both 
images? Or paste URL where i can get ami bios image.

I will check if IMC firmware is there or not (I guess none in coreboot). What we 
could possibly do is to re-add a firmware to coreboot image. But we would have 
to override the straps and activate the imc. There is also 
BuildParameters.ImcEnableOverWrite in SB800 CIMX.

What is your goal here anyway? To have smooth transition to coreboot? Or you 
just reported this issue?

I guess we need to implement some safety checks that if IMC strap is always 
enabled then IMC firmware must exist and ideally be same as in flash.

But first we need to know what CIMX is doing.

if
1) EC is disabled and it is re-enabled by soft strap

This seems not to be the case, because

   if (validateImcFirmware (pConfig)) {
       softwareToggleImcStrapping (pConfig);

It will enable the IMC only if valid firmware is found. And for CIMX800 we are 
not doing this, only hudson has AMD firmware.

2) if it is enabled by some hardware strap

This could be detected most likely by getChipSysMode() in this case we need to 
disallow write of firmware which has no IMC code. Here are couple of problems, 
what to do if firmware is there, but different for example... Or with coreboot 
may happen it is on different location. Franly I don't know how to deal with 
that because for this I would need detailed knowledge of the firmware itself. I 
only disassembled that and I can see it just spins in memory when 0xb4 is 
invoked and waits for 0xb5 (and I have seen sometimes for 0xb6)

And this gets worse because Hudson has USB firmware and Gigabit ethernet 
firmware. Which are are same PITA.

Thanks
Rudolf

> ---
>
> Cheers,
> Michel.
>
>
> -----Original Message-----
> From: Rudolf Marek [mailto:r.marek@assembler.cz]
> Sent: Saturday, March 30, 2013 3:54 AM
> To: Racine, Michel
> Cc: Stefan Tauner; roxfan; frederic.temporelli@bull.net; wmkamp@datakamp.de; flashrom@flashrom.org
> Subject: Re: [flashrom] AMD - SP5100 - take SPI ownership (1/2)
>
> Hi,
>
> Found chipset "AMD SB7x0/SB8x0/SB9x0" with PCI ID 1002:439d. Enabling flash write...
> EC SIO is at 0x16e
> EC MBOX is at 0x3e
> (Shutting down IMC)
> SPI base address is at 0xfec10000
>
> This means that firmware correctly responded to the command and most likely moved itself to internal RAM.
>
> Verifying flash... VERIFIED.
>
> EC SIO is at 0x16e
> EC MBOX is at 0x3e
> (IMC resume failed!)
>
> This means that firmware was not able to continue at the end?
>
> I have a couple of questions:
>
> 1) did you perform full power cycle (even unplugging the PSU)?
>
> I suspect that the IMC may run even if main cpu is off. I also suspect it fully initializes only if performing this "cold boot".
>
> 2) what was the update? It was from original BIOS to coreboot? Does coreboot have a embedded IMC image? Does the IMC image start at the same location?
>
> What we could  additionally check is if the IMC firmware location does not match in source and dest image, bail out. Or if the base addr has been changed.
>
> Thanks
> Rudolf
>
Racine, Michel - 2013-04-03 19:09:11
Hi Rudolf,

The goal of these tests is to try to help you guys a bit. Eventually, our solution will use coreboot, or a derivative. The tool flashrom seems like a good option for us to upgrade BIOS in the field. I'll be happy to assist if I can, at least provide test feedback.

I will send to you directly the 2 roms I was using.

Cheers,
Michel.
Ward Vandewege - 2013-05-07 18:14:47
Hi Rudolf,

On Tue, Mar 26, 2013 at 04:36:25PM +0100, Rudolf Marek wrote:
> I tried with IMC activated on coreboot (Hudson chipset) and it works
> as expected. Attached patch only tweaks messages and removes now
> redundant check from sb600 SPI. If IMC is active and firmware
> handoff fails, then it exits with fatal error.

I've tested this patch against flashrom v0.9.6.1-r1673 on a Supermicro
H8DGi-F board.

It works as expected. Without it, flashrom errors out complaining about SB600
FIFO pointer corruption.

With your patch (http://patchwork.coreboot.org/patch/3894/), I was able to
read *and* write the rom chip succesfully.

> Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

> It would be nice if someone else could test this (and dont forget to
> be able to recover from bad flash)

Acked-by: Ward Vandewege <ward@gnu.org>

Thanks,
Ward.
Ward Vandewege - 2013-05-24 18:54:58
Hi all,

On Tue, May 07, 2013 at 02:14:47PM -0400, Ward Vandewege wrote:
> On Tue, Mar 26, 2013 at 04:36:25PM +0100, Rudolf Marek wrote:
> > I tried with IMC activated on coreboot (Hudson chipset) and it works
> > as expected. Attached patch only tweaks messages and removes now
> > redundant check from sb600 SPI. If IMC is active and firmware
> > handoff fails, then it exits with fatal error.
> 
> I've tested this patch against flashrom v0.9.6.1-r1673 on a Supermicro
> H8DGi-F board.
> 
> It works as expected. Without it, flashrom errors out complaining about SB600
> FIFO pointer corruption.
> 
> With your patch (http://patchwork.coreboot.org/patch/3894/), I was able to
> read *and* write the rom chip succesfully.

I've now also tested this patch (read, write, verify) on a Supermicro H8SCM
board. It works as expected, and without it, Flashrom is useless.

> > Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
> 
> > It would be nice if someone else could test this (and dont forget to
> > be able to recover from bad flash)
> 
> Acked-by: Ward Vandewege <ward@gnu.org>

Can we please get this patch merged?

Thanks,
Ward.
Stefan Tauner - 2013-06-01 11:39:03
On Wed, 03 Apr 2013 00:35:09 +0200
Rudolf Marek <r.marek@assembler.cz> wrote:

> So... This is going to be complicated. Can you please send me in private both 
> images? Or paste URL where i can get ami bios image.
> 
> I will check if IMC firmware is there or not (I guess none in coreboot). What we 
> could possibly do is to re-add a firmware to coreboot image. But we would have 
> to override the straps and activate the imc. There is also 
> BuildParameters.ImcEnableOverWrite in SB800 CIMX.
> 
> What is your goal here anyway? To have smooth transition to coreboot? Or you 
> just reported this issue?
> 
> I guess we need to implement some safety checks that if IMC strap is always 
> enabled then IMC firmware must exist and ideally be same as in flash.
> 
> But first we need to know what CIMX is doing.
> 
> if
> 1) EC is disabled and it is re-enabled by soft strap
> 
> This seems not to be the case, because
> 
>    if (validateImcFirmware (pConfig)) {
>        softwareToggleImcStrapping (pConfig);
> 
> It will enable the IMC only if valid firmware is found. And for CIMX800 we are 
> not doing this, only hudson has AMD firmware.
> 
> 2) if it is enabled by some hardware strap
> 
> This could be detected most likely by getChipSysMode() in this case we need to 
> disallow write of firmware which has no IMC code. Here are couple of problems, 
> what to do if firmware is there, but different for example... Or with coreboot 
> may happen it is on different location. Franly I don't know how to deal with 
> that because for this I would need detailed knowledge of the firmware itself. I 
> only disassembled that and I can see it just spins in memory when 0xb4 is 
> invoked and waits for 0xb5 (and I have seen sometimes for 0xb6)
> 
> And this gets worse because Hudson has USB firmware and Gigabit ethernet 
> firmware. Which are are same PITA.

I am not completely sure if I understood everything you wrote, but all
of that is only relevant for "wrong" images, right? So the current
patch* does improve the overall usability of flashrom on AMD boards and
only users that try to move from an image with active IMC to an image
w/o or improper IMC firmware will run into problems?

http://patchwork.coreboot.org/patch/3894/

Patch

Index: Makefile
===================================================================
--- Makefile	(revision 1657)
+++ Makefile	(working copy)
@@ -417,7 +417,7 @@ 
 FEATURE_CFLAGS += -D'CONFIG_INTERNAL=1'
 PROGRAMMER_OBJS += processor_enable.o chipset_enable.o board_enable.o cbtable.o dmi.o internal.o
 ifeq ($(ARCH), x86)
-PROGRAMMER_OBJS += it87spi.o it85spi.o sb600spi.o wbsio_spi.o mcp6x_spi.o
+PROGRAMMER_OBJS += it87spi.o it85spi.o sb600spi.o imc.o wbsio_spi.o mcp6x_spi.o
 PROGRAMMER_OBJS += ichspi.o ich_descriptors.o
 else
 endif
Index: imc.c
===================================================================
--- imc.c	(revision 0)
+++ imc.c	(revision 0)
@@ -0,0 +1,170 @@ 
+/*
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2013 Rudolf Marek <r.marek@assembler.cz>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+#if defined(__i386__) || defined(__x86_64__)
+
+#include "flash.h"
+#include "programmer.h"
+#include "hwaccess.h"
+#include "spi.h"
+
+/* same as serverengines */
+static void enter_conf_mode_ec(uint16_t port)
+{
+	outb(0x5a, port);
+}
+
+static void exit_conf_mode_ec(uint16_t port)
+{
+	outb(0xa5, port);
+}
+
+static uint16_t get_sio_port(struct pci_dev *dev)
+{
+	uint16_t ec_port;
+
+	if (!dev) {
+		return 0;
+	}
+
+	if (!(pci_read_byte(dev, 0x40) & (1 << 7)))
+		return 0;
+
+	ec_port = pci_read_word(dev, 0xa4);
+
+	if (!(ec_port & 0x1))
+		return 0;
+
+	ec_port &= ~0x1;
+
+	return ec_port;
+}
+
+
+static void write_data(uint16_t port, uint8_t off, uint8_t data)
+{
+	outb(off, port);
+	outb(data, port + 1);
+}
+
+static uint8_t read_data(uint16_t port, uint8_t off)
+{
+	outb(off, port);
+	return inb(port + 1);
+}
+
+
+static uint16_t get_mbox_port(uint16_t sio_port)
+{
+	uint16_t mbox_port;
+
+	enter_conf_mode_ec(sio_port);
+
+	/* go to LDN 9, mailbox */
+	write_data(sio_port, 7, 9);
+
+	/* MBOX not active ? */
+	if (!(read_data(sio_port, 0x30) & 1)) {
+		exit_conf_mode_ec(sio_port);
+		return 0;
+	}
+
+	mbox_port = read_data(sio_port, 0x60) << 8;
+	mbox_port |= read_data(sio_port, 0x61);
+
+	exit_conf_mode_ec(sio_port);
+	return mbox_port;
+}
+
+static int mbox_wait_ack(uint16_t mbox_port)
+{
+	int i;
+
+	for (i = 0; i < 10; i++) {
+		/* sleep 1ms */
+		programmer_delay(1000);
+		if (read_data(mbox_port, 0x82) == 0xfa) {
+			return 0;
+		}
+	}
+	msg_pwarn("IMC MBOX: Timeout!\n");
+	return 1;
+
+}
+
+static int send_cmd(uint16_t mbox_port, uint8_t cmd)
+{
+	write_data(mbox_port, 0x82, 0x0);
+	write_data(mbox_port, 0x83, cmd);
+	/* trigger transfer 0x96 with subcommand cmd */
+	write_data(mbox_port, 0x80, 0x96);
+
+	return mbox_wait_ack(mbox_port);
+}
+
+static int imc_cmd(struct pci_dev *dev, uint8_t cmd)
+{
+	uint16_t sio_port;
+	uint16_t mbox_port;
+	sio_port = get_sio_port(dev);
+
+	if (!sio_port)
+		return -1;
+
+	msg_pdbg("\nEC SIO is at 0x%x\n", sio_port);
+
+	mbox_port = get_mbox_port(sio_port);
+
+	if (!mbox_port)
+		return -1;
+
+	msg_pdbg("EC MBOX is at 0x%x\n", mbox_port);
+
+	/* put IMC to sleep */
+	return send_cmd(mbox_port, cmd);
+}
+
+static int imc_try_resume(void *data)
+{
+	struct pci_dev *dev = data;
+	int ret = imc_cmd(dev, 0xb5);
+
+	msg_pinfo("(IMC resume%s)\n", ret ? " failed!" : "d");
+	return ret;
+}
+
+int imc_try_shutdown(struct pci_dev *dev)
+{
+	int ret = imc_cmd(dev, 0xb4);
+
+	/* No IMC active, fake OK */
+	if (ret < 0)
+		return 0;
+
+	msg_pinfo("(Shutting down IMC%s)\n", ret ? " failed!" : "");
+
+	/* restore IMC on exit */
+	if ((!ret) && (register_shutdown(imc_try_resume, dev)))
+		return 1;
+
+	return ret;
+}
+
+#endif
\ No newline at end of file
Index: chipset_enable.c
===================================================================
--- chipset_enable.c	(revision 1657)
+++ chipset_enable.c	(working copy)
@@ -922,6 +922,10 @@ 
 	uint8_t reg;
 	int ret;
 
+	if (imc_try_shutdown(dev)) {
+		return ERROR_FATAL;
+	}
+
 	/* Clear ROM protect 0-3. */
 	for (reg = 0x50; reg < 0x60; reg += 4) {
 		prot = pci_read_long(dev, reg);
Index: sb600spi.c
===================================================================
--- sb600spi.c	(revision 1657)
+++ sb600spi.c	(working copy)
@@ -301,21 +301,6 @@ 
 
 	reg = pci_read_byte(dev, 0x40);
 	msg_pdbg("SB700 IMC is %sactive.\n", (reg & (1 << 7)) ? "" : "not ");
-	if (reg & (1 << 7)) {
-		/* If we touch any region used by the IMC, the IMC and the SPI
-		 * interface will lock up, and the only way to recover is a
-		 * hard reset, but that is a bad choice for a half-erased or
-		 * half-written flash chip.
-		 * There appears to be an undocumented register which can freeze
-		 * or disable the IMC, but for now we want to play it safe.
-		 */
-		msg_perr("The SB700 IMC is active and may interfere with SPI "
-			 "commands. Disabling write.\n");
-		/* FIXME: Should we only disable SPI writes, or will the lockup
-		 * affect LPC/FWH chips as well?
-		 */
-		programmer_may_write = 0;
-	}
 
 	/* Bring the FIFO to a clean state. */
 	reset_internal_fifo_pointer();
Index: programmer.h
===================================================================
--- programmer.h	(revision 1657)
+++ programmer.h	(working copy)
@@ -559,6 +559,9 @@ 
 		 enum ich_chipset ich_generation);
 int via_init_spi(struct pci_dev *dev, uint32_t mmio_base);
 
+/* imc.c */
+int imc_try_shutdown(struct pci_dev *dev);
+
 /* it85spi.c */
 int it85xx_spi_init(struct superio s);