From nobody Fri May 3 19:18:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1532670796676127.64620602623677; Thu, 26 Jul 2018 22:53:16 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6F3EA210C2D78; Thu, 26 Jul 2018 22:53:14 -0700 (PDT) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E90BB210C2D75 for ; Thu, 26 Jul 2018 22:53:12 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jul 2018 22:53:12 -0700 Received: from shwde7172.ccr.corp.intel.com ([10.239.158.25]) by orsmga001.jf.intel.com with ESMTP; 26 Jul 2018 22:53:11 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,407,1526367600"; d="scan'208";a="76376798" From: Liming Gao To: edk2-devel@lists.01.org Date: Fri, 27 Jul 2018 13:53:09 +0800 Message-Id: <1532670789-16352-1-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 Subject: [edk2] [Patch] IntelFrameworkModulePkg IsaSerialDxe: Update algorithm to calculate Divisor 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: , Cc: Ruiyu Ni MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" To align the way in MdeModulePkg SerialPortLib and PciSioSerialDxe driver, Divisor is added by one when the reminder is more than half (16 * BaudRate). Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Ruiyu Ni Reviewed-by: Ruiyu Ni --- IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c b/IntelF= rameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c index 57ee669d14..7824d38a9c 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c +++ b/IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/Serial.c @@ -1,7 +1,7 @@ /** @file Serial driver for standard UARTS on an ISA bus. =20 -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD = License which accompanies this distribution. The full text of the license may be = found at @@ -1397,7 +1397,7 @@ IsaSerialSetAttributes ( ((UINT32) BaudRate * 16), &Remained ); - if (Remained !=3D 0) { + if (Remained >=3D ((UINT32) BaudRate * 8)) { Divisor +=3D 1; } =20 --=20 2.16.2.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel