public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Fu, Siyuan" <siyuan.fu@intel.com>
To: "Li, Songpeng" <songpeng.li@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Ye, Ting" <ting.ye@intel.com>, "Wu, Jiaxin" <jiaxin.wu@intel.com>
Subject: Re: [PATCH 2/4] MdeModulePkg/UefiPxeBcDxe: Add Conflict Detection Process.
Date: Mon, 29 Oct 2018 03:14:50 +0000	[thread overview]
Message-ID: <B1FF2E9001CE9041BD10B825821D5BC58B676893@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20181029015326.8528-3-songpeng.li@intel.com>

Hi, Songpeng

The tag protocol guid is installed in driver binding start so it should be marked as BY_START in INF file.

> +  gEdkiiPxeBcTagProtocolGuid                       ## SOMETIMES_CONSUMES

BestRegards
Fu Siyuan

> -----Original Message-----
> From: Li, Songpeng
> Sent: Monday, October 29, 2018 9:53 AM
> To: edk2-devel@lists.01.org
> Cc: Ye, Ting <ting.ye@intel.com>; Wu, Jiaxin <jiaxin.wu@intel.com>; Fu,
> Siyuan <siyuan.fu@intel.com>
> Subject: [PATCH 2/4] MdeModulePkg/UefiPxeBcDxe: Add Conflict Detection
> Process.
> 
> The current PxeBc Driver in MdeModulePkg and NetworkPkg has no conflict
> detection when both installed in platform, this process is for conflict
> driver detect.
> 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1278
> Cc: Ye Ting <ting.ye@intel.com>
> Cc: Wu Jiaxin <jiaxin.wu@intel.com>
> Cc: Fu Siyuan <siyuan.fu@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Songpeng Li <songpeng.li@intel.com>
> ---
>  .../Network/UefiPxeBcDxe/PxeBcDriver.c        | 19 ++++++++++++++++++-
>  .../Network/UefiPxeBcDxe/PxeBcImpl.h          |  3 ++-
>  .../Network/UefiPxeBcDxe/UefiPxeBcDxe.inf     |  1 +
>  3 files changed, 21 insertions(+), 2 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> index 76c140d8e3..bd16f8b2e2 100644
> --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.c
> @@ -1,7 +1,7 @@
>  /** @file
>    The driver binding for UEFI PXEBC protocol.
> 
> -Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2007 - 2018, Intel Corporation. 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
> @@ -84,6 +84,19 @@ PxeBcDriverBindingSupported (
>    EFI_PXE_BASE_CODE_PROTOCOL  *PxeBc;
>    EFI_STATUS                  Status;
> 
> +  Status = gBS->OpenProtocol (
> +                  ControllerHandle,
> +                  &gEdkiiPxeBcTagProtocolGuid,
> +                  NULL,
> +                  This->DriverBindingHandle,
> +                  ControllerHandle,
> +                  EFI_OPEN_PROTOCOL_TEST_PROTOCOL
> +                  );
> +
> +  if (!EFI_ERROR (Status)) {
> +    return EFI_ALREADY_STARTED;
> +  }
> +
>    Status = gBS->OpenProtocol (
>                    ControllerHandle,
>                    &gEfiPxeBaseCodeProtocolGuid,
> @@ -370,6 +383,8 @@ PxeBcDriverBindingStart (
>                    &Private->PxeBc,
>                    &gEfiLoadFileProtocolGuid,
>                    &Private->LoadFile,
> +                  &gEdkiiPxeBcTagProtocolGuid,
> +                  NULL,
>                    NULL
>                    );
>    if (EFI_ERROR (Status)) {
> @@ -573,6 +588,8 @@ PxeBcDriverBindingStop (
>                    &Private->PxeBc,
>                    &gEfiLoadFileProtocolGuid,
>                    &Private->LoadFile,
> +                  &gEdkiiPxeBcTagProtocolGuid,
> +                  NULL,
>                    NULL
>                    );
> 
> diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> index e96b6f2c5d..0fceb35b82 100644
> --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.h
> @@ -1,6 +1,6 @@
>  /** @file
> 
> -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
> +Copyright (c) 2007 - 2018, Intel Corporation. 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
> @@ -32,6 +32,7 @@ typedef struct _PXEBC_PRIVATE_DATA  PXEBC_PRIVATE_DATA;
>  #include <Protocol/Arp.h>
>  #include <Protocol/Ip4.h>
>  #include <Protocol/Ip4Config2.h>
> +#include <Protocol/PxeBcTag.h>
> 
>  #include <Library/DebugLib.h>
>  #include <Library/DevicePathLib.h>
> diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> index 0424019929..dc255534cb 100644
> --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
> @@ -94,6 +94,7 @@
>    gEfiIp4ServiceBindingProtocolGuid                ## TO_START
>    gEfiIp4ProtocolGuid                              ## TO_START
>    gEfiIp4Config2ProtocolGuid                       ## TO_START
> +  gEdkiiPxeBcTagProtocolGuid                       ## SOMETIMES_CONSUMES
> 
>  [Pcd]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize  ## SOMETIMES_CONSUMES
> --
> 2.18.0.windows.1



  reply	other threads:[~2018-10-29  3:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29  1:53 [PATCH 0/4] Conflict Detection for Tcp and PxeBc Driver Songpeng Li
2018-10-29  1:53 ` [PATCH 1/4] MdeModulePkg: Add Tag Protocol for PxeBc Driver Conflict Detection Songpeng Li
2018-10-29  1:53 ` [PATCH 2/4] MdeModulePkg/UefiPxeBcDxe: Add Conflict Detection Process Songpeng Li
2018-10-29  3:14   ` Fu, Siyuan [this message]
2018-10-29  1:53 ` [PATCH 3/4] NetworkPkg/UefiPxeBcDxe: " Songpeng Li
2018-10-29  1:53 ` [PATCH 4/4] NetworkPkg/TcpDxe: Modify the Version of Driver Binding Protocol Songpeng Li
2018-10-29 11:40 ` [PATCH 0/4] Conflict Detection for Tcp and PxeBc Driver Leif Lindholm
2018-10-30  2:22   ` Li, Songpeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B1FF2E9001CE9041BD10B825821D5BC58B676893@SHSMSX103.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox