From nobody Sat May 10 04:29:45 2025 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) client-ip=80.81.252.135; envelope-from=seabios-bounces@seabios.org; helo=mail.coreboot.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 80.81.252.135 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=linux.intel.com Return-Path: Received: from mail.coreboot.org (mail.coreboot.org [80.81.252.135]) by mx.zohomail.com with SMTPS id 153414642170476.15093473440811; Mon, 13 Aug 2018 00:47:01 -0700 (PDT) Received: from [127.0.0.1] (helo=ra.coreboot.org) by mail.coreboot.org with esmtp (Exim 4.86_2) (envelope-from ) id 1fp7aJ-0002qr-Sm; Mon, 13 Aug 2018 09:48:15 +0200 Received: from mga03.intel.com ([134.134.136.65]) by mail.coreboot.org with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.86_2) (envelope-from ) id 1fp7a7-0002qI-Kv for seabios@seabios.org; Mon, 13 Aug 2018 09:48:11 +0200 Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2018 00:46:26 -0700 Received: from unknown (HELO liujing-dell.bj.intel.com) ([10.238.145.49]) by orsmga006.jf.intel.com with ESMTP; 13 Aug 2018 00:46:25 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,232,1531810800"; d="scan'208";a="65690560" From: Jing Liu To: seabios@seabios.org Date: Mon, 13 Aug 2018 15:49:36 +0800 Message-Id: <1534146578-12520-2-git-send-email-jing2.liu@linux.intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1534146578-12520-1-git-send-email-jing2.liu@linux.intel.com> References: <1534146578-12520-1-git-send-email-jing2.liu@linux.intel.com> X-Spam-Score: -2.5 (--) Subject: [SeaBIOS] [PATCH v2 1/3] pci: fix the return value for truncated capability X-BeenThere: seabios@seabios.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SeaBIOS mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: anthony.xu@intel.com, kraxel@redhat.com, lersek@redhat.com MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: seabios-bounces@seabios.org Sender: "SeaBIOS" X-Duff: Orig. Duff, Duff Lite, Duff Dry, Duff Dark, Raspberry Duff, Lady Duff, Red Duff, Tartar Control Duff X-ZohoMail: RDMRC_1 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Return zero when finding truncated capability. Signed-off-by: Jing Liu --- src/fw/pciinit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index 3a2f747..d2cea2b 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -539,6 +539,7 @@ static u8 pci_find_resource_reserve_capability(u16 bdf) if (cap_len < RES_RESERVE_CAP_SIZE) { dprintf(1, "PCI: QEMU resource reserve cap length %d is in= valid\n", cap_len); + return 0; } } return cap; --=20 1.8.3.1 _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios