From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::444; helo=mail-pf1-x444.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) (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 8AFB9210E3DFB for ; Thu, 9 Aug 2018 07:27:59 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id e13-v6so2928730pff.7 for ; Thu, 09 Aug 2018 07:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=bgSRwvr0NR3RJKjbhhuNFfwuOpDBpQ09Mw6dNCUG5og=; b=E5oW3/TNtmojr2MvghTGjHdH5gLAETsAF3oPBxH1oYg7UJ2pUm7YD8QGztaabHVSeF 3VhRzl0FANolbrsTZVcctb9bqbxrQNhG9Zy51y2xg5+/C2awZeSXCoqV2+je+PHxcakV H9vs0dm2sOYkpp2ETtjKx4e+sZJOEcIsJ0npg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=bgSRwvr0NR3RJKjbhhuNFfwuOpDBpQ09Mw6dNCUG5og=; b=Tn4swhdAMhVkduHYBFv3JLoC7yifKjV0N+5oqJc+zBMxwmp7xH9g873rUiEEHavNP6 2YAif+9Yil6TysHkYyGFTXxulfkZE5yGlBpYq6aqdie/lVbS6gVa+jA5g2Ji2bVOcP8c N3Ij2JFk8tBLrH9S4Z14FB3DNgRZgjBm4jXQXj7aPn1ZrAGhDZz4yKv2P/mWApTmXrAn tGjNJ/4cuR4d4dadqYqAwTYJeiutSzmcRl6WSLkQ99/+d24PGr/6sBqaVRfpgVMUtIwB xqaWD1Fjx2Do4Xe39eFrfg1yGWIANdovgDzJrXoKnYqR2FzM+eLwFvayXpz+ffFhiEp2 SGSA== X-Gm-Message-State: AOUpUlGMejHTudfkEdu1yswD6dHeSFjYug3UlHyB4lGQOPV1+1/nwFcN LIDmtDgDONdNU/UK4gjk4D4Iiw== X-Google-Smtp-Source: AA+uWPyhYYFcOGE1KKZ/GCnsBBY6ZE256Jl3Ra1q6tHNOccO23fxFNdQqDM6tjl4l3/2O9o6rukT/w== X-Received: by 2002:a62:6746:: with SMTP id b67-v6mr2615717pfc.243.1533824879209; Thu, 09 Aug 2018 07:27:59 -0700 (PDT) Received: from [10.199.0.182] ([64.64.108.224]) by smtp.gmail.com with ESMTPSA id d12-v6sm9105386pfn.118.2018.08.09.07.27.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 07:27:58 -0700 (PDT) To: Leif Lindholm Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, Heyi Guo References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-38-ming.huang@linaro.org> <20180806100149.lrwbpfmnfwu4ewut@bivouac.eciton.net> From: Ming Message-ID: Date: Thu, 9 Aug 2018 22:27:45 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180806100149.lrwbpfmnfwu4ewut@bivouac.eciton.net> Subject: Re: [PATCH edk2-platforms v1 37/38] Hisilicon/D06: Add PciPlatformLib X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 14:27:59 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/6/2018 6:01 PM, Leif Lindholm дµÀ: > On Tue, Jul 24, 2018 at 03:09:21PM +0800, Ming Huang wrote: >> Add a Null PciPlatformLib for build D06. > > Why? (Add some more detail to commit message, please.) This patch set is base the switch generic PciHostBridge patch set which add two api for PciPlatform driver, so need to implement the two api for D06. > >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Ming Huang >> Signed-off-by: Heyi Guo >> --- >> Platform/Hisilicon/D06/D06.dsc | 1 + >> Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c | 69 ++++++++++++++++++++ >> Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf | 30 +++++++++ >> 3 files changed, 100 insertions(+) >> >> diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc >> index a5640771ad..9a3128048e 100644 >> --- a/Platform/Hisilicon/D06/D06.dsc >> +++ b/Platform/Hisilicon/D06/D06.dsc >> @@ -96,6 +96,7 @@ >> FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf >> !endif >> PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf >> + PciPlatformLib|Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf >> >> [LibraryClasses.common.SEC] >> ArmPlatformLib|Silicon/Hisilicon/Library/ArmPlatformLibHisilicon/ArmPlatformLibSec.inf >> diff --git a/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c >> new file mode 100644 >> index 0000000000..8f14117b09 >> --- /dev/null >> +++ b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.c >> @@ -0,0 +1,69 @@ >> +/** @file >> +* >> +* Copyright (c) 2018, Hisilicon Limited. All rights reserved. >> +* Copyright (c) 2018, Linaro Limited. All rights reserved. >> +* >> +* This program and the accompanying materials >> +* are licensed and made available under the terms and conditions of the BSD License >> +* which accompanies this distribution. The full text of the license may be found at >> +* http://opensource.org/licenses/bsd-license.php >> +* >> +* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, >> +* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. >> +* >> +**/ >> + >> +#include >> +#include >> + >> + >> +/*++ >> + >> +Routine Description: >> + >> + Perform Platform initialization first in PciPlatform. >> + >> +Arguments: >> + >> +Returns: >> + >> + VOID. >> + >> +--*/ >> +VOID >> +EFIAPI >> +PciInitPlatform ( >> + VOID >> + ) >> +{ >> + > > Drop blank line. > >> + return; >> +} >> + >> +/*++ >> + >> +Routine Description: >> + >> + Perform Platform initialization by the phase indicated. >> + >> +Arguments: >> + >> + HostBridge - The associated PCI host bridge handle. >> + Phase - The phase of the PCI controller enumeration. >> + ChipsetPhase - Defines the execution phase of the PCI chipset driver. >> + >> +Returns: >> + >> +--*/ >> +VOID >> +EFIAPI >> +PhaseNotifyPlatform ( >> + IN EFI_HANDLE HostBridge, >> + IN EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PHASE Phase, >> + IN EFI_PCI_CHIPSET_EXECUTION_PHASE ChipsetPhase >> + ) >> +{ >> + > > Drop blank line. > >> + return ; > > No space before ';'. OK, all comments will apply in v2. Thanks. > > / > Leif > >> +} >> + >> diff --git a/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf >> new file mode 100644 >> index 0000000000..7648322522 >> --- /dev/null >> +++ b/Silicon/Hisilicon/Hi1620/Library/Hi1620PciPlatformLib/Hi1620PciPlatformLib.inf >> @@ -0,0 +1,30 @@ >> +## @file >> +# PCI Segment Library for Hisilicon Hi1610/Hi1616 SoC with multiple RCs >> +# >> +# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
>> +# Copyright (c) 2017 - 2018, Linaro Ltd. All rights reserved.
>> +# Copyright (c) 2018, Hisilicon Ltd. All rights reserved.
>> +# >> +# This program and the accompanying materials >> +# are licensed and made available under the terms and conditions of the BSD License >> +# which accompanies this distribution. The full text of the license may be found at >> +# http://opensource.org/licenses/bsd-license.php. >> +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, >> +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. >> +# >> +# >> +## >> + >> +[Defines] >> + INF_VERSION = 0x0001001A >> + BASE_NAME = Hi1620PciPlatformLib >> + FILE_GUID = 29ba30da-68bc-46a5-888f-c65dabb67fd8 >> + MODULE_TYPE = BASE >> + VERSION_STRING = 1.0 >> + LIBRARY_CLASS = PciPlatformLib >> + >> +[Sources] >> + Hi1620PciPlatformLib.c >> + >> +[Packages] >> + MdePkg/MdePkg.dec >> -- >> 2.17.0 >>