From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::443; helo=mail-wr1-x443.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 AC314210D93C6 for ; Sat, 4 Aug 2018 08:20:43 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id h10-v6so8138783wre.6 for ; Sat, 04 Aug 2018 08:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6cQTMST2l2HbzRlLz04AsGVR2NB57VJPzzFsRC9Wc5I=; b=i+H1GjPHME4LQcVWDNTH8sen7ZTLXloI6mRJlwyIYhdfA6p4aC7OQ+i+PyEyLHpi/q 5uRv7+FT+ELDcpQWfRyu0ee/UcII5tQ8SoByuF+52z67QCdnm4j51sF4ibzDLfJxZUXt zCqNtHa8i0MH5RBtZC+cEEiMo+8vrHTbAcJMQ= 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=6cQTMST2l2HbzRlLz04AsGVR2NB57VJPzzFsRC9Wc5I=; b=dWFSRndk9upUXGripLm4Jpva79auc21aV0l8oEY9u7ovRvUNz3dOpbVNf2617SDAF8 Yy65ILKoBqab9qovijje4zDZWBULaBX3ZvYy6QqJQOBiG0NMefb8qti+38IA4sGuxpm4 c/6fzE56ITWtLuQbUsUSIDLoKhWHDogenzAnA+w367YO49HcCfiz8fIJQFTbhZIWgPI9 1PyCQ2J3d0jqHRt1hDUUXliCYpjMRexUbotvc3YIhn3qVmfUPuEGh/G8d/hntC3rDX94 uDD/OeErJ1B4WOvJzaN7SJNyHY4wfvR8jCb0AFDdVLGV/Xx/01A0zBRQ0ZgAoHCHPEqK 5fjw== X-Gm-Message-State: AOUpUlFJRX70No5uaHncBlf4knSluTW+QTC1GfK1K3y084W158hl6fUs /e0hFAaB1e9lEVL0TK2pgI7uCw== X-Google-Smtp-Source: AAOMgpfZ5WmTwJgZPKFwvxdrG4dLQTv7eGYM/SttzROQtCIMByhpuZMzvCqPldQBxE0zj7gsjVUZpA== X-Received: by 2002:adf:ea0a:: with SMTP id q10-v6mr5254393wrm.224.1533396042059; Sat, 04 Aug 2018 08:20:42 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id y203-v6sm2933325wmd.1.2018.08.04.08.20.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Aug 2018 08:20:40 -0700 (PDT) Date: Sat, 4 Aug 2018 16:20:39 +0100 From: Leif Lindholm To: Ming Huang 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 Message-ID: <20180804152039.hhbfyeyxqwv64itg@bivouac.eciton.net> References: <20180724070922.63362-1-ming.huang@linaro.org> <20180724070922.63362-36-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20180724070922.63362-36-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) 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: Sat, 04 Aug 2018 15:20:44 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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? / 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 >