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 3594C7803D0 for ; Sat, 9 Dec 2023 17:43:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=YZ/JjenobOLzF31eBt17vMXiHd94APTA2OsehGp1M3s=; 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=sNxpskJohmwXSc3DndSaKURmW2Uyfk4E/N1uhtAzjCI6pG1fKP9q+0zHhxW2vl4RlI2UL5Wi kZWSxoJwKDRG7WrFq511MHriQ25ed8qin4ibcVhdr8iOfR/tqGHMrKDK6Z0bmL7TTNQwaY3RNrE YlQUCk4Rc0wPuA/bNC7VjI5U= X-Received: by 127.0.0.2 with SMTP id 7DAGYY7687511xQEeFsmtg0I; 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: VVZQMAKlQ2wOr3hSIR5zgGgRx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=sNxpskJo; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4619 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 --- .../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/edk2module.c b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c index 8786df8..d6af8da 100644 --- a/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c +++ b/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c @@ -3985,9 +3985,9 @@ edk2_writeio(PyObject *self, PyObject *args) Py_BEGIN_ALLOW_THREADS addrs = (short)(addr & 0xffff); - if (1 == sz) IoWrite8((unsigned char)(value & 0xFF), addrs); - else if (2 == sz) IoWrite16((unsigned short)(value & 0xFFFF), addrs); - else if (4 == sz) IoWrite32(value, addrs); + if (1 == sz) IoWrite8(addrs, (unsigned char)(value & 0xFF)); + else if (2 == sz) IoWrite16(addrs, (unsigned short)(value & 0xFFFF)); + else if (4 == sz) IoWrite32(addrs, value); Py_END_ALLOW_THREADS Py_INCREF(Py_None); -- 2.40.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- 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/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-