From nobody Fri May 17 22:56:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112254+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112254+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1702143805; cv=none; d=zohomail.com; s=zohoarc; b=WpBtsJegUYWYqSBC7TuWy0VHxTUt5xmzOtcI1K4woo8yMXmQmj7PhyxEYbmcSQB9m7tVO3Uo1p8bIQnxhj+Gasy2wfoSIVK4Nbuu/3NNYXrkXmEIPDCMho2MuK7QqDQ0TyZufUBPf4TYQaw1Ekh3NN+Zsr7rTh18Ew+tIqq2aEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702143805; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=VZKAXLUNCHrtnP+nx2QzJ5O8BfOAfHb+qT69EmrxUa0=; b=XPvCmxlQxi+InqJ3BxzPy2gUZak2RbWNsSU55TFl0jA4y1ujkFZPn5eXX0b3XQFzXt/EATTrn0MEOLmWjdCOuM80PA5/vJ4glctVA5C2ftjFRdyEseXvfZ+/Klu2t625ofCpvG6QBA2EfEteDYg1nMtMuSC76EX8uQKHLoX4P5k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112254+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 170214380519657.45079923130936; Sat, 9 Dec 2023 09:43:25 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=Rpne3u3F/roJLQl97dqc/K8hJ9JYriLehzuVFYajnEE=; 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=1702143804; v=1; b=DcA89q76R5AXLEye+GMG3ZkXPzHYXa7BDUbIN9C4mTibouj5Mp0eIBsNYrt+LkmHzxnMEooc go9gQQI5zlzcOiemr/yIguP1Zk8JogDGidNgK7BfLv6EaP8vmhQ+EW7GTdmXrAVbOUiXuHuqwtj NCUd8WafLbSAcBrcIrhCVlL4= X-Received: by 127.0.0.2 with SMTP id 0dKKYY1788612xTyCq1IGpSS; Sat, 09 Dec 2023 09:43:24 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by mx.groups.io with SMTP id smtpd.web11.96.1702143804113340517 for ; Sat, 09 Dec 2023 09:43:24 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10919"; a="1336948" X-IronPort-AV: E=Sophos;i="6.04,264,1695711600"; d="scan'208";a="1336948" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2023 09:43:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10919"; a="863240581" X-IronPort-AV: E=Sophos;i="6.04,264,1695711600"; d="scan'208";a="863240581" X-Received: from njayapra-mobl.gar.corp.intel.com ([10.213.73.248]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2023 09:43:21 -0800 From: "Jayaprakash, N" To: devel@edk2.groups.io Cc: Jayaprakash N , Rebecca Cran , Michael D Kinney Subject: [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: writeio function in edk2module.c not working as expected Date: Sat, 9 Dec 2023 23:13:07 +0530 Message-Id: <20231209174307.1497-2-n.jayaprakash@intel.com> In-Reply-To: <20231209174307.1497-1-n.jayaprakash@intel.com> References: <20231209174307.1497-1-n.jayaprakash@intel.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,n.jayaprakash@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MGQOmyiZqOf87ZFmm9ymHmVpx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1702143806495100001 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4619 This commit fixes the issue reported in the BZ4619. The order of passing the parameters to IoWrite* functions called within writeio function in edk2module.c has been corrected Also verified the changes by writing reset command to 0xCF9 port using writeio function in edk2module.c Cc: Rebecca Cran Cc: Michael D Kinney Cc: Jayaprakash N Signed-off-by: Jayaprakash N Reviewed-by: Michael D Kinney --- .../Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/ed= k2module.c b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/ed= k2module.c index 8786df8..d6af8da 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2modul= e.c +++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2modul= e.c @@ -3985,9 +3985,9 @@ edk2_writeio(PyObject *self, PyObject *args) =20 Py_BEGIN_ALLOW_THREADS addrs =3D (short)(addr & 0xffff); - if (1 =3D=3D sz) IoWrite8((unsigned char)(value & 0xFF), addrs); - else if (2 =3D=3D sz) IoWrite16((unsigned short)(value & 0xFFFF), addrs); - else if (4 =3D=3D sz) IoWrite32(value, addrs); + if (1 =3D=3D sz) IoWrite8(addrs, (unsigned char)(value & 0xFF)); + else if (2 =3D=3D sz) IoWrite16(addrs, (unsigned short)(value & 0xFFFF)); + else if (4 =3D=3D sz) IoWrite32(addrs, value); Py_END_ALLOW_THREADS =20 Py_INCREF(Py_None); --=20 2.40.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112254): https://edk2.groups.io/g/devel/message/112254 Mute This Topic: https://groups.io/mt/103077058/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-