From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c01::244; helo=mail-pl0-x244.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x244.google.com (mail-pl0-x244.google.com [IPv6:2607:f8b0:400e:c01::244]) (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 24811210E3DF8 for ; Thu, 9 Aug 2018 07:17:57 -0700 (PDT) Received: by mail-pl0-x244.google.com with SMTP id w19-v6so2613921ply.8 for ; Thu, 09 Aug 2018 07:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=weLTf5qCWaM/iXwQvPrdgFF0G3sEh/S1GkA9dd++7Xs=; b=HzyTJnaML8NQKi0Ppv+1dQwfeuWzDB7bkilweNX+H+wImwBPKs/MTcvYnuoDcRYEji dYH0gNwfIzgb4Q5rgBbKJgnsKOEijpfctFak3uFwrxDD3H54/FNEi88ylLt3wUHYQ8QL MdZL8iRIYT2cYNHUGPpAEMCVoqAiIv91cQnCY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=weLTf5qCWaM/iXwQvPrdgFF0G3sEh/S1GkA9dd++7Xs=; b=F2xBygstZCh9wIOt4dMX8uFA01ChbnFokXqz/bOY2MfuiLTBpQJGUfhJ7r91HC0Btt Z7vOL8fSnfJDZi0/5aJ1gzAPVlnMZSiFj1zvS3AAdDNroDaf4RNqHrTLpmrUAYzqAB+S VUsk21HL0ozhxZYF7d4jBlfw+Is0BLUuN4sm/2C0uxMr5/TV29ObbqIVObtawaHuIkGS rOhhbtyoDRZmhYgfqiXishX85B2dKqUt6QhluDvor2brygt7linCH04gDhf7YlAvN73I 58MaCEgc/XHhBMu4u3hPd5W11JH89T15hevOYRDR1qj3nz4uideddeejVK6MYT7jTrxk H9OQ== X-Gm-Message-State: AOUpUlGD6K3dG1aSJw6XxGnWEaFQICDOopPYVeIZyFRrQnKYN86Ikqcp 5ZkBY4saa/CQLCF7sNl+iHt5Uw== X-Google-Smtp-Source: AA+uWPytOx36OPvMadQ5HSZmj4hym9vGvbYpmWTgmu3lpGW7y0fEfCnUFOmYc6yXxCBCBPRqa2gxjw== X-Received: by 2002:a17:902:7e06:: with SMTP id b6-v6mr2274323plm.230.1533824277588; Thu, 09 Aug 2018 07:17:57 -0700 (PDT) Received: from [10.199.0.182] ([64.64.108.224]) by smtp.gmail.com with ESMTPSA id l10-v6sm3825479pfj.179.2018.08.09.07.17.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 07:17:57 -0700 (PDT) To: Leif Lindholm Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org, ard.biesheuvel@linaro.org, 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: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-36-ming.huang@linaro.org> <20180804152039.hhbfyeyxqwv64itg@bivouac.eciton.net> From: Ming Message-ID: Date: Thu, 9 Aug 2018 22:17:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180804152039.hhbfyeyxqwv64itg@bivouac.eciton.net> Subject: Re: [PATCH edk2-platforms v1 35/38] Silicon/Hisilicon/Setup: Support SPCR table switch X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Aug 2018 14:17:58 -0000 Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit ÔÚ 8/4/2018 11:20 PM, Leif Lindholm дµÀ: > On Tue, Jul 24, 2018 at 03:09:19PM +0800, Ming Huang wrote: >> If install SPCR table, KVM will not output while install or boot >> some OS, like ubuntu, > > Will not output? > Do you mean it disables the graphical output of the OS? Yes, the behaviour of OS is like description above. I guess some OS select serial for output and disable graphical output when SPCR is installed. Thanks. > > / > Leif > >> so add SPCR switch setup item and set it >> disable by default. >> >> 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 e268a56bbd..c32fe42d60 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 >>