From patchwork Fri Aug 31 13:27:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 145629 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp784545ljw; Fri, 31 Aug 2018 06:28:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYQlecdTvTVkQ2YUwnCR5b+5Tq0dOk7jmGZwpUnf4kIrZlFDE+7apq5Xy84Pts/X1fLhSm+ X-Received: by 2002:a17:902:9a47:: with SMTP id x7-v6mr15498499plv.37.1535722126494; Fri, 31 Aug 2018 06:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535722126; cv=none; d=google.com; s=arc-20160816; b=QXvA80mxLCvdoZ5GGYpMxf1ohyWhCRJmg3zDR9LnmcKDL+rhnhftpmmRBaX138UeNl N4gUz8hLrvul7Em2IMXLMwe4JkLXuktHuG8GJXSBQp3x1NdZ6RYaMgrj0diU+v9ldJ7f fLXyaD27j2ZeDkJ4BDejt8rRBk0jOe8xUvdri9A1eO02pQlh7M0UX3F8Sm/npRg01yO2 h4mtCWEUwHcIQCF9f+c9znvGMKvLI1CqUg6OPn2buZyWr86g8JxL10T2nRpD2XDdbpb2 8Ut7SUv8TMgWRZ3kWECdpQLwSwr0gaFHznyzLv7N/MhufyuiMBbk4DoXKP/+U0hi62MP VUlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=JjQkhyykclydIKEE++Z680/y4y6pyVsIxKvO1bX5EbI=; b=zYS9FrpbGdoR/6cTwp06+8c9wV4aEEeQj2XxrRWrz8xLA9O7tTlcyekMXaQBbLZvTv Y8HpVW5Hm/8SYCk6Ln72ATDESmEL6Y18fDPIxd7c7iJj2p3J4uwCMfnLUP4fR+rNWZYi rQW67+SMHHFzqvznafyEhVEcBNRR7guiiTDeCTERazS1BEWx9umqBCE+z4UY2t49aT9Q hENzBlOZgJ/SO3E1qgamWjR5bLsnEuez6Gyh4op+C9e6iic6xU87jizCX/XjQfElOQ7g dt1KGATw2e+Z4U7bS7zWPQuV/UCyPuCHqAjpyUYXbAT0HD6L3Eb9WfJEkhK8mapD7j8/ oISQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LjPwlLmz; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 1-v6si6760769pln.415.2018.08.31.06.28.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 06:28:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=LjPwlLmz; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 02FD12110BFBC; Fri, 31 Aug 2018 06:28:34 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::644; helo=mail-pl1-x644.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) (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 96CBD2110BD62 for ; Fri, 31 Aug 2018 06:28:32 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id g23-v6so5479983plq.9 for ; Fri, 31 Aug 2018 06:28:32 -0700 (PDT) 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=GSckMVZa41t/NHYSyG7DEkK6KAQ9qDIcvdIn17k8e10=; b=LjPwlLmzqvKxcZSyWS+pPWFixpJVQGZxF1uwnMxzd4TotbTwc8SY25ySLv8+yvBzkc g2u1of9xO+HTaMKh4EE+/TuD65Xy2dEvtamJ3NJh0yQbGQiPEYNZUQW1Y3azZ4gV8zbx ygpw1x+ReqAwJyEe6wW9IcQPZUz7CQcvkZR5U= 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=GSckMVZa41t/NHYSyG7DEkK6KAQ9qDIcvdIn17k8e10=; b=Pf4LW7B8mjEbJAfLXM+0hwcKIM7547fCQo79+q73PFEKz2r+1Ef/3KeZxh9vPVodfU Bh5/ofMeQ8gjc2y8gEM+BYFJ4oNxlNK7Uf5VMM6FHIW9tGEoXWK08iXpzBtmr+0x51MP AdLBh7yEyi906UNpVI03VJ0B0bPNmybi3se0EFnmR2vYGa6ECTVo+yd5KfGLk32Zs5Kh tqxiyfqNXwso/+ahfnz29Dv6UXtVS3dFwhr0CDf7BKzQTXVEWHAg3iW3z9kpvLq4YZHn yw/AU1Hqgr6TRqyzSbn6b2iw687xwC9zsVDopXwv/UBnU6j/DHjZm13lNAL94LzFPqne /t8g== X-Gm-Message-State: APzg51Dw8Zabu71gXiI0PgxC16pAGJYeQJwEU+m7iBUtDNhXZQuD+eOD IY9WqUWGH/Rso31jRe2elDcrgA== X-Received: by 2002:a17:902:b608:: with SMTP id b8-v6mr15445107pls.312.1535722112209; Fri, 31 Aug 2018 06:28:32 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id l185-v6sm19081936pga.5.2018.08.31.06.28.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Aug 2018 06:28:31 -0700 (PDT) From: Ming Huang To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Fri, 31 Aug 2018 21:27:01 +0800 Message-Id: <20180831132710.23055-20-ming.huang@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180831132710.23055-1-ming.huang@linaro.org> References: <20180831132710.23055-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v5 19/28] Hisilicon/D0x: Update SMBIOS type9 info X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: huangming23@huawei.com, xinliang.liu@linaro.org, john.garry@huawei.com, zhangjinsong2@huawei.com, Sun Yuanchen , guoheyi@huawei.com, huangdaode@hisilicon.com, zhangfeng56@huawei.com, michael.d.kinney@intel.com, lersek@redhat.com, wanghuiqiang@huawei.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" From: Sun Yuanchen Move board level code to OemMiscLibD0x for unifying D0x. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang Reviewed-by: Leif Lindholm --- Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf | 1 + Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf | 1 + Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf | 4 + Platform/Hisilicon/D06/Include/Library/CpldD06.h | 2 + Silicon/Hisilicon/Include/Library/OemMiscLib.h | 1 + Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c | 32 +++++++ Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c | 27 +++++- Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c | 90 ++++++++++++++++++++ Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c | 14 +-- 9 files changed, 159 insertions(+), 13 deletions(-) -- 2.18.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf index 310bbaea84..0fa7fdf80f 100644 --- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf +++ b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.inf @@ -34,6 +34,7 @@ Silicon/Hisilicon/HisiPkg.dec [LibraryClasses] + BaseMemoryLib PcdLib TimerLib diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf index bf44ff7440..022c3e940a 100644 --- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf +++ b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.inf @@ -33,6 +33,7 @@ Silicon/Hisilicon/HisiPkg.dec [LibraryClasses] + BaseMemoryLib PcdLib TimerLib diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf b/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf index 78703663b8..75c5054bbf 100644 --- a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf +++ b/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.inf @@ -30,9 +30,13 @@ ArmPkg/ArmPkg.dec MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec + Platform/Hisilicon/D06/D06.dec Silicon/Hisilicon/HisiPkg.dec [LibraryClasses] + BaseMemoryLib + CpldIoLib + IoLib PcdLib TimerLib diff --git a/Platform/Hisilicon/D06/Include/Library/CpldD06.h b/Platform/Hisilicon/D06/Include/Library/CpldD06.h index be3548c8d1..ec9b49f4e7 100644 --- a/Platform/Hisilicon/D06/Include/Library/CpldD06.h +++ b/Platform/Hisilicon/D06/Include/Library/CpldD06.h @@ -29,6 +29,8 @@ #define CPLD_LOGIC_COMPILE_DAY (0x3) #define CPLD_RISER_PRSNT_FLAG 0x40 +#define CPU1_RISER_PRESENT BIT6 +#define CPU0_RISER_PRESENT BIT7 #define CPLD_RISER2_BOARD_ID 0x44 #define CPLD_X8_X8_X8_BOARD_ID 0x92 diff --git a/Silicon/Hisilicon/Include/Library/OemMiscLib.h b/Silicon/Hisilicon/Include/Library/OemMiscLib.h index efecb9aa77..86ea6a1b3d 100644 --- a/Silicon/Hisilicon/Include/Library/OemMiscLib.h +++ b/Silicon/Hisilicon/Include/Library/OemMiscLib.h @@ -34,6 +34,7 @@ typedef struct _REPORT_PCIEDIDVID2BMC{ UINTN Slot; }REPORT_PCIEDIDVID2BMC; extern REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX]; +extern VOID GetPciDidVid (REPORT_PCIEDIDVID2BMC *Report); BOOLEAN OemIsSocketPresent (UINTN Socket); VOID CoreSelectBoot(VOID); diff --git a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c index fa1039bda1..b57fdfa68e 100644 --- a/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c +++ b/Platform/Hisilicon/D03/Library/OemMiscLib2P/OemMiscLib2PHi1610.c @@ -15,6 +15,7 @@ #include +#include #include #include #include @@ -31,6 +32,37 @@ REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX] = { {0xFFFF,0xFFFF,0xFFFF,0xFFFF} }; +REPORT_PCIEDIDVID2BMC PcieDeviceToReport2P[PCIEDEVICE_REPORT_MAX] = { + {0x79,0,0,0}, + {0xFF,0xFF,0xFF,1}, + {0xC1,0,0,2}, + {0xF9,0,0,3}, + {0xFF,0xFF,0xFF,4}, + {0x11,0,0,5}, + {0x31,0,0,6}, + {0x21,0,0,7} +}; + +VOID +GetPciDidVid ( + REPORT_PCIEDIDVID2BMC *Report + ) +{ + if (OemIsMpBoot ()) { + (VOID)CopyMem ( + (VOID *)Report, + (VOID *)PcieDeviceToReport2P, + sizeof (PcieDeviceToReport2P) + ); + } else { + (VOID)CopyMem ( + (VOID *)Report, + (VOID *)PcieDeviceToReport, + sizeof (PcieDeviceToReport) + ); + } +} + // Right now we only support 1P BOOLEAN OemIsSocketPresent (UINTN Socket) { diff --git a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c index b17eeada16..4c4c944dbe 100644 --- a/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c +++ b/Platform/Hisilicon/D05/Library/OemMiscLibD05/OemMiscLibD05.c @@ -1,7 +1,7 @@ /** @file * -* Copyright (c) 2016, Hisilicon Limited. All rights reserved. -* Copyright (c) 2016, Linaro Limited. All rights reserved. +* Copyright (c) 2016 - 2018, Hisilicon Limited. All rights reserved. +* Copyright (c) 2016 - 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 @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -37,6 +38,28 @@ REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX] = { {0xFFFF,0xFFFF,0xFFFF,0xFFFF} }; +REPORT_PCIEDIDVID2BMC PcieDeviceToReport_2P[PCIEDEVICE_REPORT_MAX] = { + {0x79,0,0,0}, + {0xFF,0xFF,0xFF,1}, + {0xC1,0,0,2}, + {0xF9,0,0,3}, + {0xFF,0xFF,0xFF,4}, + {0x11,0,0,5}, + {0x31,0,0,6}, + {0x21,0,0,7} +}; + +VOID +GetPciDidVid ( + REPORT_PCIEDIDVID2BMC *Report + ) +{ + if (OemIsMpBoot ()) { + (VOID)CopyMem ((VOID *)Report, (VOID *)PcieDeviceToReport_2P, sizeof (PcieDeviceToReport_2P)); + } else { + (VOID)CopyMem ((VOID *)Report, (VOID *)PcieDeviceToReport, sizeof (PcieDeviceToReport)); + } +} BOOLEAN OemIsSocketPresent (UINTN Socket) { diff --git a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c b/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c index 95521752ff..2a9db46d1f 100644 --- a/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c +++ b/Platform/Hisilicon/D06/Library/OemMiscLibD06/OemMiscLibD06.c @@ -15,6 +15,8 @@ #include #include +#include +#include #include #include #include @@ -33,6 +35,94 @@ REPORT_PCIEDIDVID2BMC PcieDeviceToReport[PCIEDEVICE_REPORT_MAX] = { {0xFFFF,0xFFFF,0xFFFF,0xFFFF} }; +//Cpu0 Riser type is (X16 + X8) & Cpu1 Riser type is (X16 + X8) +REPORT_PCIEDIDVID2BMC PcieDeviceToReport_2P_Type1 [PCIEDEVICE_REPORT_MAX] = { + {0x01,0,0,0}, + {0x03,0,0,1}, + {0xFF,0xFF,0xFF,2}, + {0x81,0,0,3}, + {0x84,0,0,4}, + {0xFF,0xFF,0xFF,5} +}; + +//Cpu0 Riser type is (X16 + X8) & Cpu1 Riser type is (3 * X8) +REPORT_PCIEDIDVID2BMC PcieDeviceToReport_2P_Type2 [PCIEDEVICE_REPORT_MAX] = { + {0x01,0,0,0}, + {0x03,0,0,1}, + {0xFF,0xFF,0xFF,2}, + {0xFF,0xFF,0xFF,3}, + {0x81,0,0,4}, + {0x85,0,0,5} +}; + +//Cpu0 Riser type is (3 * X8) & Cpu1 Riser type is (X16 + X8) +REPORT_PCIEDIDVID2BMC PcieDeviceToReport_2P_Type3 [PCIEDEVICE_REPORT_MAX] = { + {0xFF,0xFF,0xFF,0}, + {0x01,0,0,1}, + {0x04,0,0,2}, + {0x81,0,0,3}, + {0x84,0,0,4}, + {0xFF,0xFF,0xFF,5} +}; + +//Cpu0 Riser type is (3 * X8) & Cpu1 Riser type is (3 * X8) +REPORT_PCIEDIDVID2BMC PcieDeviceToReport_2P_Type4 [PCIEDEVICE_REPORT_MAX] = { + {0xFF,0xFF,0xFF,0}, + {0x01,0,0,1}, + {0x04,0,0,2}, + {0xFF,0xFF,0xFF,3}, + {0x81,0,0,4}, + {0x85,0,0,5} +}; + +VOID +GetPciDidVid ( + REPORT_PCIEDIDVID2BMC *Report + ) +{ + UINT32 PresentStatus; + UINT32 CardType; + UINT8 Cpu0CardType = 0; + UINT8 Cpu1CardType = 0; + + PresentStatus = MmioRead32 (CPLD_BASE_ADDRESS + CPLD_RISER_PRSNT_FLAG); + CardType = MmioRead32 (CPLD_BASE_ADDRESS + CPLD_RISER2_BOARD_ID); + + // Offset 0x40: Bit7 = 1 CPU0 Riser present + if ((PresentStatus & CPU0_RISER_PRESENT) != 0) { + Cpu0CardType = (UINT8) (PresentStatus >> 8); + } + + // Offset 0x40: Bit6 = 1 CPU1 Riser present + if ((PresentStatus & CPU1_RISER_PRESENT) != 0) { + Cpu1CardType = (UINT8)CardType; + } + + if (OemIsMpBoot ()) { + if (Cpu0CardType == CPLD_X16_X8_BOARD_ID) { + if (Cpu1CardType == CPLD_X16_X8_BOARD_ID) { + (VOID)CopyMem ((VOID *)Report, (VOID *)PcieDeviceToReport_2P_Type1, + sizeof (PcieDeviceToReport_2P_Type1)); + } else { + (VOID)CopyMem ((VOID *)Report, (VOID *)PcieDeviceToReport_2P_Type2, + sizeof (PcieDeviceToReport_2P_Type2)); + } + } else { + if (Cpu1CardType == CPLD_X16_X8_BOARD_ID) { + (VOID)CopyMem ((VOID *)Report, (VOID *)PcieDeviceToReport_2P_Type3, + sizeof (PcieDeviceToReport_2P_Type3)); + } else { + (VOID)CopyMem ((VOID *)Report, (VOID *)PcieDeviceToReport_2P_Type4, + sizeof (PcieDeviceToReport_2P_Type4)); + } + } + } else { + (VOID)CopyMem ((VOID *)Report, (VOID *)PcieDeviceToReport, + sizeof (PcieDeviceToReport)); + } +} + + // Right now we only support 1P BOOLEAN OemIsSocketPresent ( diff --git a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c index 8d8dacd3e0..cc1131577d 100644 --- a/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c +++ b/Silicon/Hisilicon/Drivers/Smbios/AddSmbiosType9/AddSmbiosType9.c @@ -18,12 +18,6 @@ extern SMBIOS_TABLE_TYPE9 gPcieSlotInfo[]; extern UINT8 OemGetPcieSlotNumber (); -REPORT_PCIEDIDVID2BMC PcieDeviceToReport_2P[PCIEDEVICE_REPORT_MAX] = { - {67,0,0,0}, - {225,0,0,3}, - {0xFFFF,0xFFFF,0xFFFF,0xFFFF}, - {0xFFFF,0xFFFF,0xFFFF,0xFFFF} -}; VOID EFIAPI UpdateSmbiosType9Info( @@ -41,11 +35,9 @@ UpdateSmbiosType9Info( UINTN FunctionNumber; UINTN Index; REPORT_PCIEDIDVID2BMC ReportPcieDidVid[PCIEDEVICE_REPORT_MAX]; - if(OemIsMpBoot()){ - (VOID)CopyMem((VOID *)ReportPcieDidVid,(VOID *)PcieDeviceToReport_2P,sizeof(PcieDeviceToReport_2P)); - } else { - (VOID)CopyMem((VOID *)ReportPcieDidVid,(VOID *)PcieDeviceToReport,sizeof(PcieDeviceToReport)); - } + + GetPciDidVid ((VOID *) ReportPcieDidVid); + Status = gBS->LocateHandleBuffer ( ByProtocol, &gEfiPciIoProtocolGuid,