From nobody Mon May 20 14:12:02 2024 X-Original-To: ppc@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 4VjfdZ0l9Bz5LLPk for ; Mon, 20 May 2024 14:12:02 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjfdY6nZjz4VjK for ; Mon, 20 May 2024 14:12:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716214322; a=rsa-sha256; cv=none; b=AvFxh99XmiBDWS04Pr6dZO6uFuLdaYAwfMI8Rvy56za7+h1wJ6wqYLNf21gBGEMgkoib9j Tpj0gPZ4Z8sbByVmyXJwLF9x/XRZ6307iFdwOwieSIYZFdyT2ungmIQ0jUeMFIPs9KmCKy kbNuvZqNiHdnn9Pe7+7EORZVcDxTM1P6syfat7Gp8t8ekUidcknADesJOpMVgm1cu6vhqu QPiXfacF9OfB+IjQUEtsQqDHlkoCGhZo8VoOeN38pBnWLjGFAtsh/Ra4AkCzaoqusav7w5 bpJ0dO/01OWYclDYmBgYc9EWpTgBl0YKZVFu+GFyUa1xLn7o0g39PReDs4fq+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716214322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QgJcQTqoIzy9zWq6d+4YyrXJs9TuLoYFdF1ns+SYoIs=; b=dCUoIKGJum3Tp5fymrBf5Ol5LusRAgTcCOy3Qu9fIO5jLJruO2XQN/jOV7rSf+LpAKvBYl OoLX49MrCZaYogISLnm9qdQ/udBPaD7CiNeBEFzTGIyrysXmH88S7AL5x9fMFAWlmg0QzB zMR3AyJy2VNE7f4BJnRWXLG7NdN2vX9lw9RajZ1aJmLWvKyD8wg9yYhWXGS+ZBNcq/avL1 F9LA5i8hhbz851KgI1CsJg1U2YIGjhOsa6dbYgF1eSoR0X5Djr69UNT/ARYlQlqw9dIdXm TuXiUQ1coQWxrLlzMdoy/05vS+L+0WiRn2KxNbW6Rtf089oRcBmkt27qpHDzkQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjfdY6PcBzhL0 for ; Mon, 20 May 2024 14:12:01 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 44KEC13K007719 for ; Mon, 20 May 2024 14:12:01 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 44KEC10I007714 for ppc@FreeBSD.org; Mon, 20 May 2024 14:12:01 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ppc@FreeBSD.org Subject: [Bug 279137] FreeBSD fails to boot on IBM POWER8 systems (S814, S822L, S824) Date: Mon, 20 May 2024 14:12:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: powerpc X-Bugzilla-Version: 14.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: calvin@cmpct.info X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ppc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ppc@freebsd.org Sender: owner-freebsd-ppc@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279137 --- Comment #3 from Calvin Buckley --- I have a suspicion it might be a problem with how the executable is built - perhaps an issue with the linker script. I'm trying to figure out what migh= t be a problem, but some things I have noticed: * The stack trace is well below the load address for the loader in addition= to triggering during load instead of boot, so this is why I think it's an issue when loading the executable. * grub and ye old yaboot have SysV branding, FreeBSD loader has FreeBSD branding, AIX bootfile.exe has Monterey branding (lmao) * The load address is kinda funny, not really a nice round number. Then aga= in, the AIX one is also a different weird number, and AIX boots fine on these machines. * Perhaps it's something with the sections. GRUB has very few, and AIX has = none (which is pretty weird - it's also ~32 MB...). Then again, yaboot presumably had to boot on IBM systems and it has a ton of sections. If it helps, LLVM objdump output on the FreeBSD 14.0 loader: ``` % objdump -x PPC_CHRP_LOADER=20 PPC_CHRP_LOADER: file format elf32-powerpc architecture: powerpc start address: 0x02c007ec Program Header: LOAD off 0x00000060 vaddr 0x02c00060 paddr 0x02c00060 align 2**16 filesz 0x0005c3c8 memsz 0x0085da9c flags rwx Dynamic Section: Sections: Idx Name Size VMA Type 0 00000000 00000000=20 1 .text 0004b7d0 02c00060 TEXT 2 .rodata 000035b8 02c4b830 DATA 3 .rodata.str1.1 000063c7 02c4ede8 DATA 4 set_Xcommand_set 0000006c 02c551b0 DATA 5 .eh_frame_hdr 0000001c 02c5521c DATA 6 .eh_frame 00000040 02c55238 DATA 7 .data.rel.ro 00000678 02c56000 DATA 8 .data 00005da8 02c56680 DATA 9 .bss 008016d4 02c5c428 BSS 10 .comment 000000ac 00000000=20 11 .shstrtab 00000073 00000000=20 SYMBOL TABLE: ``` On GRUB (this works): ``` % objdump -x core.elf=20=20=20=20=20=20=20 core.elf: file format elf32-powerpc architecture: powerpc start address: 0x00200000 Program Header: LOAD off 0x00000140 vaddr 0x00200000 paddr 0x00200000 align 2**4 filesz 0x00011622 memsz 0x00018d9c flags rwx STACK off 0x00011762 vaddr 0x00000000 paddr 0x00000000 align 2**2 filesz 0x00000000 memsz 0x00000000 flags rwx LOAD off 0x00011762 vaddr 0x00221000 paddr 0x00221000 align 2**2 filesz 0x00084b18 memsz 0x00084b18 flags rwx Dynamic Section: Sections: Idx Name Size VMA Type 0 00000000 00000000=20 1 0000000c 00000000=20 2 .text 00011622 00200000=20 3 mods 00084b18 00211622=20 SYMBOL TABLE: ``` AIX (this works): ``` % objdump -x bootfile.exe=20 bootfile.exe: file format elf32-powerpc architecture: powerpc start address: 0x00006134 Program Header: NOTE off 0x000000d4 vaddr 0xffffffff paddr 0xffffffff align 2**64 filesz 0x0000002c memsz 0x00000000 flags --- NOTE off 0x00000100 vaddr 0xffffffff paddr 0xffffffff align 2**64 filesz 0x0000004c memsz 0x00000000 flags --- LOAD off 0x0000014c vaddr 0x0000414c paddr 0x0000414c align 2**12 filesz 0x00000e98 memsz 0x00000e98 flags --- NOTE off 0x00000fe4 vaddr 0x00004fe4 paddr 0x00004fe4 align 2**12 filesz 0x0000101c memsz 0x0000101c flags --- LOAD off 0x00002000 vaddr 0x00006000 paddr 0x00006000 align 2**12 filesz 0x01f00000 memsz 0x01f00000 flags --- Dynamic Section: Sections: Idx Name Size VMA Type SYMBOL TABLE: ``` yaboot (have not tested because it predates POWER8, but may be useful for historical reference): ``` % objdump -x yaboot/usr/lib/yaboot/yaboot=20 yaboot/usr/lib/yaboot/yaboot: file format elf32-powerpc architecture: powerpc start address: 0x00200000 Program Header: LOAD off 0x00010000 vaddr 0x00200000 paddr 0x00200000 align 2**16 filesz 0x0001d7c8 memsz 0x0001d7c8 flags r-x LOAD off 0x0002e000 vaddr 0x0022e000 paddr 0x0022e000 align 2**16 filesz 0x0000043c memsz 0x00014a94 flags rw- STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2 filesz 0x00000000 memsz 0x00000000 flags rwx Dynamic Section: Sections: Idx Name Size VMA Type 0 00000000 00000000=20 1 .text 0001b740 00200000 TEXT 2 .rodata 00002004 0021b740 DATA 3 .eh_frame 00000084 0021d744 DATA 4 .data 0000042c 0022e000 DATA 5 .sdata 00000010 0022e42c DATA 6 .sbss 00000030 0022e440 BSS 7 .bss 00014624 0022e470 BSS 8 .gnu.attributes 00000014 00000000=20 9 .shstrtab 0000004b 00000000=20 SYMBOL TABLE: ``` --=20 You are receiving this mail because: You are the assignee for the bug.=