From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web09.9369.1581614179732816647 for ; Thu, 13 Feb 2020 09:16:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=a9lsKTKM; spf=pass (domain: nuviainc.com, ip: 209.85.128.67, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f67.google.com with SMTP id s144so193838wme.1 for ; Thu, 13 Feb 2020 09:16:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=D6WBqQS8nXXiBLNQGZAhZgBJyGTasnwWerEI/NGELYI=; b=a9lsKTKMMk3EMwrfJk2YPUOkzVxqf5MjN49Hn9KcMi0F+Q8/CbrYBNfXkfHkSNpk8r yuQUuG7U3v3YxfvqooIlTfRikmU3Vp1zaMBeOe4Tx/df3FkfALIRQeZ1fMa2062HyLMF cfVIb4NWEZE2VAKp6Vu4XMjco6PoZgcUE7EvHI4X3m3c7kCKA9fz2p635PWZ2Ma0QuqM sFpVcyx3Kxf1bNC2/b3Kg3Tyh/sySa0sic/e0OPppR/FP4AdD/9FW6c0zy1o8bZBjAYJ OoH1GrqHXAWeJwE71B1Mzw935hGtb6927d2JFILFyHo0eKGEi7PuHv8n+mc4XjAAA8c0 YCuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=D6WBqQS8nXXiBLNQGZAhZgBJyGTasnwWerEI/NGELYI=; b=OT/JxhRp4xupCnge19JGr3IY6Ifu+E5qzvKfCGCddhp2/V+rI+YIsPKem83LBqemWB jkhZHSbjJFLb3lBhgtuvss3nVS0k5feVZxmPU+YNY5KA0sDh38wV+4HOf7GeCfpGJ7Lq cfinlr6vRMStn/m4S+BOgUOy5Z8i+n3J0rihPWuq097gdIUlAkvCfF8vtcIsKYJiM5hO cfOLRUfBc/sB4na/DxUEphfs68usKiKoiNAvqpO7/wYDnCRVIGpVp8MgVna05emVWL+o AHbLNrD4E0AX3J4WzKhoT9bNumq5qLIdwOanGCYwbuvn0KA6rnUUCvWONW/DCcToOKUQ t3Hw== X-Gm-Message-State: APjAAAUG70zbluRM8NfoT/IK+Z1Ju+RoSOKIr6pALvKwq2iRVM7Z4OmT 5MTUuDYxElJ3sIeHoYQyizmF6vJctuE= X-Google-Smtp-Source: APXvYqwf3BQggNughPcon0CutDqkhpmcAJm+JwzFLGTFLw7DYo6X1RWZjTtc0etH4/tNhWsomF47Dg== X-Received: by 2002:a05:600c:218b:: with SMTP id e11mr6968697wme.56.1581614178165; Thu, 13 Feb 2020 09:16:18 -0800 (PST) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id s15sm3361361wrp.4.2020.02.13.09.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 09:16:17 -0800 (PST) Date: Thu, 13 Feb 2020 17:16:16 +0000 From: "Leif Lindholm" To: Vijayenthiran Subramaniam Cc: devel@edk2.groups.io, michael.d.kinney@intel.com, Ard.Biesheuvel@arm.com, thomas.abraham@arm.com Subject: Re: [edk2-platforms] [PATCH v2 3/5] Platform/ARM/SgiPkg: Add MultiChipMode to Platform Descriptor Message-ID: <20200213171616.GN23627@bivouac.eciton.net> References: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> <1581514167-1340-4-git-send-email-vijayenthiran.subramaniam@arm.com> MIME-Version: 1.0 In-Reply-To: <1581514167-1340-4-git-send-email-vijayenthiran.subramaniam@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Feb 12, 2020 at 18:59:25 +0530, Vijayenthiran Subramaniam wrote: > The 'system-id' node of HW_CONFIG device tree has been updated to have > a new property 'multi-chip-mode' which holds the information about the > multi-chip-mode support. To adapt to this change, add 'MultiChipMode' > member to SGI_PLATFORM_DESCRIPTOR structure to get 'multi-chip-mode' > property from fdt. > > Signed-off-by: Vijayenthiran Subramaniam Apart from the "i" variable: Reviewed-by: Leif Lindholm As long as that is the only thing that changes, please keep that R-b when sending out v3. / Leif > --- > Platform/ARM/SgiPkg/Include/SgiPlatform.h | 4 ++++ > Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 13 ++++++++++--- > Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 8 ++++++++ > 3 files changed, 22 insertions(+), 3 deletions(-) > > diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPkg/Include/SgiPlatform.h > index e4a2e8cc0971..7c9322d1cda9 100644 > --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h > +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h > @@ -79,10 +79,14 @@ > #define SGI_CONFIG_SHIFT 0x1C > #define SGI_PART_NUM_MASK 0xFFF > > +#define MULTI_CHIP_MODE_DISABLED 0x0 > +#define MULTI_CHIP_MODE_ENABLED 0x1 > + > // ARM platform description data. > typedef struct { > UINTN PlatformId; > UINTN ConfigId; > + UINTN MultiChipMode; > } SGI_PLATFORM_DESCRIPTOR; > > #endif // __SGI_PLATFORM_H__ > diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c > index 4ab0dd768cd1..a2250a37bb57 100644 > --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c > +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c > @@ -17,10 +17,10 @@ typedef struct { > } SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP; > > // Macro to construct the SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP structure > -#define ACPI_GUID_LOOKUP(PART_NUM, CONFIG_NUM, GUID) \ > +#define ACPI_GUID_LOOKUP(PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE, GUID) \ > { \ > { \ > - PART_NUM, CONFIG_NUM \ > + PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE \ > }, \ > GUID \ > } \ > @@ -29,14 +29,17 @@ STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] = { > ACPI_GUID_LOOKUP ( > SGI575_PART_NUM, > SGI575_CONF_NUM, > + MULTI_CHIP_MODE_DISABLED, > &gSgi575AcpiTablesFileGuid), > ACPI_GUID_LOOKUP ( > RD_N1E1_EDGE_PART_NUM, > RD_N1_EDGE_CONF_ID, > + MULTI_CHIP_MODE_DISABLED, > &gRdN1EdgeAcpiTablesFileGuid), > ACPI_GUID_LOOKUP ( > RD_N1E1_EDGE_PART_NUM, > RD_E1_EDGE_CONF_ID, > + MULTI_CHIP_MODE_DISABLED, > &gRdE1EdgeAcpiTablesFileGuid), > }; > > @@ -58,6 +61,7 @@ ArmSgiPkgEntryPoint ( > UINT8 i; > UINT32 ConfigId; > UINT32 PartNum; > + UINT32 MultiChipMode; > > SystemIdHob = GetFirstGuidHob (&gArmSgiPlatformIdDescriptorGuid); > if (SystemIdHob == NULL) { > @@ -69,13 +73,16 @@ ArmSgiPkgEntryPoint ( > > PartNum = HobData->PlatformId; > ConfigId = HobData->ConfigId; > + MultiChipMode = HobData->MultiChipMode; > > Status = EFI_UNSUPPORTED; > > // Walk through the AcpiTableGuidLookup lookup array > for (i = 0; i < ARRAY_SIZE (AcpiTableGuidLookup); i++) { > if ((PartNum == AcpiTableGuidLookup[i].SgiPlafromDescriptor.PlatformId) && > - (ConfigId == AcpiTableGuidLookup[i].SgiPlafromDescriptor.ConfigId)) { > + (ConfigId == AcpiTableGuidLookup[i].SgiPlafromDescriptor.ConfigId) && > + (MultiChipMode == > + AcpiTableGuidLookup[i].SgiPlafromDescriptor.MultiChipMode)) { > Status = LocateAndInstallAcpiFromFv (AcpiTableGuidLookup[i].AcpiTableGuid); > break; > } > diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c > index 4daa1832dfaf..7df52cc4fd7c 100644 > --- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c > +++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c > @@ -75,6 +75,14 @@ GetSgiSystemId ( > > HobData->ConfigId = fdt32_to_cpu (*Property); > > + Property = fdt_getprop (NtFwCfgDtBlob, Offset, "multi-chip-mode", NULL); > + if (Property == NULL) { > + DEBUG ((DEBUG_WARN, "multi-chip-mode property not found\n")); > + HobData->MultiChipMode = 0; > + } else { > + HobData->MultiChipMode = fdt32_to_cpu (*Property); > + } > + > return EFI_SUCCESS; > } > > -- > 2.7.4 >