From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id EB04ED806DA for ; Wed, 4 Oct 2023 20:02:08 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Jf9fblP1OlRPQKS90PZSpLYd6bTyGgjOY268TyJPQK0=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1696449727; v=1; b=cxkOtP58iNzjh1KXpXLjZmYuuFM1uvi1DYBT65GYjTODsvVkRkldd9nvkYhkctuvkpOrs7pY jVsz2+FL0i2WaX/RWSyO3nUSlx1fB5d85Rq5LLiPhkcOI+0t/FOXDkaquGq6bO2E/4Gbv3EbSPV 5QLQYYLgVRe5WFqt2/k5U2Jk= X-Received: by 127.0.0.2 with SMTP id 6DaqYY7687511xAtwXY2UCLI; Wed, 04 Oct 2023 13:02:07 -0700 X-Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by mx.groups.io with SMTP id smtpd.web11.4803.1696449727099921864 for ; Wed, 04 Oct 2023 13:02:07 -0700 X-Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-57b6c7d0cabso123996eaf.1 for ; Wed, 04 Oct 2023 13:02:06 -0700 (PDT) X-Gm-Message-State: 4fq7fNy51TYvgmdR585iAJ3rx7686176AA= X-Google-Smtp-Source: AGHT+IGtuTQj4l9BOfVaK7mim3nxU86gqJqWgPL/FpU2heNqGY4Qc5Kdsa2wEijceXwoLcF3EWDeSw== X-Received: by 2002:a05:6358:33a4:b0:151:ac8d:bfe7 with SMTP id i36-20020a05635833a400b00151ac8dbfe7mr3600073rwd.22.1696449725868; Wed, 04 Oct 2023 13:02:05 -0700 (PDT) X-Received: from sh170r6.lan ([74.197.247.87]) by smtp.gmail.com with ESMTPSA id s29-20020a63925d000000b0057825bd3448sm3704057pgn.51.2023.10.04.13.02.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 13:02:05 -0700 (PDT) From: "MrChromebox" To: devel@edk2.groups.io Cc: Matt DeVillier Subject: [edk2-devel] [PATCH 3/3] PlatformHookLib: Set PcdSerialClockRate using HOB data Date: Wed, 4 Oct 2023 15:01:35 -0500 Message-Id: <00631c0eb096de9089a9fe123e905b435d83da2e.1696448945.git.matt.devillier@gmail.com> In-Reply-To: <9143994e6a5f37650930abfc4141c6061e5bef98.1696448945.git.matt.devillier@gmail.com> References: <9143994e6a5f37650930abfc4141c6061e5bef98.1696448945.git.matt.devillier@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,matt.devillier@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=cxkOtP58; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) Fixes serial output on platforms using coreboot and a non-default clock rate such as AMD Picasso and newer Zen-based platforms. Signed-off-by: Matt DeVillier Change-Id: I91290397852176754e9a34ec6e5829044f41d15a --- UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c | 5 +++++ UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf | 1 + 2 files changed, 6 insertions(+) diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c b/Uef= iPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c index 60a17b8fc2..e3d47ac2fa 100644 --- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c +++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.c @@ -90,6 +90,11 @@ PlatformHookSerialPortInitialize ( return Status;=0D }=0D =0D + Status =3D PcdSet32S (PcdSerialClockRate, SerialPortInfo->ClockRate);= =0D + if (RETURN_ERROR (Status)) {=0D + return Status;=0D + }=0D +=0D return RETURN_SUCCESS;=0D }=0D =0D diff --git a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf b/U= efiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf index 7ac6bfa1b1..e2908cfbca 100644 --- a/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf +++ b/UefiPayloadPkg/Library/PlatformHookLib/PlatformHookLib.inf @@ -38,3 +38,4 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase ## PRODUCES=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSerialBaudRate ## PRODUCES=0D gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride ## PRODUCES=0D + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate ## PRODUCES=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109337): https://edk2.groups.io/g/devel/message/109337 Mute This Topic: https://groups.io/mt/101763377/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-