From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::441; helo=mail-pf1-x441.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) (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 CB64E21103964 for ; Thu, 23 Aug 2018 03:51:22 -0700 (PDT) Received: by mail-pf1-x441.google.com with SMTP id j26-v6so2508028pfi.10 for ; Thu, 23 Aug 2018 03:51:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Mpc8E62nAaSw6D/FjZ7+IgGuqhwq+JU4jklQIRP++g0=; b=dywI3/gOaQIkF69eaAX2oP8fM4lll/diaFOHU1h9PUrWFl+z2ODemGuoBrXavfCwk8 UpJ6yD09Z8uuC0FhuJSSy8cridBewmebMMnjLStTlIHjUCNw7p5ZPitsYl3ABZXC9rxD fggHK0LkQvNu1dtZBT+Dc7RJMT1hjQ5cu8XoQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Mpc8E62nAaSw6D/FjZ7+IgGuqhwq+JU4jklQIRP++g0=; b=HMfkjVzzL1pYS3Gs05aDxZMss9HkfkRfm0ca3JFWQNsGYBT3U6+NL73DzNP1FdXp4g GIoHaYBLW7f+PT0rBPQW5EVRs/dNArh8VFHgue7f+WbArJJSd9aPo0edLiI91A1GXxjz u1wiepfEzkaVu4F79naEcz7++4OPkItrJO6OkPzYTK5LOVZS7aHswbvPrvNoMOS67/i9 cFxtORGP5TXC15e50Ek5RzTtcgIcBhqS1A+GvbyUvl16lSMvqKSl+KnK1aQ8+IFG4JyZ w9PUQVy3FR4RlWl1Yvlt2+1BFtht2lZWZI1uXhzTz8U9x/lNAa5xmOQHA4KA8Z4WPw1E MAnw== X-Gm-Message-State: AOUpUlGkgmGQd3pf/6J1E1GLDYefYIk73vYnSaa9lzp+HEfYwS0Z82F6 QbuAF348rTaKd+2L1rQPud7p9w== X-Google-Smtp-Source: AA+uWPwWrwDPs06gdGhPH5dmWoRPzrZMZgF9JLedPzAyg0o4fu8NHdEbmeKll8ljXPW7VRbkr+IjsA== X-Received: by 2002:a63:db4f:: with SMTP id x15-v6mr53987910pgi.214.1535021481918; Thu, 23 Aug 2018 03:51:21 -0700 (PDT) Received: from [10.84.0.214] ([64.64.108.140]) by smtp.gmail.com with ESMTPSA id p11-v6sm7469561pfj.72.2018.08.23.03.51.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Aug 2018 03:51:21 -0700 (PDT) From: Ming To: Leif Lindholm Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, michael.d.kinney@intel.com, lersek@redhat.com, guoheyi@huawei.com, wanghuiqiang@huawei.com, huangming23@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, john.garry@huawei.com, xinliang.liu@linaro.org, Heyi Guo References: <20180816121239.44129-1-ming.huang@linaro.org> <20180816121239.44129-33-ming.huang@linaro.org> <20180821211145.yn2fgvgjdwkepwel@bivouac.eciton.net> <6cf5a20d-b648-1ae8-043d-75f241fc4123@linaro.org> Message-ID: Date: Thu, 23 Aug 2018 18:50:57 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <6cf5a20d-b648-1ae8-043d-75f241fc4123@linaro.org> Subject: Re: [PATCH edk2-platforms v3 32/36] Silicon/Hisilicon/Setup: Support SPCR table switch 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: , X-List-Received-Date: Thu, 23 Aug 2018 10:51:23 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Leif, Is it ok replace with ConsolePrefDxe after ERP 18.08? On 8/22/2018 10:49 AM, Ming wrote: > > > On 8/22/2018 5:11 AM, Leif Lindholm wrote: >> On Thu, Aug 16, 2018 at 08:12:35PM +0800, Ming Huang wrote: >>> If install SPCR table, KVM will not output while install or boot >>> some OS, like ubuntu, so add SPCR switch setup item and set it >>> disable by default. >> >> This one was supposed to be replaced with >> EmbeddedPkg/Drivers/ConsolePrefDxe, right? > > Yes, I will take a look ConsolePrefDxe and replace with it after ERP 18.08. > >> >> / >> Leif >> >>> Contributed-under: TianoCore Contribution Agreement 1.1 >>> Signed-off-by: Ming Huang >>> Signed-off-by: Heyi Guo >>> --- >>> Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf | 1 + >>> Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c | 24 ++++++++++++++++++++ >>> 2 files changed, 25 insertions(+) >>> >>> diff --git a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf >>> index 281a4f2ebd..3d133aff85 100644 >>> --- a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf >>> +++ b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/AcpiPlatformDxe.inf >>> @@ -51,6 +51,7 @@ >>> >>> [Guids] >>> gHisiEfiMemoryMapGuid >>> + gOemConfigGuid >>> >>> [Pcd] >>> gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile ## CONSUMES >>> diff --git a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c >>> index 54f49977c3..32878ca4f9 100644 >>> --- a/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c >>> +++ b/Silicon/Hisilicon/Drivers/HisiAcpiPlatformDxe/UpdateAcpiTable.c >>> @@ -16,8 +16,10 @@ >>> #include >>> #include >>> #include >>> +#include >>> #include >>> #include >>> +#include >>> #include >>> >>> #define CORECOUNT(X) ((X) * CORE_NUM_PER_SOCKET) >>> @@ -114,6 +116,25 @@ UpdateSlit ( >>> return EFI_SUCCESS; >>> } >>> >>> +STATIC >>> +EFI_STATUS >>> +IsNeedSpcr ( >>> + IN OUT EFI_ACPI_DESCRIPTION_HEADER *Table >>> + ) >>> +{ >>> + EFI_STATUS Status; >>> + OEM_CONFIG_DATA SetupData; >>> + UINTN DataSize = sizeof (OEM_CONFIG_DATA); >>> + >>> + Status = gRT->GetVariable (OEM_CONFIG_NAME, &gOemConfigGuid, NULL, &DataSize, &SetupData); >>> + if (!EFI_ERROR (Status) && (SetupData.EnableSpcr == FALSE)) { >>> + return EFI_ABORTED; >>> + } >>> + >>> + return EFI_SUCCESS; >>> +} >>> + >>> + >>> EFI_STATUS >>> UpdateAcpiTable ( >>> IN OUT EFI_ACPI_DESCRIPTION_HEADER *TableHeader >>> @@ -130,6 +151,9 @@ UpdateAcpiTable ( >>> case EFI_ACPI_6_0_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE: >>> Status = UpdateSlit (TableHeader); >>> break; >>> + case EFI_ACPI_6_2_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE: >>> + Status = IsNeedSpcr (TableHeader); >>> + break; >>> } >>> return Status; >>> } >>> -- >>> 2.17.0 >>>