From owner-freebsd-standards@freebsd.org Fri Sep 13 21:54:58 2019 Return-Path: Delivered-To: freebsd-standards@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E96D9D4B37 for ; Fri, 13 Sep 2019 21:54:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46VTvQ5x2Mz4B9r for ; Fri, 13 Sep 2019 21:54:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id CBA1DD4B36; Fri, 13 Sep 2019 21:54:58 +0000 (UTC) Delivered-To: standards@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB6B8D4B34 for ; Fri, 13 Sep 2019 21:54:58 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46VTvQ55TQz4B9q for ; Fri, 13 Sep 2019 21:54:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92F8ADD1C for ; Fri, 13 Sep 2019 21:54:58 +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 x8DLswxX070004 for ; Fri, 13 Sep 2019 21:54:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x8DLsw7m070003 for standards@FreeBSD.org; Fri, 13 Sep 2019 21:54:58 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: standards@FreeBSD.org Subject: [Bug 240572] [boot] FreeBSD cannot boot with U-Boot patch efi_loader: parameter checks BLOCK_IO_PROTOCOL Date: Fri, 13 Sep 2019 21:54:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: uefi X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: xypron.glpk@gmx.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status keywords bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2019 21:54:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240572 Bug ID: 240572 Summary: [boot] FreeBSD cannot boot with U-Boot patch efi_loader: parameter checks BLOCK_IO_PROTOCOL Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Keywords: uefi Severity: Affects Some People Priority: --- Component: standards Assignee: standards@FreeBSD.org Reporter: xypron.glpk@gmx.de CC: manu@freebsd.org Booting current FreeBSD fails since patch f59f0825e8b9fdeb8abe43ffd10c5119ca1a032f efi_loader: parameter checks BLOCK_IO_PROTOCOL The reason is that the buffer used by FreeBSD to read is not block aligned. The UEFI spec requires that EFI_BLOCK_IO_PROTOCOL.ReadBlocks() returns EFI_INVALID_PARAMETER if the buffer is not properly aligned (i.e. is not a multiple of EFI_BLOCK_IO_MEDIA.IoAlign) FreeBSD does not guarantee this alignment, e.g. efi_disk_read_blocks() is called with buffer 00000000995b08d0 which is not aligned to a multiple of 512. FreeBSD function efipart_readwrite writes this error message: efipart_readwrite: rw=3D1, blk=3D62333952 size=3D1 status=3D2 The problem can be traced back to the FreeBSD line: stand/efi/libefi/efipart.c(1043) efipart_realstrategy(): blkbuf =3D malloc(blkio->Media->BlockSize); U-Boot does not yet implement the EFI_DISK_IO_PROTOCOL which is a wrapper for the EFI_BLOCK_IO_PROTOCOL allowing unaligned access. malloc() could be replaced in FreeBSD by AllocatePages() which returns a 4096 byte aligned memory block. --=20 You are receiving this mail because: You are the assignee for the bug.=