From nobody Sun Nov 24 22:31:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81858+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81858+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634103415; cv=none; d=zohomail.com; s=zohoarc; b=FT6Dk23mz12MzJePwJa36kHydf83QogobfaQ6lfqz5bzwZyOyEfH2aNYfVB/sDj8J+Dezo1ghgKSST8x5QMEV9THDzjY2kg7+I+Shrm69qfnAgfOnSl+bQAGnY1kH+BLxcs+N8eRtOn6AOx0tKeKr85fnrq1rSlh5+xWq/6XY3Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634103415; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=2HxOXPQBQ99aymp7X7nQOtlSIxzcxxK8PPJSM72DG2E=; b=ceXessoD8H4NOAHNWYtRxZRTG0FDWLBGiq8am/CtorlZx2xUTX+jrgwhJ0Ls/Xv/wS2w2InCdVk0MfOgx3QUtAyb28+BpmH8A0EeCfv9sU3lW0oWLqqkEwkZ1x4zAIJWjuSAqC4eQl2rzkonjGp37XmiiWSVt1hl0tmRu5k5bxA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81858+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634103415461399.12053310913734; Tue, 12 Oct 2021 22:36:55 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id D6ECYY1788612xKCIpVD8dAB; Tue, 12 Oct 2021 22:36:55 -0700 X-Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mx.groups.io with SMTP id smtpd.web11.4081.1634103414568824284 for ; Tue, 12 Oct 2021 22:36:54 -0700 X-Received: by mail-pj1-f46.google.com with SMTP id pf6-20020a17090b1d8600b0019fa884ab85so3537922pjb.5 for ; Tue, 12 Oct 2021 22:36:54 -0700 (PDT) X-Gm-Message-State: OOocUrKnHCcgnYo0M8cqsjcNx1787277AA= X-Google-Smtp-Source: ABdhPJxezfuA8OSR0qBqyqpj62TrAYPi6zbTSb2TqIFPxPZSjwyWpy7mtDhzu/DLkcJEFGYxzJzULg== X-Received: by 2002:a17:90b:4c8d:: with SMTP id my13mr11084456pjb.101.1634103414059; Tue, 12 Oct 2021 22:36:54 -0700 (PDT) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id k14sm13623271pgg.92.2021.10.12.22.36.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 22:36:53 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto Subject: [edk2-devel] [PATCH 1/4] Silicon/SynQuacerNetsecDxe: Test the ControllerHandle is managed by this driver Date: Wed, 13 Oct 2021 14:36:51 +0900 Message-Id: <163410341134.323609.17991695355751540906.stgit@localhost> In-Reply-To: <163410340292.323609.10978291802739074305.stgit@localhost> References: <163410340292.323609.10978291802739074305.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634103415; bh=bFyJMPsPcBGppjXvYlxdOEcbot4efbwb2sU4WRIBKXk=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=CvqaLCCxAdnqehT3k91+7YfpGA/BqiBwdQ9b2I9IW+rvLlFC5HSLXqMiMz+RJojJR1z laolWqLmuWmT8ys6KzLwB9cKkWk50dZ7//9fFItXAN5F4fbAadVJMASvLvCz7uqKZwcPC VSMJ8/2uN8NIkaUj0CuZqunnQtkpgciMq8Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634103416458100002 From: Kazuhiko Sakamoto Test the @ControllerHandle is not NULL and is actually managed by this driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kazuhiko Sakamoto Signed-off-by: Masami Hiramatsu Reviewed-by: Leif Lindholm --- .../Drivers/Net/NetsecDxe/ComponentName.c | 13 +++++++++++++ .../Drivers/Net/NetsecDxe/DriverBinding.c | 1 - .../SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentNam= e.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentName.c index 44b3daa0af..743fa88384 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentName.c +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/ComponentName.c @@ -159,6 +159,19 @@ NetsecGetControllerName ( OUT CHAR16 **ControllerName ) { + EFI_STATUS Status; + + if (!ControllerHandle) { + return EFI_INVALID_PARAMETER; + } + + Status =3D EfiTestManagedDevice (ControllerHandle, + gNetsecDriverBinding.DriverBindingHandle, + &gEdkiiNonDiscoverableDeviceProtocolGuid); + if (EFI_ERROR (Status)) { + return Status; + } + if (ChildHandle !=3D NULL) { return EFI_UNSUPPORTED; } diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBindin= g.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c index 392d1b474f..fa0c415e98 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c @@ -131,7 +131,6 @@ NetsecDriverBindingStop ( } =20 =20 -STATIC EFI_DRIVER_BINDING_PROTOCOL gNetsecDriverBinding =3D { NetsecDriverBindingSupported, NetsecDriverBindingStart, diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h = b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h index cf2abb0ab1..9b3d19c033 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.h @@ -27,6 +27,7 @@ #include "netsec_for_uefi/pfdep.h" =20 extern EFI_COMPONENT_NAME2_PROTOCOL gNetsecDriverComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gNetsecDriverBinding; =20 /*--------------- Simple Network Driver entry point functions ------------= ----*/ =20 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81858): https://edk2.groups.io/g/devel/message/81858 Mute This Topic: https://groups.io/mt/86281578/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Nov 24 22:31:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81859+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81859+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634103424; cv=none; d=zohomail.com; s=zohoarc; b=fCrr7DDPqIuLQCq3EgnqsYcHdj8Nqp1qTnahDvbsDb1+zKhL0r7UtRQUayVbaZvgW3k625qEEe9wi4bluVJNYsV8wqlwK3gOAtnC8UWWJiS6iNSj75v/l76CkZFTAojzKvRrb5H2g+jaTyOipclRyxqXm+Jc4eKrk7/9j2TjahE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634103424; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=0R16XqzP0L4ivJQVCqte8CbMNJ8YkREwfEKLyRpniPU=; b=ECCDzQc8PuEh7JSwfrSOtPREK0Wzbfs5OjMxI0HmjsC/P3xW9jFdhPRQzopueFEOq0QwTvUBk9DFgqsvEiL0e3wTAZHTKV4n9SpjlYDOsF6NBp9DzBPvZ3hibOisxPE26MUxnGIV/x7Oj09ng6QBDomJPr69GcBkpvoilty0+A0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81859+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634103424086499.058109823222; Tue, 12 Oct 2021 22:37:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id bqTzYY1788612xxegcgnDhOD; Tue, 12 Oct 2021 22:37:03 -0700 X-Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mx.groups.io with SMTP id smtpd.web08.4184.1634103423172721437 for ; Tue, 12 Oct 2021 22:37:03 -0700 X-Received: by mail-pj1-f54.google.com with SMTP id d13-20020a17090ad3cd00b0019e746f7bd4so3581848pjw.0 for ; Tue, 12 Oct 2021 22:37:03 -0700 (PDT) X-Gm-Message-State: jLFh8TCteW92vnqjeJzB62JEx1787277AA= X-Google-Smtp-Source: ABdhPJw2XXU77teRxaFgQMi29jFQePv03Ov0CVUd/glGiYhwxyibD1zboC6blvBxIesacwii8d/cfA== X-Received: by 2002:a17:90b:4d84:: with SMTP id oj4mr11286401pjb.58.1634103422806; Tue, 12 Oct 2021 22:37:02 -0700 (PDT) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id on17sm4803301pjb.47.2021.10.12.22.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 22:37:02 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto Subject: [edk2-devel] [PATCH 2/4] Silicon/SynQuacerI2cDxe: Test the ControllerHandle is managed by this driver Date: Wed, 13 Oct 2021 14:36:59 +0900 Message-Id: <163410341947.323609.17810050212681648650.stgit@localhost> In-Reply-To: <163410340292.323609.10978291802739074305.stgit@localhost> References: <163410340292.323609.10978291802739074305.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634103423; bh=u+OOGZc5K/sF+a5GVqAE5b7OPDMmqom4bUuf0aZTCyc=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=eK7kgwJ4tlGsiLf8C6eUjEH6Hg2OR2dCynZEZ9Cos5qPvzIgXtmDSnp6NNtPsOWXwEx ScOukecP3ApFf1gLn8Dip3UQ/8W3o4FGCroMrUoweTb+PjJOni2GS/hz36crY/lfgXhsP 8JIUarVaEUyYcb01zw2gOll+9azJlFMiH9E= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634103425180100002 From: Kazuhiko Sakamoto Test the @ControllerHandle is not NULL and is actually managed by this driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kazuhiko Sakamoto Signed-off-by: Masami Hiramatsu Reviewed-by: Leif Lindholm --- .../Drivers/SynQuacerI2cDxe/ComponentName.c | 13 +++++++++++++ .../Drivers/SynQuacerI2cDxe/DriverBinding.c | 2 +- .../Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.h | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/ComponentN= ame.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/ComponentName.c index 9e7f189c13..ed5f11f107 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/ComponentName.c +++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/ComponentName.c @@ -158,6 +158,19 @@ SynQuacerI2cGetControllerName ( OUT CHAR16 **ControllerName ) { + EFI_STATUS Status; + + if (!ControllerHandle) { + return EFI_INVALID_PARAMETER; + } + + Status =3D EfiTestManagedDevice (ControllerHandle, + gSynQuacerI2cDriverBinding.DriverBindingH= andle, + &gEdkiiNonDiscoverableDeviceProtocolGuid); + if (EFI_ERROR (Status)) { + return Status; + } + if (ChildHandle !=3D NULL) { return EFI_UNSUPPORTED; } diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/DriverBind= ing.c b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/DriverBinding.c index 4e265aacf1..912ae79d14 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/DriverBinding.c +++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/DriverBinding.c @@ -129,7 +129,7 @@ SynQuacerI2cDriverBindingStop ( } =20 =20 -STATIC EFI_DRIVER_BINDING_PROTOCOL gSynQuacerI2cDriverBinding =3D { +EFI_DRIVER_BINDING_PROTOCOL gSynQuacerI2cDriverBinding =3D { SynQuacerI2cDriverBindingSupported, SynQuacerI2cDriverBindingStart, SynQuacerI2cDriverBindingStop, diff --git a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI= 2cDxe.h b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cD= xe.h index f891e4bf2f..c6534e6972 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.h +++ b/Silicon/Socionext/SynQuacer/Drivers/SynQuacerI2cDxe/SynQuacerI2cDxe.h @@ -25,6 +25,7 @@ #include =20 extern EFI_COMPONENT_NAME2_PROTOCOL gSynQuacerI2cDriverComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gSynQuacerI2cDriverBinding; =20 #define SYNQUACER_I2C_SIGNATURE SIGNATURE_32 ('S', 'I', '2', 'C') #define SYNQUACER_I2C_FROM_THIS(a) CR ((a), SYNQUACER_I2C_MASTER, \ -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81859): https://edk2.groups.io/g/devel/message/81859 Mute This Topic: https://groups.io/mt/86281582/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Nov 24 22:31:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81860+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81860+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634103432; cv=none; d=zohomail.com; s=zohoarc; b=A6kNYJG4qZLL+iZoVtUL1z/pXtqTQbzetqSvPGeTc1GKJlXunQEtzdWERSAPQ+AoCyIznMxsAt9l8LrEAAnXc7U/BvZZCUuXinx3JPGlKKmuRpL2LrmEBKIVB4Yiv16Qezb2gjWooUMrN+0NgMCGJtMH4kxGYdbsVh7KNjPiNsg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634103432; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=kL13crb5zjAq8kTzg+oUteu3o45VYv4FgdWEAUDTW9I=; b=julCMX3c9x/beQaatt7cOIiH5IqakOdHLsYsJK5XZzVugeY+feWuyXF78DzwBhEmpeF1aHcnVnHBEr0RfpVMj/r80CGKeX9wb+FFFnY6Pu6Z5HlSDq5PNTruDeZlgIIczsjORmqoIAMnsiHtmJ6RFgToM750pCAP4g6cLEoqaj4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81860+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1634103432338125.12444217481573; Tue, 12 Oct 2021 22:37:12 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id iMwsYY1788612x3eFhRIF8vs; Tue, 12 Oct 2021 22:37:12 -0700 X-Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mx.groups.io with SMTP id smtpd.web10.4172.1634103431292409812 for ; Tue, 12 Oct 2021 22:37:11 -0700 X-Received: by mail-pj1-f52.google.com with SMTP id q10-20020a17090a1b0a00b001a076a59640so3048538pjq.0 for ; Tue, 12 Oct 2021 22:37:11 -0700 (PDT) X-Gm-Message-State: vGRsgmiEycc3MNH2EPtJ7HTbx1787277AA= X-Google-Smtp-Source: ABdhPJwcpYM7qb1EQKhX9YwxwaRCI579NJixNKQL2uX4JqHE2S2cwy1IJMPhCP0iXTTacefxrieMCw== X-Received: by 2002:a17:90a:7e82:: with SMTP id j2mr11129539pjl.165.1634103430790; Tue, 12 Oct 2021 22:37:10 -0700 (PDT) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id q14sm4441139pjm.17.2021.10.12.22.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 22:37:10 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto Subject: [edk2-devel] [PATCH 3/4] Silicon/AtSha204a: Test the ControllerHandle is managed by this driver Date: Wed, 13 Oct 2021 14:37:08 +0900 Message-Id: <163410342814.323609.6646089068979201893.stgit@localhost> In-Reply-To: <163410340292.323609.10978291802739074305.stgit@localhost> References: <163410340292.323609.10978291802739074305.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634103432; bh=D4sGLJFy4XJC+bZUPEMavm7JkmKWjqDd20MrX/QOBpo=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=okt02FIz67RePAIHtYh0YYtDRpF5lNCgUIBojeH/TQ1mWHOCwd5bkxeX575TMVVehRU UpJ/Pg2TBWOfZXSs2APfqyjqlE7KuImWnC8oIFNGTCG/qCAu5VSBoKtaJKWO4FIctBRFk mpBDrtDshHcpuAJ9aiybzAAGTkmgnaqhmj0= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634103433629100001 From: Kazuhiko Sakamoto Test the @ControllerHandle is not NULL and is actually managed by this driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kazuhiko Sakamoto Signed-off-by: Masami Hiramatsu Reviewed-by: Leif Lindholm --- Silicon/Atmel/AtSha204a/AtSha204aDriver.h | 1 + Silicon/Atmel/AtSha204a/ComponentName.c | 13 +++++++++++++ Silicon/Atmel/AtSha204a/DriverBinding.c | 1 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Silicon/Atmel/AtSha204a/AtSha204aDriver.h b/Silicon/Atmel/AtSh= a204a/AtSha204aDriver.h index 615959baf4..11be15b25b 100644 --- a/Silicon/Atmel/AtSha204a/AtSha204aDriver.h +++ b/Silicon/Atmel/AtSha204a/AtSha204aDriver.h @@ -59,6 +59,7 @@ typedef struct { #define ATSHA204A_OPCODE_RANDOM 0x1b =20 extern EFI_COMPONENT_NAME2_PROTOCOL gAtSha204aDriverComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gI2cHwrngDriverBinding; =20 EFI_STATUS AtSha204aInit ( diff --git a/Silicon/Atmel/AtSha204a/ComponentName.c b/Silicon/Atmel/AtSha2= 04a/ComponentName.c index eec7b9120b..cc1d970bcf 100644 --- a/Silicon/Atmel/AtSha204a/ComponentName.c +++ b/Silicon/Atmel/AtSha204a/ComponentName.c @@ -159,6 +159,19 @@ AtSha204aGetControllerName ( OUT CHAR16 **ControllerName ) { + EFI_STATUS Status; + + if (!ControllerHandle) { + return EFI_INVALID_PARAMETER; + } + + Status =3D EfiTestManagedDevice (ControllerHandle, + gI2cHwrngDriverBinding.DriverBindingHandl= e, + &gEfiI2cIoProtocolGuid); + if (EFI_ERROR (Status)) { + return Status; + } + if (ChildHandle !=3D NULL) { return EFI_UNSUPPORTED; } diff --git a/Silicon/Atmel/AtSha204a/DriverBinding.c b/Silicon/Atmel/AtSha2= 04a/DriverBinding.c index 38ffd80df9..e278ab0554 100644 --- a/Silicon/Atmel/AtSha204a/DriverBinding.c +++ b/Silicon/Atmel/AtSha204a/DriverBinding.c @@ -132,7 +132,6 @@ I2cHwrngDriverBindingStop ( } =20 =20 -STATIC EFI_DRIVER_BINDING_PROTOCOL gI2cHwrngDriverBinding =3D { I2cHwrngDriverBindingSupported, I2cHwrngDriverBindingStart, -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81860): https://edk2.groups.io/g/devel/message/81860 Mute This Topic: https://groups.io/mt/86281583/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Sun Nov 24 22:31:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+81861+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81861+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1634103440; cv=none; d=zohomail.com; s=zohoarc; b=LcA4E/uwQTeDATuxBNQWcVG1QwqcpXML9nvqoWqY4tDifgAQdAqNg3dxhH49YScmrGsQtC4trBdcUc2PCpfk6xPKMXEDE/QsaOy5/LpzPFRvfGDH8N4eXl7UWga2+rzur0a0pFTjNEflFLVyVvc3ok5FHjc115xRxB58XVihOnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1634103440; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=f4EuPve9Ct0VV3gQ8jFypDXUrilwAwp2s+FglvOgZm0=; b=i3AHj3FH55CfcMB0VIjiSBOpR2SiK47wWRstXyaAIMLZEkpswE02Vv2IsH0XFsZcuB1eoh4rqbsyse6YGRtlNK2ZgqlNfV3MbqsfNC5ssYTHabRBYRyjt2N6FJLJ0y4RGyaOx66GPXCLafQoM6BxB6JPUJmY0IOSYte6xk0MUAk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+81861+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 163410344054377.47160146632655; Tue, 12 Oct 2021 22:37:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id FnD9YY1788612xRWQRqnWkJP; Tue, 12 Oct 2021 22:37:20 -0700 X-Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mx.groups.io with SMTP id smtpd.web10.4173.1634103439638195677 for ; Tue, 12 Oct 2021 22:37:19 -0700 X-Received: by mail-pg1-f175.google.com with SMTP id d23so1218616pgh.8 for ; Tue, 12 Oct 2021 22:37:19 -0700 (PDT) X-Gm-Message-State: 6hR3ChkMwGPBGVdqjOmvUYaox1787277AA= X-Google-Smtp-Source: ABdhPJxHbi74Mh6zAnjc5n3LZ5dV3SHdUYhUXZXMCMpQQxoWINmvCafA7MYfIzmB/5QsfjZcuoqSyA== X-Received: by 2002:a63:2b03:: with SMTP id r3mr26482646pgr.188.1634103439252; Tue, 12 Oct 2021 22:37:19 -0700 (PDT) X-Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id mu7sm5215406pjb.12.2021.10.12.22.37.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 22:37:19 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm Cc: devel@edk2.groups.io, Kazuhiko Sakamoto Subject: [edk2-devel] [PATCH 4/4] Silicon/ChaosKeyDxe: Test the ControllerHandle is managed by this driver Date: Wed, 13 Oct 2021 14:37:16 +0900 Message-Id: <163410343613.323609.5589920422459869029.stgit@localhost> In-Reply-To: <163410340292.323609.10978291802739074305.stgit@localhost> References: <163410340292.323609.10978291802739074305.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masami.hiramatsu@linaro.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1634103440; bh=ADLjkWY9nHEhlyMZq/xiYUWJ/jW8RlSSz4zmdca/CPw=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=HBOH3ZhR5DVar6kX3fb4j55/UsiVdT1HIwfuG8BUnOMf4EAlEZaxbsIvid1/jtqQZoI HO45IlsFZXHCeJQs1CJ0L173dPdeuDPXPcI0TNQ1z/5Av4am/XB3aIO0x3Dagzrdgxnp8 rym1Rd5/6jF0UJ/HVJmwj/tyjPqHUbk2WxE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1634103442127100002 From: Kazuhiko Sakamoto Test the @ControllerHandle is not NULL and is actually managed by this driver. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Kazuhiko Sakamoto Signed-off-by: Masami Hiramatsu Reviewed-by: Leif Lindholm --- Silicon/Openmoko/ChaosKeyDxe/ChaosKeyDriver.h | 1 + Silicon/Openmoko/ChaosKeyDxe/ComponentName.c | 13 +++++++++++++ Silicon/Openmoko/ChaosKeyDxe/DriverBinding.c | 1 - 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Silicon/Openmoko/ChaosKeyDxe/ChaosKeyDriver.h b/Silicon/Openmo= ko/ChaosKeyDxe/ChaosKeyDriver.h index 97cfbbb755..59582b3bf9 100644 --- a/Silicon/Openmoko/ChaosKeyDxe/ChaosKeyDriver.h +++ b/Silicon/Openmoko/ChaosKeyDxe/ChaosKeyDriver.h @@ -38,6 +38,7 @@ typedef struct { CR(a, CHAOSKEY_DEV, Rng, CHAOSKEY_DEV_SIGNATURE) =20 extern EFI_COMPONENT_NAME2_PROTOCOL gChaosKeyDriverComponentName2; +extern EFI_DRIVER_BINDING_PROTOCOL gUsbDriverBinding; =20 EFI_STATUS ChaosKeyInit ( diff --git a/Silicon/Openmoko/ChaosKeyDxe/ComponentName.c b/Silicon/Openmok= o/ChaosKeyDxe/ComponentName.c index 25117e2500..5b0f42cb67 100644 --- a/Silicon/Openmoko/ChaosKeyDxe/ComponentName.c +++ b/Silicon/Openmoko/ChaosKeyDxe/ComponentName.c @@ -159,6 +159,19 @@ ChaosKeyGetControllerName ( OUT CHAR16 **ControllerName ) { + EFI_STATUS Status; + + if (!ControllerHandle) { + return EFI_INVALID_PARAMETER; + } + + Status =3D EfiTestManagedDevice (ControllerHandle, + gUsbDriverBinding.DriverBindingHandle, + &gEfiUsbIoProtocolGuid); + if (EFI_ERROR (Status)) { + return Status; + } + if (ChildHandle !=3D NULL) { return EFI_UNSUPPORTED; } diff --git a/Silicon/Openmoko/ChaosKeyDxe/DriverBinding.c b/Silicon/Openmok= o/ChaosKeyDxe/DriverBinding.c index e7d0d3fe56..4cbd23ad36 100644 --- a/Silicon/Openmoko/ChaosKeyDxe/DriverBinding.c +++ b/Silicon/Openmoko/ChaosKeyDxe/DriverBinding.c @@ -146,7 +146,6 @@ UsbHwrngDriverBindingStop ( } =20 =20 -STATIC EFI_DRIVER_BINDING_PROTOCOL gUsbDriverBinding =3D { UsbHwrngDriverBindingSupported, UsbHwrngDriverBindingStart, -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#81861): https://edk2.groups.io/g/devel/message/81861 Mute This Topic: https://groups.io/mt/86281585/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-