From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Kettenis Date: Sun, 26 Apr 2020 23:23:31 +0200 (CEST) Subject: [PATCH v2 6/7] x86: Add an indication of 32/64-bit to bdinfo In-Reply-To: <73930b03-0fd5-2e74-a5db-3ac15a149dfc@gmx.de> (message from Heinrich Schuchardt on Sun, 26 Apr 2020 23:14:25 +0200) References: <20200426193824.171193-1-sjg@chromium.org> <20200426193824.171193-2-sjg@chromium.org> <77ab3c57-a320-b775-59f5-bd852bd7b782@gmx.de> <73930b03-0fd5-2e74-a5db-3ac15a149dfc@gmx.de> Message-ID: <0161994d7bb009a5@bloch.sibelius.xs4all.nl> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > From: Heinrich Schuchardt > Date: Sun, 26 Apr 2020 23:14:25 +0200 > > On 4/26/20 10:32 PM, Simon Glass wrote: > > Hi Heinrich, > > > > On Sun, 26 Apr 2020 at 14:21, Heinrich Schuchardt wrote: > >> > >> On 4/26/20 9:38 PM, Simon Glass wrote: > >>> It is useful to know what mode U-Boot is running in. Add a message at the > >>> end of the 'bdinfo' output. > >> > >> X86 is not the only architecture that can run both in 32bit and 64bit > >> mode. The same is true for ARM and SANDBOX. Shouldn't we provide the > >> information for these architecture too? > >> > >> The Raspberry Pi 3 is an example of an ARM board where building either > >> 32bit or 64bit U-Boot is used depending on the bitness of the OS. > > > > Yes I think that would be good. But do we have a generic way to tell? > > sizeof(int) ? > > sizeof(int) = 4 on aarch64. sizeof(void *) should work (and sizeof(long) should work as well, but then there is Windows) > Using these should be fine: > > CONFIG_ARM64=y > CONFIG_ARCH_RV64I=y > CONFIG_SANDBOX64=y MIPS and PowerPC can be 64-bit as well. I don't think checking config options scales.