public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Accessing RT services from OS
@ 2017-09-04 10:22 Ankit.Singh3
       [not found] ` <3b1b319c-59da-7336-ba27-1f5a557907f8@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Ankit.Singh3 @ 2017-09-04 10:22 UTC (permalink / raw)
  To: edk2-devel

Dell - Internal Use - Confidential

Hi All,

Wanted to access RT services from OS, as there any already any such exposed OS function or utilities.

Regards,
Ankit Singh


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

* Accessing RT services from OS
       [not found] ` <3b1b319c-59da-7336-ba27-1f5a557907f8@gmail.com>
@ 2017-09-05  5:21   ` Ankit.Singh3
  2017-09-05  7:32     ` Marvin H?user
  0 siblings, 1 reply; 4+ messages in thread
From: Ankit.Singh3 @ 2017-09-05  5:21 UTC (permalink / raw)
  To: edk2-devel

Hi All,

Wanted to access RT services from OS.
	1.) Are there any already such exposed OS function or utilities ?
	2.) Can we plugin our own service/function to RT at run-time. ?

Regards,
Ankit Singh



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

* Re: Accessing RT services from OS
  2017-09-05  5:21   ` Ankit.Singh3
@ 2017-09-05  7:32     ` Marvin H?user
  2017-09-05 17:22       ` Blibbet
  0 siblings, 1 reply; 4+ messages in thread
From: Marvin H?user @ 2017-09-05  7:32 UTC (permalink / raw)
  To: edk2-devel@lists.01.org

Good morning,

1.) Do you mean whether the OS exposes the Runtime Services? Windows and Linux expose the Variable Services (Linux even more, if I remember correctly) and macOS (not entirely sure about the latest version) the entire table via DeviceTree.
2.) Yes, you need to write a DXE Runtime Driver. One way to do it is install an UEFI Protocol and let the UEFI OS loader store its address (pay attention to allocate the structure from Runtime memory, update the pointers when going virtual and not use any Boot Services), another is to use the UEFI Configuration Table. Though remember that the OS still has hardware ownership, you might need to use Management Mode for your ideas. If you target Windows, I'm afraid software MMIs/ACPI or a shim for the RT Variable Services ("execute on variable write") are the only ways I know as you of course cannot alter the bootloader or access the System Table at runtime.

Regards,
Marvin.

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Ankit.Singh3@dell.com
> Sent: Tuesday, September 5, 2017 7:21 AM
> To: edk2-devel@lists.01.org
> Subject: [edk2] Accessing RT services from OS
> 
> Hi All,
> 
> Wanted to access RT services from OS.
> 	1.) Are there any already such exposed OS function or utilities ?
> 	2.) Can we plugin our own service/function to RT at run-time. ?
> 
> Regards,
> Ankit Singh
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: Accessing RT services from OS
  2017-09-05  7:32     ` Marvin H?user
@ 2017-09-05 17:22       ` Blibbet
  0 siblings, 0 replies; 4+ messages in thread
From: Blibbet @ 2017-09-05 17:22 UTC (permalink / raw)
  To: edk2-devel

You might want to look at Firmware Test Suite, it includes a Linux
kernel driver to help with it's interactions with UEFI. Note that this
is a Linux-centric test suite, solution won't work for other OSes.

http://kernel.ubuntu.com/git/hwe/fwts.git

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1633506

https://patchwork.kernel.org/patch/9323781/

http://www.basicinputoutput.com/2016/03/introduction-to-firmware-test-suite-fwts.html

HTH,
Lee Fisher


On 09/05/2017 12:32 AM, Marvin H?user wrote:
> Good morning,
>
> 1.) Do you mean whether the OS exposes the Runtime Services? Windows and Linux expose the Variable Services (Linux even more, if I remember correctly) and macOS (not entirely sure about the latest version) the entire table via DeviceTree.
> 2.) Yes, you need to write a DXE Runtime Driver. One way to do it is install an UEFI Protocol and let the UEFI OS loader store its address (pay attention to allocate the structure from Runtime memory, update the pointers when going virtual and not use any Boot Services), another is to use the UEFI Configuration Table. Though remember that the OS still has hardware ownership, you might need to use Management Mode for your ideas. If you target Windows, I'm afraid software MMIs/ACPI or a shim for the RT Variable Services ("execute on variable write") are the only ways I know as you of course cannot alter the bootloader or access the System Table at runtime.
>
> Regards,
> Marvin.
>
>> -----Original Message-----
>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>> Ankit.Singh3@dell.com
>> Sent: Tuesday, September 5, 2017 7:21 AM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] Accessing RT services from OS
>>
>> Hi All,
>>
>> Wanted to access RT services from OS.
>> 	1.) Are there any already such exposed OS function or utilities ?
>> 	2.) Can we plugin our own service/function to RT at run-time. ?
>>
>> Regards,
>> Ankit Singh
>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
>



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

end of thread, other threads:[~2017-09-05 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-04 10:22 Accessing RT services from OS Ankit.Singh3
     [not found] ` <3b1b319c-59da-7336-ba27-1f5a557907f8@gmail.com>
2017-09-05  5:21   ` Ankit.Singh3
2017-09-05  7:32     ` Marvin H?user
2017-09-05 17:22       ` Blibbet

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