Tony, Currently, there is no easy way to do multi-threading in UEFI. For a PI compliant platform (compliance is optional) there is the multiprocessor protocol that can be used to run code on other processors in the system. There are a few constraints to this: 1) Only the "boot" processor can make calls into the firmware 2) Non-boot processors (APs) may not control hardware controlled by the firmware. 3) Only the boot processor may execute PCI Config Accesses (CFC/CF8)
A communication channel between processors can act as a pipe. Take a look at the StartCore application (edk2-startcore) on sourceforge, or in the edk2 area at edk2.tianocore.org, for a very simplistic example of a multiprocessor application. It is possible to write single-threaded network Command & Control applications. Look at the sockets library (in the StdLib package) and sample sockets applications (in AppPkg) for inspiration. From a Shell application you can invoke other EFI applications using either a combination of LoadImage and StartImage or using the system() function from StdLib. Note that most of the Shell commands can be built as standalone applications. They require the shell to be running, or at least the shell protocol to be loaded, but they can then be invoked from another shell application. There are no restrictions, imposed by the Shell environment, on calling UEFI Boot or Runtime services from an application. I assume that this is what you mean by "system calls". I have had luck running the Pyro Python package under EDK II Python to perform RPC between machines. If you are familiar with Python and this doesn't add too much burden, you might take a look at this combination. Best of luck, Daryl McDaniel -----Original Message----- From: Antonio Masenza [mailto:a.mase...@olivetti.com] Sent: Wednesday, December 05, 2012 6:13 AM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] efi capabilities? Tonderai Nemarundwe <tcn <at> pdx.edu> writes: > > > Is it possible to write multi-threaded applications for UEFI? I am trying to write a server app that can execute commands in efi shell and pipe the output to client. Is this possible or does this exist already? . I > am more trying to create EFI app that can act in similar manner to telnet. I > want to use a remote pc to execute commands in efi shell via network stack. can efi applications invoke other efi applications? are system calls possible in efi environment?Thanks > > Tony > > > > > ----------------------------------------------------------------------------- - > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > edk2-devel mailing list > edk2-devel <at> lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > i am trying to develope a preboot management of a PC from the efi shell. I am looking to something similar to a telnet server running as an .efi application. Anyone already developed some code? Best regards Antonio ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel