<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 16, 2017, at 8:48 PM, Lei YU <<a href="mailto:mine260309@gmail.com" class="">mine260309@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On Tue, May 16, 2017 at 9:59 PM, Cédric Le Goater <</span><a href="mailto:clg@kaod.org" style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">clg@kaod.org</a><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">> wrote:</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">On 05/16/2017 03:30 PM, Adriana Kobylak wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">On May 16, 2017, at 1:01 AM, Cédric Le Goater <<a href="mailto:clg@kaod.org" class="">clg@kaod.org</a> <<a href="mailto:clg@kaod.org" class="">mailto:clg@kaod.org</a>>> wrote:<br class=""><br class="">On 05/15/2017 02:41 AM, Adriana Kobylak wrote:<br class=""><blockquote type="cite" class=""><br class=""><blockquote type="cite" class="">On May 13, 2017, at 3:49 PM, Cédric Le Goater <<a href="mailto:clg@kaod.org" class="">clg@kaod.org</a> <<a href="mailto:clg@kaod.org" class="">mailto:clg@kaod.org</a>>> wrote:<br class=""><br class="">On 05/11/2017 02:12 PM, Joel Stanley wrote:<br class=""><blockquote type="cite" class="">On Thu, May 11, 2017 at 7:31 AM, Adriana Kobylak<br class=""><<a href="mailto:anoo@linux.vnet.ibm.com" class="">anoo@linux.vnet.ibm.com</a> <<a href="mailto:anoo@linux.vnet.ibm.com" class="">mailto:anoo@linux.vnet.ibm.com</a>>> wrote:<br class=""><blockquote type="cite" class="">Milton stopped by and mentioned that you had tried to modify the 4K erase<br class="">sector previously for a perhaps bmc chip and saw some flash corruption when<br class="">moving to an image that changed it?<br class=""><br class="">Just wanted to add that this change only changes the pnor setting and I<br class="">didn’t see any issues powering on a system after updating the BMC with an<br class="">image with this change. Then I updated the pnor with an image that had the<br class="">mbox enabled. Also checked with AndrewJ and the hostboot team and there’s no<br class="">hard-coded assumptions in their side about the erase size.<br class=""><br class="">With all this info let me know if you have any thoughts or concerns.<br class=""></blockquote><br class="">I recall issues relating to this option. I didn't record what they were<br class="">though.<br class=""></blockquote><br class="">We tried to activate 4K erase on some chips, which supported it,<br class="">and that the OpenPOWER systems use. That was because the PNOR<br class="">sections were not aligned with the erase size and that caused<br class="">some issues in pflash. But it breaks the compatibility with<br class="">previously created jffs2 filesystems. jffs2 stores the erase<br class="">size. So we stepped back.<br class=""><br class=""><blockquote type="cite" class="">Cedric, can you remind me what the issues are with the 4K kconfig option?<br class=""></blockquote><br class="">CONFIG_MTD_SPI_NOR_USE_4K_SECTORS enables the 4K erase commands,<br class="">and without it, the driver will use the sector erase command, most<br class="">likely 64K. I suppose we could have the same problem as described<br class="">above, as it can change the default erase size of a chip. to be<br class="">checked.<br class=""></blockquote></blockquote></blockquote></blockquote></blockquote><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">The same question as Cedric, PNOR has sections that are not 64K</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">aligned but 4K aligned,</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">e.g. HBEL, GARD:</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">ID=02            HBEL 000a0000..000c4000 (actual=00024000) [ECC]</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">ID=03           GUARD 000d0000..000d5000 (actual=00005000) [ECC]</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">When using gard tool to clear GARD partition, it will fail if erasing</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">size is 64K.</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Do we have a plan to support this case?</span><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote><div><br class=""></div>Thanks Lei for providing this info. For the proposed openbmc implementation, it’d work since the pnor sections (or partitions) would be files located in a ubi volume, and their data loaded into memory (virtual pnor) for the host to access, so erasing GUARD for example would underneath the covers modify the GUARD.bin file and not a specific offset in the physical pnor chip.</div><div><br class=""></div><div>But that raises the question about openpower systems that are not running openbmc. Should disabling 4k be an openbmc only patch?</div><div><br class=""><blockquote type="cite" class=""><div class=""><br style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: ArialUnicodeMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class=""></blockquote>Thanks Cedric for the info. It appears there are no issues when<br class="">disabling the 4K sectors for the pnor chip (yes, the erase size<br class="">is then 64K), probably because the pnor is not formatted with<br class="">a jffs2 filesystem. We might need to clear the pnor chip anyways<br class="">to be able to format it as a UBI volume. So would you say we’re<br class="">ok with this patch?<br class=""></blockquote><br class="">Well, what if the BMC is using a flash module with a 4K erase size ?<br class=""></blockquote><br class="">All the mtd devices except PNOR in the P8 and P9 systems running openbmc<br class="">have already an erase size of 64K.<br class=""></blockquote><br class="">So everything is fine for these.<br class=""><br class="">Cheers,<br class=""><br class="">C.<br class=""><br class=""><br class=""><blockquote type="cite" class="">Ex witherspoon:<br class="">root@witherspoon:~# cat /proc/mtd<br class="">dev:    size   erasesize  name<br class="">mtd0: 02000000 00010000 "bmc"<br class="">mtd1: 00060000 00010000 "u-boot"<br class="">mtd2: 00020000 00010000 "u-boot-env"<br class="">mtd3: 00440000 00010000 "kernel"<br class="">mtd4: 01740000 00010000 "rofs"<br class="">mtd5: 00400000 00010000 "rwfs"<br class="">mtd6: 02000000 00010000 "alt"<br class="">mtd7: 08000000 00001000 “pnor”<br class=""><br class="">Ex barreleye:<br class="">root@barreleye:~# cat /proc/mtd<br class="">dev:    size   erasesize  name<br class="">mtd0: 02000000 00010000 "bmc"<br class="">mtd1: 00060000 00010000 "u-boot"<br class="">mtd2: 00020000 00010000 "u-boot-env"<br class="">mtd3: 00440000 00010000 "kernel"<br class="">mtd4: 01740000 00010000 "rofs"<br class="">mtd5: 00400000 00010000 "rwfs"<br class="">mtd6: 04000000 00001000 "pnor"<br class=""><br class=""><blockquote type="cite" class=""><br class="">C.</blockquote></blockquote></blockquote></div></blockquote></div><br class=""></body></html>