Message ID | 20180724070922.63362-38-ming.huang@linaro.org |
---|---|
State | New |
Headers | show |
Series | Upload for D06 platform | expand |
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.) > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ming Huang <ming.huang@linaro.org> > Signed-off-by: Heyi Guo <heyi.guo@linaro.org> > --- > 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 <Uefi.h> > +#include <Protocol/PciPlatform.h> > + > + > +/*++ > + > +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 ';'. / 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.<BR> > +# Copyright (c) 2017 - 2018, Linaro Ltd. All rights reserved.<BR> > +# Copyright (c) 2018, Hisilicon Ltd. All rights reserved.<BR> > +# > +# 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 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
在 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 <ming.huang@linaro.org> >> Signed-off-by: Heyi Guo <heyi.guo@linaro.org> >> --- >> 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 <Uefi.h> >> +#include <Protocol/PciPlatform.h> >> + >> + >> +/*++ >> + >> +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.<BR> >> +# Copyright (c) 2017 - 2018, Linaro Ltd. All rights reserved.<BR> >> +# Copyright (c) 2018, Hisilicon Ltd. All rights reserved.<BR> >> +# >> +# 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 >>
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 <Uefi.h> +#include <Protocol/PciPlatform.h> + + +/*++ + +Routine Description: + + Perform Platform initialization first in PciPlatform. + +Arguments: + +Returns: + + VOID. + +--*/ +VOID +EFIAPI +PciInitPlatform ( + VOID + ) +{ + + 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 + ) +{ + + return ; +} + 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.<BR> +# Copyright (c) 2017 - 2018, Linaro Ltd. All rights reserved.<BR> +# Copyright (c) 2018, Hisilicon Ltd. All rights reserved.<BR> +# +# 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