I know BITS (http://biosbits.org/) can do things like that.
I don't know if the python in the edk has the modifications required to support 
what you are asking about, It may, but the one in BITS makes such access very 
clean and easy.
One detail to understand about the Python in BITS is that the Python runs in 
GRUB. The GRUB in BITS can be started from the Shell though. So it's not a big 
problem. When you exit from GRUB you are back at the Shell prompt if that's 
where GRUB was launched from.BITS primarily uses the GRUB menu ability to 
provide a totally configurable menu user interface for launching Python 
scripts. You may also find this useful.
Here's a short list of the features of the Python in BITS* Based on 2.7.9* 
Using CTypes provides python objects for SMBIOS, ACPI tables etc* Shell file 
device R/W access* Script output capturing that can be persisted to a shell 
file device.* Access to memory, IO, MSR and PCI config space* System core and 
processor information* Ability to execute scripts from a script on a designated 
processor* An ACPICA implementation* And more ...
More on the included ACPICA that allows accessing the ACPI of the BIOS from 
python. The implementation isn't a fully functional OSPM but enough to query 
APCI tables and static values in the DSDT, SSDT tables and invoke methods. By 
setting an option from python the OSPM through the ACPI can access IO in 
addition to just the default memory access. With a trivial source change, from 
what I see, the ACPICA would even support access to MSRs and PCI configuration 
space.
Using as examples the included UEFI support Python access to the UEFI is wide 
open, IMO.
Full source for everything in BITS is included in the BITS download and can be 
easily built in Linux and there are regular updates as new features are added 
and improvements done to existing features. That latest update was 4/10/2015.
BITS can also be downloaded from the Intel web site. 
https://downloadcenter.intel.com/download/19763
To be clear, after all the hype for BITS, I'm just a BITS end user that has 
found the python support in BITS to be a welcome tool to have for BIOS testing. 
 
      From: "tiger...@zhaoxin.com" <tiger...@zhaoxin.com>
 To: edk2-devel@lists.sourceforge.net 
 Sent: Thursday, April 16, 2015 11:11 PM
 Subject: [edk2] Python script could call LocateHandle function?
   
 <!--#yiv9640260881 _filtered #yiv9640260881 {panose-1:2 1 6 0 3 1 1 1 1 1;} 
_filtered #yiv9640260881 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 
4;} _filtered #yiv9640260881 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 
4;} _filtered #yiv9640260881 {panose-1:2 1 6 0 3 1 1 1 1 1;}#yiv9640260881 
#yiv9640260881 p.yiv9640260881MsoNormal, #yiv9640260881 
li.yiv9640260881MsoNormal, #yiv9640260881 div.yiv9640260881MsoNormal 
{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", 
"sans-serif";}#yiv9640260881 a:link, #yiv9640260881 
span.yiv9640260881MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv9640260881 a:visited, #yiv9640260881 
span.yiv9640260881MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv9640260881 
span.yiv9640260881EmailStyle17 {font-family:"Calibri", 
"sans-serif";color:windowtext;}#yiv9640260881 .yiv9640260881MsoChpDefault 
{font-family:"Calibri", "sans-serif";} _filtered #yiv9640260881 {margin:72.0pt 
90.0pt 72.0pt 90.0pt;}#yiv9640260881 div.yiv9640260881WordSection1 {}-->Hi, 
experts: I have a question about Python script.    Could I call Boot Service 
function in Python script? Such as: Call BootServices->LocateHandle() in python 
script!    Best wishes, 
本邮件仅针对指定的收件人发送并可能含有保密或专有内容。任何非指定收件人所为之查阅、转发或使用本信息是不被允许的。如果您误收到本邮件,请立即告知发件人并删除本邮件及所有附件。谢谢!The
 information transmitted in this e-mail is intended only for the addressee and 
may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of this information by persons or 
entities other than the intended recipient is prohibited. If you received this 
e-mail in error, please notify the sender immediately, and delete this e-mail 
and any attachments. Thank you.
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


  
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to