public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] Python-3.6.8 UEFI : fork support
@ 2025-02-17  2:49 Yoshinoya via groups.io
  2025-02-17  5:23 ` Jayaprakash, N via groups.io
  0 siblings, 1 reply; 5+ messages in thread
From: Yoshinoya via groups.io @ 2025-02-17  2:49 UTC (permalink / raw)
  To: michael.d.kinney, pedro.falcato, devel, n.jayaprakash

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Hi, Michael
I  am studying Python368 uefi code.
I have a question, ask for help.


I found some marco defines in edk2module.c
"HAVE_FORK / HAVE_FORK1 / HAVE_SPAWNV / etc"


It seems about multi-thread support functions, 
so my question is:
1. Have these functions been tested on uefi shell environments?
2. Are there any code samples for study how to use them?


Thank you very much.


best wishes,

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121124): https://edk2.groups.io/g/devel/message/121124
Mute This Topic: https://groups.io/mt/111225588/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 3179 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Python-3.6.8 UEFI : fork support
  2025-02-17  2:49 [edk2-devel] Python-3.6.8 UEFI : fork support Yoshinoya via groups.io
@ 2025-02-17  5:23 ` Jayaprakash, N via groups.io
  2025-02-17 11:13   ` Yoshinoya via groups.io
  0 siblings, 1 reply; 5+ messages in thread
From: Jayaprakash, N via groups.io @ 2025-02-17  5:23 UTC (permalink / raw)
  To: Yoshinoya, Kinney, Michael D, pedro.falcato@gmail.com,
	devel@edk2.groups.io

[-- Attachment #1: Type: text/plain, Size: 1364 bytes --]

Hi Yoshinoya,

It's not supported in UEFI.

You can see that macros are not defined as part of pyconfig.h
https://github.com/tianocore/edk2-libc/blob/master/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Include/pyconfig.h

So this functionality doesn't get compiled for UEFI.

Regards,
JP

From: Yoshinoya <yoshinoyatoko@163.com>
Sent: Monday, February 17, 2025 8:19 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; pedro.falcato@gmail.com; devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>
Subject: [edk2-devel] Python-3.6.8 UEFI : fork support

Hi, Michael
I  am studying Python368 uefi code.
I have a question, ask for help.

I found some marco defines in edk2module.c
"HAVE_FORK / HAVE_FORK1 / HAVE_SPAWNV / etc"

It seems about multi-thread support functions,
so my question is:
1. Have these functions been tested on uefi shell environments?
2. Are there any code samples for study how to use them?

Thank you very much.

best wishes,


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121125): https://edk2.groups.io/g/devel/message/121125
Mute This Topic: https://groups.io/mt/111225588/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 9146 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Python-3.6.8 UEFI : fork support
  2025-02-17  5:23 ` Jayaprakash, N via groups.io
@ 2025-02-17 11:13   ` Yoshinoya via groups.io
  2025-02-17 15:51     ` Jayaprakash, N via groups.io
  0 siblings, 1 reply; 5+ messages in thread
From: Yoshinoya via groups.io @ 2025-02-17 11:13 UTC (permalink / raw)
  To: devel, n.jayaprakash; +Cc: Kinney, Michael D, pedro.falcato@gmail.com

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

hi, JP

Got it, thank you!




I found some uefi mp service functions's call sample in edk2module.c




So, user could follow this sample and write multi process sample with python script ? 




best wishes,













At 2025-02-17 13:23:58, "Jayaprakash, N via groups.io" <n.jayaprakash=intel.com@groups.io> wrote:

Hi Yoshinoya,

 

It’s not supported in UEFI.

 

You can see that macros are not defined as part of pyconfig.h

https://github.com/tianocore/edk2-libc/blob/master/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Include/pyconfig.h

 

So this functionality doesn’t get compiled for UEFI.

 

Regards,

JP

 

From: Yoshinoya <yoshinoyatoko@163.com>
Sent: Monday, February 17, 2025 8:19 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; pedro.falcato@gmail.com; devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>
Subject: [edk2-devel] Python-3.6.8 UEFI : fork support

 

