From nobody Mon Dec 23 09:35:01 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1519887488861544.993692449234; Wed, 28 Feb 2018 22:58:08 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3395C22423854; Wed, 28 Feb 2018 22:52:00 -0800 (PST) Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8F9692242384D for ; Wed, 28 Feb 2018 22:51:58 -0800 (PST) Received: by mail-pg0-x241.google.com with SMTP id l131so1971034pga.2 for ; Wed, 28 Feb 2018 22:58:06 -0800 (PST) Received: from localhost.localdomain ([45.56.152.115]) by smtp.gmail.com with ESMTPSA id p63sm6489867pfk.74.2018.02.28.22.58.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Feb 2018 22:58:05 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c05::241; helo=mail-pg0-x241.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZXGYrKCbwlIxDn7EQlJvo+VP5AeLWXCh9RIif8O+dJY=; b=Cjf5Bq+ttx0Yt30LYm9anBLXnB1NnMLgCyyxZI8oG4VUOKIcOWdpzhScIKD9C+WirZ WvgNalUJse6IFXIW3Bh2N0gKXr17bFbjSlvJZh0TrNEdRzpmy9TxwOc8wF7nyJjHwE8m ZiXXHnpHn2V+Sopr9TRvlSEdu4wJL6D5I4aNI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZXGYrKCbwlIxDn7EQlJvo+VP5AeLWXCh9RIif8O+dJY=; b=YS4a+pVNi4iaSQPdwFy2bxMtAS5B8xBZxPQH6qx7U1x+KZNrOlWHfWIfraHT/FzRD+ 0wTpVEKK0WQZKDn7GR4tyJb21+klvX26qWLbCK6RiSOhfDZUGAcQtgQGE9KNLYfTlHS4 O9q0SRUH3Bt7DmI5s45SqQZwSvncBWfMFBhbpu6W07/8wT+ovdllb/MAwyu65nCuwGcE hPaVGdF/R+eIIrLNkqCtYU19wIVDi7rN9NetdIBCKr+ufxGlQrL4vuOTlSKvWxaGYf+B DsrFX+WP68IOq1kzPgXsnhIvL875x5DnCz6Rgx2bi4kn5qYBxBvuV5RW3N9lRUqRIjV7 KR1Q== X-Gm-Message-State: APf1xPDchS0FMl4aM7+P+GHgh4bE2801uleQ8CBmQbICeOe3W4AwUUb7 G5MPc9SqC5yIjaroW2cXRkWHJNnMIdo= X-Google-Smtp-Source: AG47ELvuCbLjAcbiXd3nZ575xOQ1oKj2HBBUcHvbDfZt5lZSlEzwczJK5EDaUyNhLCyxSLDec4KBkg== X-Received: by 10.98.228.3 with SMTP id r3mr901702pfh.77.1519887486360; Wed, 28 Feb 2018 22:58:06 -0800 (PST) From: Heyi Guo To: edk2-devel@lists.01.org Date: Thu, 1 Mar 2018 14:57:19 +0800 Message-Id: <1519887444-75510-2-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519887444-75510-1-git-send-email-heyi.guo@linaro.org> References: <1519887444-75510-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2] [PATCH v5 1/6] CorebootPayloadPkg/PciHostBridgeLib: Init PCI aperture to 0 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Ard Biesheuvel , Heyi Guo , Laszlo Ersek , Prince Agyeman MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Use ZeroMem to initialize all fields in temporary PCI_ROOT_BRIDGE_APERTURE variables to zero. This is not mandatory but helpful for future extension: when we add new fields to PCI_ROOT_BRIDGE_APERTURE and the default value of these fields can safely be zero, this code will not suffer from an additional change. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Heyi Guo Cc: Maurice Ma Cc: Prince Agyeman Cc: Benjamin You Cc: Ruiyu Ni Cc: Laszlo Ersek Cc: Ard Biesheuvel Reviewed-by: Ard Biesheuvel --- CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c | 5 +++= ++ 1 file changed, 5 insertions(+) diff --git a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSuppo= rt.c b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c index 6d94ff72c956..c61609b79cce 100644 --- a/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c +++ b/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c @@ -319,6 +319,11 @@ ScanForRootBridges ( =20 *NumberOfRootBridges =3D 0; RootBridges =3D NULL; + ZeroMem (&Io, sizeof (Io)); + ZeroMem (&Mem, sizeof (Mem)); + ZeroMem (&MemAbove4G, sizeof (MemAbove4G)); + ZeroMem (&PMem, sizeof (PMem)); + ZeroMem (&PMemAbove4G, sizeof (PMemAbove4G)); =20 // // After scanning all the PCI devices on the PCI root bridge's primary b= us, --=20 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel