public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Paweł Poławski" <ppolawsk@redhat.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Jiewen Yao <jiewen.yao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [edk2-devel] PATCH v3 3/3 OvmfPkg: take PcdResizeXterm from the QEMU command line
Date: Fri, 17 Feb 2023 14:01:39 +0100	[thread overview]
Message-ID: <cfe1634e34cf4fb2fbad2fa3c6ba3ebe5bbd701e.1675733286.git.ppolawsk@redhat.com> (raw)
In-Reply-To: <cover.1675733286.git.ppolawsk@redhat.com>

From: Laszlo Ersek <lersek@redhat.com>

This patch enables recognition of PcdResizeXterm config variable
by the OvmfPkg. When enablet it will trigger passing xterm control sequences
from the OvmfPkg to the client terminal (xterm, gnome-terminal etc.).
This way client terminal window size will be alligned with
numbers of rows and columns requested by the firmware.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Pawel Polawski: Updated commit message for re-submission

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>

Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
---
 OvmfPkg/AmdSev/AmdSevX64.dsc        | 6 +++++-
 OvmfPkg/CloudHv/CloudHvX64.dsc      | 6 +++++-
 OvmfPkg/IntelTdx/IntelTdxX64.dsc    | 6 +++++-
 OvmfPkg/Microvm/MicrovmX64.dsc      | 6 +++++-
 OvmfPkg/OvmfPkgIa32.dsc             | 6 +++++-
 OvmfPkg/OvmfPkgIa32X64.dsc          | 6 +++++-
 OvmfPkg/OvmfPkgX64.dsc              | 6 +++++-
 OvmfPkg/PlatformPei/PlatformPei.inf | 1 +
 8 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index 36100f5fdc11..d4429526709b 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -477,6 +477,7 @@ [PcdsFixedAtBuild]
 [PcdsDynamicDefault]
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
@@ -655,7 +656,10 @@ [Components]
     <LibraryClasses>
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
+    <LibraryClasses>
+      NULL|OvmfPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
+  }
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
       DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/OvmfPkg/CloudHv/CloudHvX64.dsc b/OvmfPkg/CloudHv/CloudHvX64.dsc
index 7326417eab62..5877a418f6b6 100644
--- a/OvmfPkg/CloudHv/CloudHvX64.dsc
+++ b/OvmfPkg/CloudHv/CloudHvX64.dsc
@@ -584,6 +584,7 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
 !if $(SMM_REQUIRE) == FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
@@ -778,7 +779,10 @@ [Components]
     <LibraryClasses>
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
+    <LibraryClasses>
+      NULL|OvmfPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
+  }
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
       DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
index 0f1e970fbbb3..dc82398dbd62 100644
--- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc
+++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
@@ -482,6 +482,7 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
@@ -661,7 +662,10 @@ [Components]
     <LibraryClasses>
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
+    <LibraryClasses>
+      NULL|OvmfPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
+  }
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
       DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 2d53b5c2950d..44056b6b334e 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -582,6 +582,7 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0
@@ -758,7 +759,10 @@ [Components]
     <LibraryClasses>
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
+    <LibraryClasses>
+      NULL|OvmfPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
+  }
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
       DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index f232de13a7b6..411d4288f6a1 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -603,6 +603,7 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
 !if $(SMM_REQUIRE) == FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
@@ -822,7 +823,10 @@ [Components]
     <LibraryClasses>
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
+    <LibraryClasses>
+      NULL|OvmfPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
+  }
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
       DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index a9d422bd9169..0988ad4b1db2 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -610,6 +610,7 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
 !if $(SMM_REQUIRE) == FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
@@ -835,7 +836,10 @@ [Components.X64]
     <LibraryClasses>
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
+    <LibraryClasses>
+      NULL|OvmfPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
+  }
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
       DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 3f970a79a08a..2c432af4eedc 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -632,6 +632,7 @@ [PcdsDynamicDefault]
   #   ($(SMM_REQUIRE) == FALSE)
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved|0
 
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm|FALSE
 !if $(SMM_REQUIRE) == FALSE
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0
@@ -903,7 +904,10 @@ [Components]
     <LibraryClasses>
       PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
-  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf {
+    <LibraryClasses>
+      NULL|OvmfPkg/Library/TerminalPcdProducerLib/TerminalPcdProducerLib.inf
+  }
   MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf {
     <LibraryClasses>
       DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
diff --git a/OvmfPkg/PlatformPei/PlatformPei.inf b/OvmfPkg/PlatformPei/PlatformPei.inf
index 1fadadeb5565..3e28e1596d32 100644
--- a/OvmfPkg/PlatformPei/PlatformPei.inf
+++ b/OvmfPkg/PlatformPei/PlatformPei.inf
@@ -99,6 +99,7 @@ [Pcd]
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
   gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved
+  gEfiMdeModulePkgTokenSpaceGuid.PcdResizeXterm
   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
   gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable
   gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack
-- 
2.39.1


  parent reply	other threads:[~2023-02-17 13:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 13:01 [edk2-devel] PATCH v3 0/3 Add xterm resize support to OVMF Paweł Poławski
2023-02-17 13:01 ` [edk2-devel] PATCH v3 1/3 MdeModulePkg: TerminalDxe: set xterm resolution on mode change Paweł Poławski
2023-04-04 15:12   ` Ard Biesheuvel
2023-02-17 13:01 ` [edk2-devel] PATCH v3 2/3 ArmVirtPkg: take PcdResizeXterm from the QEMU command line Paweł Poławski
2023-02-17 13:01 ` Paweł Poławski [this message]
     [not found] ` <17449E3B102C52E2.23192@groups.io>
2023-03-07 12:47   ` [edk2-devel] PATCH v3 1/3 MdeModulePkg: TerminalDxe: set xterm resolution on mode change Paweł Poławski
2023-03-10  2:31 ` 回复: [edk2-devel] PATCH v3 0/3 Add xterm resize support to OVMF gaoliming
2023-03-24 13:57   ` Paweł Poławski
     [not found] ` <17449E3BBCD94462.23192@groups.io>
2023-03-24 13:59   ` [edk2-devel] PATCH v3 3/3 OvmfPkg: take PcdResizeXterm from the QEMU command line Paweł Poławski
     [not found] ` <17449E3B887C4E80.23192@groups.io>
2023-03-24 14:00   ` [edk2-devel] PATCH v3 2/3 ArmVirtPkg: " Paweł Poławski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cfe1634e34cf4fb2fbad2fa3c6ba3ebe5bbd701e.1675733286.git.ppolawsk@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox