From nobody Sun Jan 01 17:13:20 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NlQYt72V5z2lGyh for ; Sun, 1 Jan 2023 17:13:22 +0000 (UTC) (envelope-from fuz@fuz.su) Received: from fuz.su (fuz.su [IPv6:2001:41d0:8:e508::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "fuz.su", Issuer "fuz.su" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NlQYt19Zdz3MG3 for ; Sun, 1 Jan 2023 17:13:22 +0000 (UTC) (envelope-from fuz@fuz.su) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of fuz@fuz.su designates 2001:41d0:8:e508::1 as permitted sender) smtp.mailfrom=fuz@fuz.su; dmarc=none Received: from fuz.su (localhost [127.0.0.1]) by fuz.su (8.16.1/8.16.1) with ESMTPS id 301HDKOW076248 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Sun, 1 Jan 2023 17:13:20 GMT (envelope-from fuz@fuz.su) Received: (from fuz@localhost) by fuz.su (8.16.1/8.16.1/Submit) id 301HDKmg076247 for freebsd-arm@freebsd.org; Sun, 1 Jan 2023 18:13:20 +0100 (CET) (envelope-from fuz) Date: Sun, 1 Jan 2023 18:13:20 +0100 From: Robert Clausecker To: freebsd-arm@freebsd.org Subject: Re: Volterra Dev Kit Updates Message-ID: References: List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; R_SPF_ALLOW(-0.20)[+a]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; DMARC_NA(0.00)[fuz.su]; ARC_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4NlQYt19Zdz3MG3 X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Further update: _andy_t_ from #bsdmips suggested to replace all instances of EfiLoaderData in stand/efi/loader/copy.c with EfiLoaderCode. With this change, there is no longer a synchronous exception, the boot just hangs completely after entering the kernel. Yours, Robert Clausecker Am Sun, Jan 01, 2023 at 05:45:22PM +0100 schrieb Robert Clausecker: > Greetings and happy new year! > > Got around to do some debugging on the Volterra Dev Kit today. > Allan Jude had previously patched up the boot loader a little so > it gets to the point where it shows you the menu and lets you > type in commands. The last known state of affairs was "boot loader > gets to the point where it boots the kernel, but kernel hangs > without any further output." > > My tests are based on 89ffac3b with D37765, D37766, and D47767 > applied. > > It seems that the boot loader is still wonky; there's radio > silence from the kernel because it doesn't actually boot! > > Some printf() debugging later, I noticed that the boot loader > hangs in bi_load_efi_data(), specifically in the BS->GetMemoryMap() > loop. I've added some printf() calls therein and now it no longer > hangs -.- ketas in #bsdmips suggested that there migth be some > sort of race condition going on. > > Anyway, we are then greeted with an "ExitBootServices error 2" > but the boot continues. It finally jumps into the kernel, but > there is an immediate fault at the entry point: > > Synchronous Exeption at 0x0000000C7C000800 > > Looks like the whole memory management is still wonky. With just > a random guess, could it be that the loader tries to map the kernel > W+X to be able to load and then execute it, which the EFI > implementation doesn't like, just like it didn't like that with the > boot loader itself? > > I'll try to continue to investigate, but unfortunately I know very > little about this stuff. > > Yours, > Robert Clausecker > > -- > () ascii ribbon campaign - for an 8-bit clean world > /\ - against html email - against proprietary attachments > -- () ascii ribbon campaign - for an 8-bit clean world /\ - against html email - against proprietary attachments