Hi, Michael

I  am studying Python368 uefi code.

I have a question, ask for help.

 

I found some marco defines in edk2module.c

"HAVE_FORK / HAVE_FORK1 / HAVE_SPAWNV / etc"

 

It seems about multi-thread support functions, 

so my question is:

1. Have these functions been tested on uefi shell environments?

2. Are there any code samples for study how to use them?

 

Thank you very much.

 

best wishes,



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121127): https://edk2.groups.io/g/devel/message/121127
Mute This Topic: https://groups.io/mt/111225588/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 8564 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Python-3.6.8 UEFI : fork support
  2025-02-17 11:13   ` Yoshinoya via groups.io
@ 2025-02-17 15:51     ` Jayaprakash, N via groups.io
  2025-02-18  5:07       ` Yoshinoya via groups.io
  0 siblings, 1 reply; 5+ messages in thread
From: Jayaprakash, N via groups.io @ 2025-02-17 15:51 UTC (permalink / raw)
  To: Yoshinoya, devel@edk2.groups.io
  Cc: Kinney, Michael D, pedro.falcato@gmail.com

[-- Attachment #1: Type: text/plain, Size: 3102 bytes --]

Hi Yoshinoya,

The MP Services UEFI protocol has been used to run the CPUID instructions on a given CPU core and to read / write the MSRs from given CPU core.
The python functions for this purpose are supported from the edk2module built in extension module are respectively cpuid_ex, rdmsr_ex/  wrmsr_ex with the function signatures as given below.

cupid_ex has the following signature cpuid_ex(cpu, eax, ecx) -> (eax:ebx:ecx:edx)
rdmsr_ex(cpu, msr) -> (lower_32bits, higher_32bits)
wrmsr_ex(cpu, msr, lower_32bits, higher_32bits) -> None

where the cpu parameter refers to the cpu core number starting from 0, 0 being BSP.

The usage instructions and code sample are not yet updated in the wiki. I can add more details at the earliest.

Please use the edk2-libc discussions page for any further questions / discussions.
https://github.com/tianocore/edk2-libc/discussions

Regards,
JP

From: Yoshinoya <yoshinoyatoko@163.com>
Sent: Monday, February 17, 2025 4:43 PM
To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; pedro.falcato@gmail.com
Subject: Re:Re: [edk2-devel] Python-3.6.8 UEFI : fork support


hi, JP

Got it, thank you!



I found some uefi mp service functions's call sample in edk2module.c



So, user could follow this sample and write multi process sample with python script ?



best wishes,









At 2025-02-17 13:23:58, "Jayaprakash, N via groups.io" <n.jayaprakash=intel.com@groups.io<mailto:n.jayaprakash=intel.com@groups.io>> wrote:
Hi Yoshinoya,

It's not supported in UEFI.

You can see that macros are not defined as part of pyconfig.h
https://github.com/tianocore/edk2-libc/blob/master/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Include/pyconfig.h

So this functionality doesn't get compiled for UEFI.

Regards,
JP

From: Yoshinoya <yoshinoyatoko@163.com<mailto:yoshinoyatoko@163.com>>
Sent: Monday, February 17, 2025 8:19 AM
To: Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; pedro.falcato@gmail.com<mailto:pedro.falcato@gmail.com>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Jayaprakash, N <n.jayaprakash@intel.com<mailto:n.jayaprakash@intel.com>>
Subject: [edk2-devel] Python-3.6.8 UEFI : fork support

Hi, Michael
I  am studying Python368 uefi code.
I have a question, ask for help.

I found some marco defines in edk2module.c
"HAVE_FORK / HAVE_FORK1 / HAVE_SPAWNV / etc"

It seems about multi-thread support functions,
so my question is:
1. Have these functions been tested on uefi shell environments?
2. Are there any code samples for study how to use them?

Thank you very much.

best wishes,



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121128): https://edk2.groups.io/g/devel/message/121128
Mute This Topic: https://groups.io/mt/111225588/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 19765 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] Python-3.6.8 UEFI : fork support
  2025-02-17 15:51     ` Jayaprakash, N via groups.io
