From nobody Thu Mar 28 11:50:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass(p=reject dis=none) header.from=seabios.org ARC-Seal: i=1; a=rsa-sha256; t=1642636452; cv=none; d=zohomail.com; s=zohoarc; b=WKJydKj6nO0yqTaDBiN0sEq5CINzWLjXJoZ+T/fxUBKHKym7sgPeCX9lG/lYJasF4wHy5/iVCTQT7TMsWTE1NfsGPIVUFjR+cDpdmO6DwYy6KKlMfsnNlNOqmBLOuJWY/5EtudTB23WBkG1V9iJw/TIjRnT2sUSRB6xB1x7LxKI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642636452; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Subject:To; bh=Oe2i5Q/XuVeeOh1ZtNGKDwTabeKhysOt6kmUgY9uaTQ=; b=iL6YVp7ky27lCkBz4zrksIExlkhhaqCU3Xj+XjoIJJcetLkVPX1Lkb0FHF2sU509AXbTA5HU0eHi7C+UlVELdxl1i1XAqrCk0azTq7bdPM5zinJJBpIloDeSD/PDjQlMaubko4i6pyeXmGudZvHQHABKMtbtaGnp7fn0F7V3PcI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1642636452715107.79617983513299; Wed, 19 Jan 2022 15:54:12 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id C6B2B16E3FF1; Wed, 19 Jan 2022 23:54:08 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTP id 4057816E3EED for ; Tue, 18 Jan 2022 22:06:16 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by smtp-border-fw-9103.sea19.amazon.com with ESMTP; 18 Jan 2022 22:05:59 +0000 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by email-inbound-relay-iad-1a-8691d7ea.us-east-1.amazon.com (Postfix) with ESMTPS id 120E0C0950; Tue, 18 Jan 2022 22:05:57 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Tue, 18 Jan 2022 22:05:57 +0000 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (10.43.162.244) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Tue, 18 Jan 2022 22:05:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=seabios.org; s=dkim; t=1642636450; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-owner: list-unsubscribe:list-subscribe:list-post; bh=Oe2i5Q/XuVeeOh1ZtNGKDwTabeKhysOt6kmUgY9uaTQ=; b=igOkoeav0JjdKn8gRzITfIetfgrpBjiHnhfpYCJrRHHx5lc0yJP0rARaSrs3yhZAFWdUEO vKhahX6G00nac99kkhH9xug4WwS5liC5Gb8f9iXOz2kaQp+oqoWIgi0bCyFnEWkGjPu5MZ cxEfDv1c8Ov3eqRpHU1xI8YnjEcIa1A= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1642543576; x=1674079576; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=gVZu/JMOdZw7WxgUaxA2+IbAg0heb5G9hzfDc/zPjTs=; b=e79e8ODO4jvlbfPMNVzwS9tn6ZTrtqUCYr1vZdhUX1vZjlktaROzsfoQ l2wnTUCmgexFQBEaNh+UhsrNUiL8/o0glMlmMN1Yfrg28H4euvmcwMhq0 f6xsxBQGiFoPRXbTpLkZWVrLlEymIAripVH5Qyg+Di+awFjGVXw4W1KqP s=; X-IronPort-AV: E=Sophos;i="5.88,298,1635206400"; d="scan'208";a="985599046" Message-ID: Date: Tue, 18 Jan 2022 23:05:53 +0100 MIME-Version: 1.0 To: Matt DeVillier , Kevin O'Connor References: <20200930211056.8478-1-graf@amazon.com> <20200930211056.8478-5-graf@amazon.com> <20201003014732.GA3351000@morn.lan> <4A77488F-1C79-4BAB-9AAE-47505700F4CC@amazon.de> <20201007161312.GA3631205@morn.lan> <2a9e6956245bb8663e564f90665ff8228da2162a.camel@infradead.org> <20201030230903.GA917993@morn.lan> In-Reply-To: X-ClientProxiedBy: EX13D43UWC002.ant.amazon.com (10.43.162.172) To EX13D20UWC001.ant.amazon.com (10.43.162.244) Precedence: Bulk Content-Type: text/plain; charset="utf-8"; format="flowed" X-MailFrom: prvs=01028eb83=graf@amazon.de X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1 Message-ID-Hash: GMGNWHIRC3V44FIJ3KDI4F5RHWB3BZ22 X-Message-ID-Hash: GMGNWHIRC3V44FIJ3KDI4F5RHWB3BZ22 X-Mailman-Approved-At: Wed, 19 Jan 2022 23:53:53 +0000 CC: David Woodhouse , "seabios@seabios.org" X-Mailman-Version: 3.3.5rc1 Subject: [SeaBIOS] Re: [PATCH v3 4/4] nvme: Split requests by maximum allowed size List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Alexander Graf via SeaBIOS Reply-To: Alexander Graf Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: / X-ZohoMail-DKIM: pass (identity @seabios.org) X-ZM-MESSAGEID: 1642636455149100001 Hi Matt, On 18.01.22 18:46, Matt DeVillier wrote: > and attempting to boot from it: > > Booting from Hard Disk... > sq 0x7aa77bdf next_sqe 0 > sq 0x7aa77bdf commit_sqe 0 > cq 0x7aa77bf1 head 0 -> 1 > sq 0x7aa77bdf advanced to 1 > ns 1 read lba 0+1: 0 > Booting from 0000:7c00 > sq 0x7aa77bdf next_sqe 1 > sq 0x7aa77bdf commit_sqe 1 > cq 0x7aa77bf1 head 1 -> 2 > sq 0x7aa77bdf advanced to 2 > ns 1 read lba 1+1: 0 > sq 0x7aa77bdf next_sqe 2 > sq 0x7aa77bdf commit_sqe 2 > cq 0x7aa77bf1 head 2 -> 3 > sq 0x7aa77bdf advanced to 3 > read io: 00000000 00000000 00010003 40270002 This error means "PRP Offset Invalid: The Offset field for a PRP entry is invalid. This=20 may occur when there is a PRP entry with a non-zero offset after the=20 first entry or when the Offset field in any PRP entry is not dword=20 aligned (i.e., bits 1:0 are not cleared to 00b)." which points towards a misaligned PRP entry. The block size of this=20 request is 105 sectors (52.5kb), so it must be a PRPL. I don't see any=20 obvious code paths that would allow us to ever get into a misaligned=20 request here. That said, while trying to understand what is happening here I did=20 stumble over a different weird effect: ns->prp1 gets overwritten with 0=20 by some interrupt handler. Could you please try the patch / hack below=20 and see if it fixes the problem for you? That way I at least know we're=20 hunting the same ghost. If it doesn't help, I'll send you a debug patch that will give us some=20 more information about the PRP list SeaBIOS assembles. Thanks, Alex --- diff --git a/src/hw/nvme.c b/src/hw/nvme.c index f035fa2..99ad7a8 100644 --- a/src/hw/nvme.c +++ b/src/hw/nvme.c @@ -257,7 +257,7 @@ nvme_probe_ns(struct nvme_ctrl *ctrl, u32 ns_idx, u8=20 mdts) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 goto free_buffer; =C2=A0=C2=A0=C2=A0=C2=A0 } -=C2=A0=C2=A0=C2=A0 struct nvme_namespace *ns =3D malloc_fseg(sizeof(*ns)); +=C2=A0=C2=A0=C2=A0 struct nvme_namespace *ns =3D malloc_low(sizeof(*ns)); =C2=A0=C2=A0=C2=A0=C2=A0 if (!ns) { =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 warn_noalloc(); =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 goto free_buffer; Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org