lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c384c5ea0810040441u77ebf879i8c4a2be8675ca26c@mail.gmail.com>
Date:	Sat, 4 Oct 2008 13:41:50 +0200
From:	"Leon Woestenberg" <leon.woestenberg@...il.com>
To:	"Haavard Skinnemoen" <haavard.skinnemoen@...el.com>
Cc:	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mtd: AT49BV6416 has swapped erase regions

Hello Haavard, all,

this topic has now diverted to u-boot, as Linux is fixed.  I am
posting in the existing thread to keep the information coherent.

On Tue, Sep 30, 2008 at 2:22 PM, Haavard Skinnemoen
<haavard.skinnemoen@...el.com> wrote:
> "Leon Woestenberg" <leon.woestenberg@...il.com> wrote:
>> Haavard,
>> On Tue, Sep 30, 2008 at 1:55 PM, Haavard Skinnemoen
>> <haavard.skinnemoen@...el.com> wrote:
>> > The CFI information read from AT49BV6416 lists the erase regions in the
>> > wrong order, causing problems when trying to erase or update the first
>> > or last 64K block.
>> >
>> Are there other Atmel designs with this bug or only the chip with this CFI ID?
>
> That's a good question. I guess there may be others in the same family
> with the same bug. I don't really know.
>
> The replacement, AT49BV642D, does not have this bug.
>
>> I ask, because the check in u-boot is too generic; I found u-boot
>> wrongly assumes wrong order for another Atmel part, not checking on a
>> specific CFI ID.
>
> That's interesting...especially since u-boot only reads the low byte
> of the JEDEC ID, so adding a fixup for one particular ID may match tons
> of chips with 16-bit IDs.
>
> I'll have to check the latest u-boot and see if it breaks any of my
> boards.
>
I just checked on a custom design, AP7000 with AT49BV320DT, which
reports its top boot bit correctly.
info->device_id == c4 for this part.

The u-boot flash_fixup_atmel() currently reverses geometry whenever
the top boot bit is set, which seems wrong:

I have to force this to zero to make that custom board work in this
piece of code:

/* Check the "top boot" bit in the PRI */
if (info->ext_addr && !(flash_read_uchar(info, info->ext_addr + 6) & 1))
  reverse_geometry = 1;

I was hesitating to come up with a patch, because some of the check is
#ifdef'd out, and I may have missed
a u-boot convention that I should layout my sectors as
bottom-boot-block in u-boot, and reverse_geometry if 'top'?

Indeed the single byte ID check may need attention. I have to lookup
the CFI specs to be sure.

Regards,
-- 
Leon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