@ 2025-02-18  5:07       ` Yoshinoya via groups.io
  0 siblings, 0 replies; 5+ messages in thread
From: Yoshinoya via groups.io @ 2025-02-18  5:07 UTC (permalink / raw)
  To: devel, n.jayaprakash; +Cc: Kinney, Michael D, pedro.falcato@gmail.com

[-- Attachment #1: Type: text/plain, Size: 3036 bytes --]

Hi, JP,

Thanks a lot!




best wishes,










At 2025-02-17 23:51:25, "Jayaprakash, N via groups.io" <n.jayaprakash=intel.com@groups.io> wrote:

Hi Yoshinoya,

 

The MP Services UEFI protocol has been used to run the CPUID instructions on a given CPU core and to read / write the MSRs from given CPU core.

The python functions for this purpose are supported from the edk2module built in extension module are respectively cpuid_ex, rdmsr_ex/  wrmsr_ex with the function signatures as given below.

 

cupid_ex has the following signature cpuid_ex(cpu, eax, ecx) -> (eax:ebx:ecx:edx)

rdmsr_ex(cpu, msr) -> (lower_32bits, higher_32bits)

wrmsr_ex(cpu, msr, lower_32bits, higher_32bits) -> None

 

where the cpu parameter refers to the cpu core number starting from 0, 0 being BSP.

 

The usage instructions and code sample are not yet updated in the wiki. I can add more details at the earliest.

 

Please use the edk2-libc discussions page for any further questions / discussions.

https://github.com/tianocore/edk2-libc/discussions

 

Regards,

JP

 

From: Yoshinoya <yoshinoyatoko@163.com>
Sent: Monday, February 17, 2025 4:43 PM
To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; pedro.falcato@gmail.com
Subject: Re:Re: [edk2-devel] Python-3.6.8 UEFI : fork support

 

hi, JP

Got it, thank you!

 

I found some uefi mp service functions's call sample in edk2module.c

 

So, user could follow this sample and write multi process sample with python script ? 

 

best wishes,

 

 

 

 

At 2025-02-17 13:23:58, "Jayaprakash, N via groups.io" <n.jayaprakash=intel.com@groups.io> wrote:

Hi Yoshinoya,

 

It’s not supported in UEFI.

 

You can see that macros are not defined as part of pyconfig.h

https://github.com/tianocore/edk2-libc/blob/master/AppPkg/Applications/Python/Python-3.6.8/PyMod-3.6.8/Include/pyconfig.h

 

So this functionality doesn’t get compiled for UEFI.

 

Regards,

JP

 

From: Yoshinoya <yoshinoyatoko@163.com>
Sent: Monday, February 17, 2025 8:19 AM
To: Kinney, Michael D <michael.d.kinney@intel.com>; pedro.falcato@gmail.com; devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com>
Subject: [edk2-devel] Python-3.6.8 UEFI : fork support

 

Hi, Michael

I  am studying Python368 uefi code.

I have a question, ask for help.

 

I found some marco defines in edk2module.c

"HAVE_FORK / HAVE_FORK1 / HAVE_SPAWNV / etc"

 

It seems about multi-thread support functions, 

so my question is:

1. Have these functions been tested on uefi shell environments?

2. Are there any code samples for study how to use them?

 

Thank you very much.

 

best wishes,



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121129): https://edk2.groups.io/g/devel/message/121129
Mute This Topic: https://groups.io/mt/111225588/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



[-- Attachment #2: Type: text/html, Size: 18611 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-02-18  5:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17  2:49 [edk2-devel] Python-3.6.8 UEFI : fork support Yoshinoya via groups.io
2025-02-17  5:23 ` Jayaprakash, N via groups.io
2025-02-17 11:13   ` Yoshinoya via groups.io
2025-02-17 15:51     ` Jayaprakash, N via groups.io
2025-02-18  5:07       ` Yoshinoya via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox