Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Windows and EFI

Maxim_S._ShatskihMaxim_S._Shatskih Member Posts: 10,396
What are the main details on how Windows interact with EFI?

I can understand that Windows boot loader is a EFI app. But what else? what occurs after the boot stage?

Can ACPI and EFI coexist? if not - then am I correct that MS has the full replacement for acpi.sys which uses EFI tables instead of ACPI ones?

Is there a custom HAL for EFI? for things like, say, EFI's NVRAM real-time clock access?

--
Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

Comments

  • Igor_SharovarIgor_Sharovar Member Posts: 614
    >I can understand that Windows boot loader is a EFI app. But what else? what occurs after the boot >stage?
    I believe Windows follows all standard UEFI boot procedures. During the installation Windows creates a System Partition where it keeps all UEFI boot files. In additional to that it creates a Boot entry in \<System Partion>\EFI\Boot\bootx64.efi . During the boot this entry executed and bootx64.efi file loads others files from \<System Partition>\Microsoft\Boot. After loading Windows device drivers with Start=0 the UEFI driver shutdown all UEFI boot drivers and start Windows OS boot services. Later, Windows OS components continue to communicate with UEFI by using UEFI Runtime services. The most important Runtime services are GetVariable() and SetVariable. For example, using these UEFI services Windows could retrieve and modify Boot entries.

    >Can ACPI and EFI coexist?
    EFI uses ACPI information in DevicePath protocol. DevicePath protocol defines location of each instance of hardware and Windows uses such information, for example during the installation.

    >Is there a custom HAL for EFI?
    UDK package, which is an open source project for developing EFI stuff, contains libraries which provide access to hardware. For example, they provide full PCI access but don't support interrupt. You need to do polling. There is not also thread support in UEFI. All UEFI drivers are single threading.
    Time support is limited. I know there is Stall() function with resolution one microsecond.
    Unfortunately there is not much information about UEFI in general and almost nothing about using UEFI in Windows. The main source of UEFI dvelopment is UDK source open project.

    Igor Sharovar
  • OSR_Community_UserOSR_Community_User Member Posts: 110,217
    Tianocore is another open project funded by Intel. Many commercial BIOSes
    are based on this code as well.

    t.

    On Thu, 22 Sep 2011, xxxxx@hotmail.com wrote:

    >> I can understand that Windows boot loader is a EFI app. But what else? what occurs after the boot >stage?
    > I believe Windows follows all standard UEFI boot procedures. During the installation Windows creates a System Partition where it keeps all UEFI boot files. In additional to that it creates a Boot entry in \<System Partion>\EFI\Boot\bootx64.efi . During the boot this entry executed and bootx64.efi file loads others files from \<System Partition>\Microsoft\Boot. After loading Windows device drivers with Start=0 the UEFI driver shutdown all UEFI boot drivers and start Windows OS boot services. Later, Windows OS components continue to communicate with UEFI by using UEFI Runtime services. The most important Runtime services are GetVariable() and SetVariable. For example, using these UEFI services Windows could retrieve and modify Boot entries.
    >
    >> Can ACPI and EFI coexist?
    > EFI uses ACPI information in DevicePath protocol. DevicePath protocol defines location of each instance of hardware and Windows uses such information, for example during the installation.
    >
    >> Is there a custom HAL for EFI?
    > UDK package, which is an open source project for developing EFI stuff, contains libraries which provide access to hardware. For example, they provide full PCI access but don't support interrupt. You need to do polling. There is not also thread support in UEFI. All UEFI drivers are single threading.
    > Time support is limited. I know there is Stall() function with resolution one microsecond.
    > Unfortunately there is not much information about UEFI in general and almost nothing about using UEFI in Windows. The main source of UEFI dvelopment is UDK source open project.
    >
    > Igor Sharovar
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
    >
  • amitr0-2amitr0-2 Member - All Emails Posts: 940
    Windows (or for that matter any other OS) will interact with the
    platform (assuming it is an EFI based platform) via the EFI system table.

    ACPI and EFI do coexist . The EFI system table has a table for the ACPI
    routines which can be accessed through a guid.

    there are some features of EFI which persist even after platform boot -
    called as the Runtime. The OS can access these runtime features if it is an
    EFI aware OS. The clock is also one of them. The OS uses GetTime () /
    SetTime() features to access the clock via EFI .

    There are no EFI specific HAl as far as I know.




    On Thu, Sep 22, 2011 at 11:54 PM, Maxim S. Shatskih
    wrote:

    > What are the main details on how Windows interact with EFI?
    >
    > I can understand that Windows boot loader is a EFI app. But what else?
    > what occurs after the boot stage?
    >
    > Can ACPI and EFI coexist? if not - then am I correct that MS has the
    > full replacement for acpi.sys which uses EFI tables instead of ACPI ones?
    >
    > Is there a custom HAL for EFI? for things like, say, EFI's NVRAM
    > real-time clock access?
    >
    > --
    > Maxim S. Shatskih
    > Windows DDK MVP
    > xxxxx@storagecraft.com
    > http://www.storagecraft.com
    >
    >
    > ---
    > NTDEV is sponsored by OSR
    >
    > For our schedule of WDF, WDM, debugging and other seminars visit:
    > http://www.osr.com/seminars
    >
    > To unsubscribe, visit the List Server section of OSR Online at
    > http://www.osronline.com/page.cfm?name=ListServer
    >



    --

    - ab
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Developing Minifilters 29 July 2019 OSR Seminar Space
Writing WDF Drivers 23 Sept 2019 OSR Seminar Space
Kernel Debugging 21 Oct 2019 OSR Seminar Space
Internals & Software Drivers 18 Nov 2019 Dulles, VA