Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A0D15ECAAD3 for ; Sat, 10 Sep 2022 14:19:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2B18F84B22; Sat, 10 Sep 2022 16:18:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="fLSdnT+j"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6C42C84B22; Sat, 10 Sep 2022 16:18:56 +0200 (CEST) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A851984B7F for ; Sat, 10 Sep 2022 16:18:51 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x732.google.com with SMTP id u28so229346qku.2 for ; Sat, 10 Sep 2022 07:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=Zo2jJSKfajqNrZ/5ujXAtlyPU0TB1AGo6YDG24WkUYw=; b=fLSdnT+jYIWvXrkgvpzlZHU/D5WQaUl3Cj2KVEru9sE+0tEbrkImwFgEV6Mc0PMLpw T3Bo2vUYRnoIdpZzm65/Q7vFgOGQWjOqza7bJ18pSxrhDTQa1E33Hx7zJKIAx1QVQ79c vdgnoigk3jNPIsx5Eu2LqcmDxawME+Xh8yOHg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=Zo2jJSKfajqNrZ/5ujXAtlyPU0TB1AGo6YDG24WkUYw=; b=3/pUMXm5MhhCKPFg4xsMU4937tSsv9STwuNQUOUtbMYD6cksJeRSWrBff+YT4G5VSO o7fuQCQ3krRxuLwTdJb3oc7Q8dNFKmNlFoMpewDsj93UP1Z7ALYI/+boy84d0UBMCYI0 MBnRe6sHWAWJTJ5MSg7QUGTdBwlGG+xoQo248dgP2ZjdllBYhlpygS0hLzAw96INdwhh SxkKAcfOV0Ggf6g0IKApCKiwFwT1Ad4Cc61ofopvpU+s+harKy3cQ8NFIxChXnB5inru n5aEPL6P/5tOIV7xwfMdUtt8aUfiVfwzzQpy46qU+6omoJzFW9W/oQbu/nxFHl8g4PNc pMow== X-Gm-Message-State: ACgBeo2YczDzf00yOM8zeSi9PLWfuaBQoVxl/RmLan74cWMiC+WT0Jx8 wJYOOi7EK1GTQdBGA26Ol1Ly3Q== X-Google-Smtp-Source: AA6agR4i0uvfblfK8E7lDUX+5NmW0p8gaO8AdfU2ACwxi35Z+vVo1pi5gnnrZDunwTV6koJjPDyyaw== X-Received: by 2002:a37:aac6:0:b0:6cb:e393:defa with SMTP id t189-20020a37aac6000000b006cbe393defamr7595319qke.74.1662819530211; Sat, 10 Sep 2022 07:18:50 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-e9eb-4d9f-3776-9029.res6.spectrum.com. [2603:6081:7b00:6400:e9eb:4d9f:3776:9029]) by smtp.gmail.com with ESMTPSA id y19-20020a05620a25d300b006b8e8c657ccsm3153918qko.117.2022.09.10.07.18.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Sep 2022 07:18:49 -0700 (PDT) Date: Sat, 10 Sep 2022 10:18:47 -0400 From: Tom Rini To: Sergei Antonov Cc: u-boot@lists.denx.de, Simon Glass , patrick.delaunay@foss.st.com, Marek Vasut Subject: Re: [PATCH] scripts: config_whitelist: CONFIG_SYS_FLASH_AUTOPROTECT_LIST Message-ID: <20220910141847.GI1522024@bill-the-cat> References: <20220903143030.1969387-1-saproj@gmail.com> <20220903143124.GR7942@bill-the-cat> <20220903161556.GS7942@bill-the-cat> <20220904152346.GU7942@bill-the-cat> <20220904153035.GV7942@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="u5E4XgoOPWr4PD9E" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --u5E4XgoOPWr4PD9E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 04, 2022 at 06:54:29PM +0300, Sergei Antonov wrote: > On Sun, 4 Sept 2022 at 18:30, Tom Rini wrote: > > > > On Sun, Sep 04, 2022 at 06:28:56PM +0300, Sergei Antonov wrote: > > > On Sun, 4 Sept 2022 at 18:23, Tom Rini wrote: > > > > > > > > What type must it be in Kconfig? Note, it is an array initi= alizer > > > > > > > > similar to CONFIG_SYS_BAUDRATE_TABLE. > > > > > > > > > > > > > > Ah, ugh. So, it's also currently unused code, what does it lo= ok like in > > > > > > > the platform you're making use of this on? > > > > > > > > > > > > In my _defconfig I use this line: > > > > > > CONFIG_SYS_FLASH_AUTOPROTECT_LIST=3D"{{0x80000000, 0x40000}}" > > > > > > To protect the first 256 KB of flash memory. > > > > > > > > > > Please, disregard the previous message. I was too hasty to reply. > > > > > > > > > > I have include/configs/myplatform.h file which contains this line: > > > > > #define CONFIG_SYS_FLASH_AUTOPROTECT_LIST {{0x80000000, 0x40000}} > > > > > > > > > > And I could not convert it to Kconfig string parameter. > > > > > > > > Can this information be obtained from an existing device tree bindi= ng on > > > > the platform? > > > > > > Device tree exists. No, DT does not currently contain this > > > information. But it can be added. > > > > OK. But, is there an existing binding, or would it be a new one? >=20 > I am using an existing "cfi-flash" driver: > nor@80000000 { > #address-cells =3D <1>; > #size-cells =3D <1>; > compatible =3D "cfi-flash"; > reg =3D <0x80000000 0x0>; > ... > } Getting back to this, sorry, I meant if there was a property we could use or some other way to infer this from the device tree. I see the partition binding has a way to mark things as read-only, which we could use as a hint (and with a new Kconfig option) to say that partitions that are marked as read only are then also protected. But it's also fine to go with renaming this to be CFG_SYS_... and continue to #define it, instead. --=20 Tom --u5E4XgoOPWr4PD9E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmMcnMQACgkQFHw5/5Y0 tyxOjAwAs6HQPdKCnldBBTjvOArIaNm2mHhRJAuEPguiTvvI/iJicJW2+z10Qzdl G19qWMGQpCtHNMxuPy0DJbvozj5vrSz1kODE/jgzgT5Gy4y8lzOSJbRlk9ckMP63 Km68hgrLKAlHIY0KmhO9KGxBnPzrJmNEfR7qYWt80yEXm7SKdrCPQbTM93bFQctB Oml9PZ9y04gqbQ7Fj5hQ+VZgD4RLEzd7bKpipG7LrFJk3l9zVzJtevfRHfJTNuBK +JCzkXMo66aE2SG3Gdjzu2/Zo6f2rmKT4Khv8zri98fBgW1tKAzSqwLyOkM138dX Rjs3CEvgqlSrYA4E2EEm/LhFUc2HnueLfpnQwHXFV9PdCBgZvz6jPkKh2Btnc66A ew7QXdXoHmb1/zzGsVdQjTFDn6rAIzft9IU5DGWKWstCfugPDCfU2CdtXyqsLq18 fLbE0FaXas5CdiM3bCaw4saGhzMmLYAn1/sSgiOIHtA3enoFnafFcuXRiTiliiW6 CSDSGgoh =w2bV -----END PGP SIGNATURE----- --u5E4XgoOPWr4PD9E--