From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id B0A18941086 for ; Tue, 20 May 2025 04:06:53 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=o1vpGiMah96nSyrXPCQ1e6qZBdDPe4B2K4X7Sahf1Q4=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type; s=20240830; t=1747714013; v=1; x=1747973212; b=nB+M3ji3jfMSZlLzTKpEKKPRScT+A8lgeUQ615yDVMpWkpIem48XBOwwWMkMIrQW/VMWOeMU IuICm0Jz6ESpujDGvPFSD5m2mKM7zgpLHbQb7awAEVx5b5cVK++ZFq0aweQsTHU6dbNYeDEi/Q+ FDfIiD0PlXZP4mJ0QlXtD+YOvnKUxg/JjNvN/amAbKwaDlNsYfLEJ4slTY292RG/vW2Szhrz6lZ h2TQMRgfEbKpuTAwGuSfM0+0gnTYDe8nsjOuqVWXwFveZhLHcKUEcPtyxa4fCgc1aHOL6OKVVlo Zvwi44q0c9rwSR583SuSAO2L5SRZfJJ+R69LTzMJ9RI3g== X-Received: by 127.0.0.2 with SMTP id 7THpYY7687511xZPvfeyT0Pj; Mon, 19 May 2025 21:06:52 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) by mx.groups.io with SMTP id smtpd.web10.13197.1747714011377579728 for ; Mon, 19 May 2025 21:06:51 -0700 X-CSE-ConnectionGUID: DN6B9B8XTKW6Ljwmva2KEQ== X-CSE-MsgGUID: 25fu6DD7S8aYr8ChLn7cgQ== X-IronPort-AV: E=McAfee;i="6700,10204,11438"; a="49328483" X-IronPort-AV: E=Sophos;i="6.15,302,1739865600"; d="scan'208,217";a="49328483" X-Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2025 21:06:51 -0700 X-CSE-ConnectionGUID: m7+x2BIvQ2enPRW0/FSwDA== X-CSE-MsgGUID: 2AE7YQ4mRIi3htVi+RXphw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,302,1739865600"; d="scan'208,217";a="139400184" X-Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25]) by orviesa010.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2025 21:06:51 -0700 X-Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.25; Mon, 19 May 2025 21:06:50 -0700 X-Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.25 via Frontend Transport; Mon, 19 May 2025 21:06:50 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.55; Mon, 19 May 2025 21:06:47 -0700 X-Received: from PH7PR11MB5943.namprd11.prod.outlook.com (2603:10b6:510:13f::19) by IA0PR11MB7354.namprd11.prod.outlook.com (2603:10b6:208:434::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.30; Tue, 20 May 2025 04:06:03 +0000 X-Received: from PH7PR11MB5943.namprd11.prod.outlook.com ([fe80::15cc:b461:7bb8:b69f]) by PH7PR11MB5943.namprd11.prod.outlook.com ([fe80::15cc:b461:7bb8:b69f%6]) with mapi id 15.20.8746.030; Tue, 20 May 2025 04:06:02 +0000 From: "Jayaprakash, N via groups.io" To: Yoshinoya , "devel@edk2.groups.io" CC: "Kinney, Michael D" , "pedro.falcato@gmail.com" Subject: Re: [edk2-devel] Python-3.6.8 UEFI : fork support Thread-Topic: [edk2-devel] Python-3.6.8 UEFI : fork support Thread-Index: AQHbxT5ufKR+7PSCq0KQsX2uQYMVGbPUqMPggASJ/YCAAbuUMA== Date: Tue, 20 May 2025 04:06:02 +0000 Message-ID: References: <6e9b7ba0.2bb1.19511cf27cb.Coremail.yoshinoyatoko@163.com> <4e160940.9691.195139cb533.Coremail.yoshinoyatoko@163.com> <1f076433.426c.1951774af8d.Coremail.yoshinoyatoko@163.com> <20a5324c.208d.196d1b4289c.Coremail.yoshinoyatoko@163.com> <5058b56e.178f.196e63095f0.Coremail.yoshinoyatoko@163.com> In-Reply-To: <5058b56e.178f.196e63095f0.Coremail.yoshinoyatoko@163.com> Accept-Language: en-US, en-IN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR11MB5943:EE_|IA0PR11MB7354:EE_ x-ms-office365-filtering-correlation-id: 76809fbc-4311-41e2-0f30-08dd9753a2f6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: =?iso-2022-jp?B?UlJmMUN0K211NVltL1BxbWRSWGJSbmY1djBMSFMwMHFCZjBxOE1HQTYw?= =?iso-2022-jp?B?V280OW04VGhRRUtCVG4vSlRqQTRWclRnUGdONFhHb040MjEvQk1HSDJo?= =?iso-2022-jp?B?ZncrZXF2ZFpCMTE3dnRZUUViOVlCRGwvalRHTVozcTdtS2JVczJ1NXgr?= =?iso-2022-jp?B?SGRtMFRpQ2I5a0g3UzR6bVBRclc4dDZvQVNxZmpTOFJvZjVZSGJrL0V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jp?B?cDl1ejAxenF1cnhBbVJHbnZZSWR5RlJVWmJYV3psc0FkclVSNDJXV3Vl?= =?iso-2022-jp?B?RTdlSzFBdmJYa1ZCWUg1YUVjT253STRoWG1uemxWcFlYZTNKRWhpOWlD?= =?iso-2022-jp?B?Wlc=?= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?TURtNDNkdVdETEVuTUFZc2JjbnNtWWx5aFRKYTQ5QkpEQVRBN25FRHFv?= =?iso-2022-jp?B?RkpVVkJCcHVJR3JQTUl1V3BObGFXRmtLUlkzVVF1QWpHOVAwUUphVEph?= =?iso-2022-jp?B?S0RyU3BJRVl4eGw4VjBObmdrejF4cHRYbytocTUxM3FQRU0waEhBWXJy?= =?iso-2022-jp?B?M2ZxT2hjMFpBclJLdEI5a1VOK1JJdVAwVzJjNjhpWHJoU05wMUpzNUdx?= =?iso-2022-jp?B?dzduSlRqeVJJUjBOL1d4QkpmQnJmazY3Q3BoNmRtdHRLU2JiQ3VWMWxD?= =?iso-2022-jp?B?Zys0TEtidXBVejFtT1Mxd2dmRCs4UkQrdEx0RmNzbERXZkxodVN3OTk0?= =?iso-2022-jp?B?WURxcmpMVDhLaFBYcmdKVUZ6cC9iZ2VCUUhhMnc5bnB0eEZlS09GckRv?= =?iso-2022-jp?B?MTZLOTgzWEIwdzhtbTFkOGt3aGFySU16QUpEUjFZSnVOV0VTZjM4c1pm?= =?iso-2022-jp?B?Yzl0akRCL3FPcDNLV3N4a3lXY1B4ZkZ3bWFWK0Y3eTRqZDRFNkhoYi9L?= =?iso-2022-jp?B?UjJ6bDJ4cjVDV0h5YmVqN0lmQU9TbFJYY0pYOXRDYWVtVmlrcDhySHQ3?= =?iso-2022-jp?B?clRkemZaOWpQYkFNckljVDNNRG5hZlFjanhSVnNlSStKQUt3cXMvMEZw?= =?iso-2022-jp?B?dEx3SUxhMi9BYTh5Y2h3ekF2Vk50SWZuV1F5dHgrMWs5M2RkbzN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5U2wydnd3MVV4WVEyUlJrVkVjTGFFd3R2?= =?iso-2022-jp?B?a2xrMGRZRHF5YWZLNXdra3hBOGNVSC82Nk95RnI5M0ZmWllOQVU0Q1Fk?= =?iso-2022-jp?B?NGtrU1pJbUloRnhRTThXQ2UxaUZEdzg1SCtTK2p0RXhueXhnRVNlVlYr?= =?iso-2022-jp?B?NER0YXpRMzNHT0ZWODVtL0NScWhpdFgzcnhseFh5Wk5kZElWaDh2Um9C?= =?iso-2022-jp?B?UVNKK2lWcUVYakd2ZlhQeFRsc0s2N3NZRmttM3RHQ00zcVA2SEV2a2hp?= =?iso-2022-jp?B?Y2VVMXgrSWRFYzlwRld3L2lRVFA4QWZpWjd3UUt6MWo4ZVp5b3djM3BO?= =?iso-2022-jp?B?SHdwbDJ3UWNLeGlZWFROVXh2NDMzNWt4TmtIdzRicFF2N1pKTUJPWHc2?= =?iso-2022-jp?B?S0JnTFZsVUlwaDVlak1lY2JOZWhDRmtlM0FNUFdnc0x1TlBNV3NaTVUv?= =?iso-2022-jp?B?OTEybFMxQ0FGUysvMzJmSEM4MVJFVlZ2czhHYkJRYlNnOE9EbXMybWVz?= =?iso-2022-jp?B?ZUNTRDBqRXhGNCt5QmVNVWZTUEJsdm1UbVhJWjVkbGRQZTdJQ2NRTTRv?= =?iso-2022-jp?B?eE04NU92cnpvVThwV0ZUWlJTRjhndS90SW96TW9teE9rNkI5MXUvVTB2?= =?iso-2022-jp?B?RmVsYnV6SEFoRUQ2TlI0WDJGUy94eUVFMXYycmxWTnQyaFA2cUhXeXRq?= =?iso-2022-jp?B?MkZ3Zw==?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB5943.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 76809fbc-4311-41e2-0f30-08dd9753a2f6 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 May 2025 04:06:02.8116 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oh+ubY91dO7P9g6ozJN1/3+rn018EcXZd6ValhNOazKt15QPpQJzWf5NeYynrm5NJxqQxz7BrxDsQ/FanhEzMA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR11MB7354 X-OriginatorOrg: intel.com 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 Resent-Date: Mon, 19 May 2025 21:06:51 -0700 Resent-From: n.jayaprakash@intel.com Reply-To: devel@edk2.groups.io,n.jayaprakash@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: H3Zmdd86td7Z7sdjE41MDvZDx7686176AA= Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_PH7PR11MB5943C39C257D65A630AA300FEE9FAPH7PR11MB5943namp_" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240830 header.b=nB+M3ji3; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --_000_PH7PR11MB5943C39C257D65A630AA300FEE9FAPH7PR11MB5943namp_ Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Thanks for checking on this further. I don=1B$B!G=1B(Bt have any solution for this, if you find anything please = propose a fix through a PR. Regards, JP From: Yoshinoya Sent: Monday, May 19, 2025 7:08 AM To: devel@edk2.groups.io; Jayaprakash, N Cc: Kinney, Michael D ; pedro.falcato@gmail.com Subject: Re: [edk2-devel] Python-3.6.8 UEFI : fork support Hi, I traced code, and found import module "site" caused the running speed slow= er and slower. If i run "Python -S' , and python ran quickly with debug ver firmware. This parateter lets cpython not import site modules during cpython kernel l= oading. Although going into python interactive environ quickly, but if i ran "impor= t site" manually in the interactive shell, and it will also execute slower. If debug ver firmware caused cpython ran slower , and i think every time ru= nning it will be a determinate time period. Actually, if you ran 3 times, you would find every time is different. Thanks At 2025-05-16 12:24:01, "Jayaprakash, N via groups.io" > wrote: That=1B$B!G=1B(Bs right I have also observed this, on Debug IFWI firmware i= t runs very slowly. It could be due to generation of lot of prints from the firmware as it is a= debug build. So, it is expected to be very slow. But on a release build of the firmware it works pretty quick and we don=1B$= B!G=1B(Bt notice the slowness as observed with the debug firmware. One option is to use the pre-compiled library files which are compiled to .= pyc files. So that Python interpreter boot strap process can run pretty fast. Regards, JP From: devel@edk2.groups.io > On Behalf Of Yoshinoya via groups.io Sent: Thursday, May 15, 2025 7:39 AM To: devel@edk2.groups.io; Jayaprakash, N > Cc: Kinney, Michael D >; pedro.falcato@gmail.com Subject: Re: [edk2-devel] Python-3.6.8 UEFI : fork support Hi, JP I found an interesting test result. I ran shell python on qemu with debug version ovmf fd. I executed "python" command in shell environment, it ran slowly in the firs= t time. then i executed "quit(0" command in python interactive environ, and launche= d python again in shell environment. And it ran more slower than the first time. If i do the same test on quem with release version ovmf fd, and it's normal= . every time, i ran python in shell, and it ran quickly. I tried to run "python -v', and saved the output log, not find any obvious = exception. Is there any suggestion? best wishes, =1B$B:_=1B(B 2025-02-18 13:07:57=1B$B!$=1B(B"Yoshinoya" > =1B$B> wrote: Hi Yoshinoya, The MP Services UEFI protocol has been used to run the CPUID instructions o= n 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 bui= lt 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:ec= x: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 be= ing BSP. The usage instructions and code sample are not yet updated in the wiki. I c= an add more details at the earliest. Please use the edk2-libc discussions page for any further questions / discu= ssions. https://github.com/tianocore/edk2-libc/discussions Regards, JP From: Yoshinoya > Sent: Monday, February 17, 2025 4:43 PM To: devel@edk2.groups.io; Jayaprakash, N > Cc: Kinney, Michael D >; 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 pytho= n script ? best wishes, At 2025-02-17 13:23:58, "Jayaprakash, N via groups.io" > wrote: Hi Yoshinoya, It=1B$B!G=1B(Bs 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/Pyth= on/Python-3.6.8/PyMod-3.6.8/Include/pyconfig.h So this functionality doesn=1B$B!G=1B(Bt get compiled for UEFI. Regards, JP From: Yoshinoya > Sent: Monday, February 17, 2025 8:19 AM To: Kinney, Michael D >; pedro.falcato@gmail.com; devel@= edk2.groups.io; Jayaprakash, N > 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, -=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 (#121353): https://edk2.groups.io/g/devel/message/121353 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --_000_PH7PR11MB5943C39C257D65A630AA300FEE9FAPH7PR11MB5943namp_ Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable

Thanks for checking on thi= s further.

 

I don=1B$B!G=1B(Bt have an= y solution for this, if you find anything please propose a fix through a PR= .

 

Regards,=

JP

 

From: Yoshinoya <yoshinoyatoko@16= 3.com>
Sent: Monday, May 19, 2025 7:08 AM
To: devel@edk2.groups.io; Jayaprakash, N <n.jayaprakash@intel.com= >
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; pedro.falc= ato@gmail.com
Subject: Re: [edk2-devel] Python-3.6.8 UEFI : fork support

 

Hi,

I traced code, and found import module &= quot;site" caused the running speed slower and slower.

If i run "Python -S' , and python r= an quickly with debug ver firmware.

This parateter lets cpython not import s= ite modules during cpython kernel loading.

 

Although going into python interactive e= nviron quickly, but if i ran "import site" manually in the intera= ctive shell, and it will also execute slower.

 

 

If debug ver firmware caused cpython ran= slower , and i think every time running it will be a determinate time period.

Actually, if you ran 3 times, = you would find every time is different.=

 

Thanks

 

 

 

At 2025-05-16 12:24:01, "Jayaprakash, N via groups.io&qu= ot; <n.jayaprakas= h=3Dintel.com@groups.io> wrote:

That=1B$B!G=1B(Bs right I ha= ve also observed this, on Debug IFWI firmware it runs very slowly.

It could be due to generatio= n of lot of prints from the firmware as it is a debug build.

So, it is expected to be ver= y slow.

 

But on a release build of th= e firmware it works pretty quick and we don=1B$B!G=1B(Bt notice the slowness as observed with the debug firmware.

One option is to use the pre= -compiled library files which are compiled to .pyc files.

So that Python interpreter b= oot strap process can run pretty fast.<= /p>

 

Regards,=

JP

From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yoshinoya via groups.io
Sent: Thursday, May 15, 2025 7:39 AM
To: devel@edk2.groups.io= ; Jayaprakash, N <n.jayapraka= sh@intel.com>
Cc: Kinney, Michael D <michael.d.kinney@intel.com>; pedro.falcato@gmail.com
Subject: Re: [edk2-devel] Python-3.6.8 UEFI : fork support

 

Hi, JP

I found an interesting test result.=

I ran shell python on qemu with debug ve= rsion ovmf fd.

I executed "python" command in= shell environment, it ran slowly in the first time.

then i executed "quit(0" comma= nd in python interactive environ, and launched python again in shell enviro= nment.

And it ran more slower than the first ti= me.

 

If i do the same test on quem with relea= se version ovmf fd, and it's normal.

every time, i ran python in shell, and i= t ran quickly.

 

I tried to run "python -v', and sav= ed the output log, not find any obvious exception.

 

Is there any suggestion?

 

 

best wishes,

 

 

=1B$B:_=1B(B= 2025-02-18 13:07:57=1B$B!$=1B(B"Yoshinoya= " <yoshinoyatoko@163.com>= =1B$B

Hi, JP,

Thanks a lot!

 

best wishes,

 

 

 

At 2025-02-17 23:51:25, "Jayaprakash, N via groups.io&qu= ot; <n.jayaprakas= h=3Dintel.com@groups.io> wrote:

Hi Yoshinoya,

 

The MP Services UEFI protoco= l has been used to run the CPUID instructions on a given CPU core and to read / write the MSRs from given CPU core.<= span style=3D"font-size:10.5pt;font-family:"Arial",sans-serif;col= or:black">

The python functions for thi= s 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 s= ignature cpuid_ex(cp= u, 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 c= ode sample are not yet updated in the wiki. I can add more details at the earliest.

 

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

https://github.com/tianocore/edk2-libc/d= iscussions

 

Regards,=

JP

 

From: Yoshinoya <yoshinoyatoko@163.com>=
Sent: Monday, February 17, 2025 4:43 PM
To: devel@edk2.groups.io= ; Jayaprakash, N <n.jayapraka= sh@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 wr= ite multi process sample with python script ? 

 

best wishes,

 

 

 

 

At 2025-02-17 13:23:58, "Jayaprakash, N via groups.io&qu= ot; <n.jayaprakas= h=3Dintel.com@groups.io> wrote:

Hi Yoshinoya,

 

It=1B$B!G=1B(Bs not supporte= d 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= =1B$B!G=1B(Bt 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 function= s, 

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.<= /o:p>

 

best wishes,

_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#121353) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--_000_PH7PR11MB5943C39C257D65A630AA300FEE9FAPH7PR11MB5943namp_--