From patchwork Mon Jun 22 23:30:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 50197 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 876F021575 for ; Mon, 22 Jun 2015 23:30:57 +0000 (UTC) Received: by lbbvz5 with SMTP id vz5sf4818758lbb.1 for ; Mon, 22 Jun 2015 16:30:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=eg1HslrLJ92HGVvDYx3+1Kny7i0DS/sj/GV/gxWznv4=; b=bGCM3wG5iY5TAm8LxdOqeIEAKc1+ESvIQ7GmYz/J+zSZpEs1LHDPUj+hSbLBPOiizm AdgBFxhwyS4fqjVHOdP4pIwRdeT8KJRN+NJavij+8eLW/pnfaFU2gPgclFjSr/jrYs5B W0RhymOsDZ0Wt5RS/+LMuieSFuPeAWhlPwneHjUv6hyPnPk11ngdLuol517tU5/ANNZj pU5syCP1U4Fi+gTh3ut+DjjkuXAerRlGVXzAEWiBvvqfzOrOFy4mN3gX8eu1BrI7PpXR N0tGoqFevrkpOZowjyqS4CSOGJ5exFM5u8ZAIYy45/BAJ9sQFdpdBTqgh5kO4q03UQpI Nkqw== X-Gm-Message-State: ALoCoQnhpf6BHcjSE4UXdRQGVKh11JqJ5bGTdHJ+RqXywA0sytN1Qtdg8TLC3WTakqpgGGKxQFmt X-Received: by 10.152.219.166 with SMTP id pp6mr29751294lac.1.1435015856561; Mon, 22 Jun 2015 16:30:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.133 with SMTP id kq5ls913286lac.102.gmail; Mon, 22 Jun 2015 16:30:56 -0700 (PDT) X-Received: by 10.152.219.3 with SMTP id pk3mr32344025lac.114.1435015856406; Mon, 22 Jun 2015 16:30:56 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id i6si17768373laa.144.2015.06.22.16.30.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jun 2015 16:30:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by laka10 with SMTP id a10so119374871lak.0 for ; Mon, 22 Jun 2015 16:30:56 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr32476403lbc.19.1435015856300; Mon, 22 Jun 2015 16:30:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp2697047lbb; Mon, 22 Jun 2015 16:30:55 -0700 (PDT) X-Received: by 10.42.99.70 with SMTP id v6mr27821490icn.1.1435015846979; Mon, 22 Jun 2015 16:30:46 -0700 (PDT) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id k196si17213111ioe.102.2015.06.22.16.30.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 22 Jun 2015 16:30:46 -0700 (PDT) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z7BAj-0005jW-CD; Mon, 22 Jun 2015 23:30:37 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Z7BAi-0005jR-Aj for edk2-devel@lists.sourceforge.net; Mon, 22 Jun 2015 23:30:36 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; envelope-from=roy.franz@linaro.org; helo=mail-pa0-f41.google.com; Received: from mail-pa0-f41.google.com ([209.85.220.41]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1Z7BAh-0000M5-CR for edk2-devel@lists.sourceforge.net; Mon, 22 Jun 2015 23:30:36 +0000 Received: by padev16 with SMTP id ev16so143718678pad.0 for ; Mon, 22 Jun 2015 16:30:29 -0700 (PDT) X-Received: by 10.70.22.235 with SMTP id h11mr63861444pdf.135.1435015829736; Mon, 22 Jun 2015 16:30:29 -0700 (PDT) Received: from localhost.localdomain (c-73-41-93-56.hsd1.ca.comcast.net. [73.41.93.56]) by mx.google.com with ESMTPSA id tj8sm21143238pab.30.2015.06.22.16.30.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 22 Jun 2015 16:30:28 -0700 (PDT) From: Roy Franz To: edk2-devel@lists.sourceforge.net, feng.tian@intel.com, lersek@redhat.com, ard.biesheuvel@linaro.org Date: Mon, 22 Jun 2015 16:30:11 -0700 Message-Id: <1435015811-25912-5-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1435015811-25912-1-git-send-email-roy.franz@linaro.org> References: <1435015811-25912-1-git-send-email-roy.franz@linaro.org> X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1Z7BAh-0000M5-CR Cc: Roy Franz Subject: [edk2] [PATCH 4/4] Add PCD for selecting terminal type X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Laszlo Ersek Add a fixed pointer PCD to allow build-time selection of VT100 or TTY terminal type. The default remains VT100 emulation, and building with the "-D TTY_TERMINAL" option will configure the use of the TTY terminal type. Signed-off-by: Roy Franz Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz --- ArmVirtPkg/ArmVirt.dsc.inc | 6 ++++++ ArmVirtPkg/ArmVirtPkg.dec | 7 +++++++ ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c | 12 ++++++++---- ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf | 4 ++++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index c6e684f..6ba8241 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -14,6 +14,7 @@ [Defines] DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x8000004F + DEFINE TTY_TERMINAL = FALSE [LibraryClasses.common] !if $(TARGET) == RELEASE @@ -354,6 +355,11 @@ gEfiSecurityPkgTokenSpaceGuid.PcdRemovableMediaImageVerificationPolicy|0x04 !endif +!if $(TTY_TERMINAL) == TRUE + # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID + gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94} +!endif + [Components.common] # # Networking stack diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index 7bbd9ff..9833c5a 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -49,6 +49,13 @@ # gArmVirtTokenSpaceGuid.PcdDeviceTreeAllocationPadding|256|UINT32|0x00000002 + # + # Binary representation of the GUID that determines the terminal type. The + # size must be exactly 16 bytes. The default value corresponds to + # EFI_VT_100_GUID. + # + gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x00000007 + [PcdsDynamic, PcdsFixedAtBuild] # # ARM PSCI function invocations can be done either through hypervisor diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c index 499cce5..a04d603 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c @@ -34,7 +34,7 @@ typedef struct { VENDOR_DEVICE_PATH SerialDxe; UART_DEVICE_PATH Uart; - VENDOR_DEFINED_DEVICE_PATH Vt100; + VENDOR_DEFINED_DEVICE_PATH TermType; EFI_DEVICE_PATH_PROTOCOL End; } PLATFORM_SERIAL_CONSOLE; #pragma pack () @@ -66,14 +66,16 @@ STATIC PLATFORM_SERIAL_CONSOLE mSerialConsole = { }, // - // VENDOR_DEFINED_DEVICE_PATH Vt100 + // VENDOR_DEFINED_DEVICE_PATH TermType // { { MESSAGING_DEVICE_PATH, MSG_VENDOR_DP, DP_NODE_LEN (VENDOR_DEFINED_DEVICE_PATH) - }, - EFI_VT_100_GUID + } + // + // Guid to be filled in dynamically + // }, // @@ -385,6 +387,8 @@ PlatformBdsPolicyBehavior ( // // Add the hardcoded serial console device path to ConIn, ConOut, ErrOut. // + CopyGuid (&mSerialConsole.TermType.Guid, + PcdGetPtr (PcdTerminalTypeGuidBuffer)); BdsLibUpdateConsoleVariable (L"ConIn", (EFI_DEVICE_PATH_PROTOCOL *)&mSerialConsole, NULL); BdsLibUpdateConsoleVariable (L"ConOut", diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf index d8f8926..b9fb536 100644 --- a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf +++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf @@ -39,6 +39,7 @@ MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec OvmfPkg/OvmfPkg.dec + ArmVirtPkg/ArmVirtPkg.dec [LibraryClasses] BaseLib @@ -61,6 +62,9 @@ gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits +[Pcd] + gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer + [Guids] gEfiFileInfoGuid gEfiFileSystemInfoGuid