* [edk2-devel] [edk2-libc Patch 0/1] writeio() edk2module not working as expected @ 2023-12-09 17:43 Jayaprakash, N 2023-12-09 17:43 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: writeio function in edk2module.c " Jayaprakash, N 0 siblings, 1 reply; 3+ messages in thread From: Jayaprakash, N @ 2023-12-09 17:43 UTC (permalink / raw) To: devel; +Cc: Jayaprakash N This commit fixes the issue reported in BZ4619. The writeio() function in edk2module.c in edk2-libc/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Modules which uses IoWrite* functions was passing the parameters in incorrect order. This has been fixed. Jayaprakash N (1): ek2-libc: writeio function in edk2module.c not working as expected .../Python/Python-3.6.8/PyMod-3.6.8/Modules/edk2module.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.40.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112253): https://edk2.groups.io/g/devel/message/112253 Mute This Topic: https://groups.io/mt/103077057/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 3+ messages in thread
* [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: writeio function in edk2module.c not working as expected 2023-12-09 17:43 [edk2-devel] [edk2-libc Patch 0/1] writeio() edk2module not working as expected Jayaprakash, N @ 2023-12-09 17:43 ` Jayaprakash, N 2023-12-10 3:12 ` Michael D Kinney 0 siblings, 1 reply; 3+ messages in thread From: Jayaprakash, N @ 2023-12-09 17:43 UTC (permalink / raw) To: devel; +Cc: Jayaprakash N, Rebecca Cran, Michael D Kinney 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 <rebecca@bsdio.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Cc: Jayaprakash N <n.jayaprakash@intel.com> Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> --- .../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] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: writeio function in edk2module.c not working as expected 2023-12-09 17:43 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: writeio function in edk2module.c " Jayaprakash, N @ 2023-12-10 3:12 ` Michael D Kinney 0 siblings, 0 replies; 3+ messages in thread From: Michael D Kinney @ 2023-12-10 3:12 UTC (permalink / raw) To: Jayaprakash, N, devel@edk2.groups.io; +Cc: Rebecca Cran, Kinney, Michael D Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> > -----Original Message----- > From: Jayaprakash, N <n.jayaprakash@intel.com> > Sent: Saturday, December 9, 2023 9:43 AM > To: devel@edk2.groups.io > Cc: Jayaprakash, N <n.jayaprakash@intel.com>; Rebecca Cran > <rebecca@bsdio.com>; Kinney, Michael D <michael.d.kinney@intel.com> > Subject: [edk2-libc Patch 1/1] ek2-libc: writeio function in > edk2module.c not working as expected > > 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 <rebecca@bsdio.com> > Cc: Michael D Kinney <michael.d.kinney@intel.com> > Cc: Jayaprakash N <n.jayaprakash@intel.com> > Signed-off-by: Jayaprakash N <n.jayaprakash@intel.com> > --- > .../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 (#112256): https://edk2.groups.io/g/devel/message/112256 Mute This Topic: https://groups.io/mt/103077058/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-10 3:12 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-12-09 17:43 [edk2-devel] [edk2-libc Patch 0/1] writeio() edk2module not working as expected Jayaprakash, N 2023-12-09 17:43 ` [edk2-devel] [edk2-libc Patch 1/1] ek2-libc: writeio function in edk2module.c " Jayaprakash, N 2023-12-10 3:12 ` Michael D Kinney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox