On Mon, Jun 03, 2019 at 05:27:52PM -0000, Stuart Henderson wrote:
> On 2019-06-02, Артур Истомин <art.is...@yandex.ru> wrote:
> > I'm trying update BIOS on alix2d13 board with flashrom ver 1.0 on OpenBSD 
> > 6.5
> >
> > # flashrom -w alix1.bin -p internal
> > flashrom v1.0 on OpenBSD 6.5 (i386)
> > flashrom is free software, get the source code at https://flashrom.org
> >
> > Calibrating delay loop... delay loop is unreliable, trying to continue OK.
> > No DMI table found.
> > Found chipset "AMD CS5536".
> > Enabling flash write... Error while opening /dev/amdmsr: Device not 
> > configured
> > FAILED!
> > Warning: unexpected second chipset match: "AMD CS5536"
> > ignoring, please report lspci and board URL to flash...@flashrom.org
> > with 'CHIPSET: your board name' in the subject line.
> > No EEPROM/flash device found.
> > Note: flashrom can never write if the flash chip isn't found automatically.
> > 
> > What's wrong?
> 
> Looks like this flash device can only be programmed with model-specific
> registers (MSRs). On OpenBSD this is done via amdmsr(4) which requires
> 2 things: 1: it must be detected and attached in the kernel, and 2:
> machdep.allowaperture must be set (normally on OpenBSD this device
> is used for access to graphics with X).
> 
> If 1 fails you get ENXIO "Device not configured", if 2 fails you get
> EPERM "Operation not permitted".
> 
> On your system the device does not attach (no amdmsr attach line in dmesg).
> Looking at amdmsr_probe() in /sys/arch/i386/i386/amdmsr.c I see this
> 
>  74         /* Check for AMD Geode LX CPU */
>  75         if (strcmp(cpu_vendor, "AuthenticAMD") == 0 && family == 0x5 &&
>  76             model == 0x0a) {
>  77                 /* Check for graphics processor presence */
>  78                 gld_msr_cap = rdmsr(GLX_CPU_GLD_MSR_CAP);
>  79                 if (((gld_msr_cap >> 8) & 0x0fff) == GLX_CPU_DID) {
>  80                         gld_msr_cap = rdmsr(GLX_GP_GLD_MSR_CAP);
>  81                         if (((gld_msr_cap >> 8) & 0x0fff) == GLX_GP_DID)
>  82                                 return 1;
>  83                 }
>  84         }
> 
> 
> >
> > dmesg:
> >
> > OpenBSD 6.5 (GENERIC) #1: Wed Apr 24 22:04:27 CEST 2019
> >     r...@syspatch-65-i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
> > real mem  = 267931648 (255MB)
> > avail mem = 247779328 (236MB)
> > mpath0 at root
> > scsibus0 at mpath0: 256 targets
> > mainbus0 at root
> > bios0 at mainbus0: date 11/05/08, BIOS32 rev. 0 @ 0xfd088
> > pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
> > pcibios0: pcibios_get_intr_routing - function not supported
> > pcibios0: PCI IRQ Routing information unavailable.
> > pcibios0: PCI bus #0 is the last bus
> > bios0: ROM list: 0xe0000/0xa800
> > cpu0 at mainbus0: (uniprocessor)
> > cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 
> > 499 MHz, 05-0a-02
> 
> The family/model (05/0a) match but the driver is not attaching so it must be
> failing the "Check for graphics processor presence" check.
> 
> If you were to remove that check, maybe it will work, or maybe it will
> fail horribly and you will brick your board.
> 
> Personally I would recommend following pcengines' suggested procedure
> and use their freedos image for alix.

I see. Thank you for thoughful explanation!

Reply via email to