Detecting EFI BIOS

Hi All,

Is there a Win32/NT Api or a NTDDI or IOCTL to determine whether the
underlying BIOS is EFI or legacy?

Thanks in advance

  • ab

Why?

d

debt from my phone


From: A B
Sent: 11/16/2011 4:42 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Detecting EFI BIOS

Hi All,

Is there a Win32/NT Api or a NTDDI or IOCTL to determine whether the underlying BIOS is EFI or legacy?

Thanks in advance

we need to deploy an OS image and the drivers in that image needs specific
binaries which differ for legacy/EFI

On Wed, Nov 16, 2011 at 7:42 PM, Doron Holan wrote:

> Why?
>
> d
>
> debt from my phone
> ------------------------------
> From: A B
> Sent: 11/16/2011 4:42 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Detecting EFI BIOS
>
> Hi All,
>
> Is there a Win32/NT Api or a NTDDI or IOCTL to determine whether the
> underlying BIOS is EFI or legacy?
>
> Thanks in advance
>
> –
>
> - ab
> — 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
>
> —
> 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

If you have different binaries with the same name, the design is broken.

grigora,

I never said I had binaries with the same name.

i simply need to know the underlying firmware, whether it is efi or legacy.

On Thu, Nov 17, 2011 at 1:15 AM, wrote:

> If you have different binaries with the same name, the design is broken.
>
> —
> 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

Are you saying the same device ID needs different binaries depending on
the BIOS? I am trying to understand what you are doing, is this to
distinguish between two models of systems? If so using EFI as the
trigger is a bad idea, since what happens if you get a third model, you
should be looking at other approaches. For that matter, the WAIK can
handle much of this for you for system images.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“A B” wrote in message news:xxxxx@ntdev:

> grigora,
>
> I never said I had binaries with the same name.
>
> i simply need to know the underlying firmware, whether it is efi or legacy.
>
>
>
> On Thu, Nov 17, 2011 at 1:15 AM, wrote:
>
> > If you have different binaries with the same name, the design is broken.
> >
> > —
> > 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

let me try to explain what is happeinig here…

Here is a typical use case:
Say a backup utility takes backup of the system drive of an EFI system, it
then tries to restore the same image on a non-EFI system, the newly
restored system will never boot since EFI boot logic is different.

I need to identify the firmware before this restore happens, to prevent the
user from getting int othis situation.

On Thu, Nov 17, 2011 at 3:03 AM, Don Burn wrote:

> Are you saying the same device ID needs different binaries depending on
> the BIOS? I am trying to understand what you are doing, is this to
> distinguish between two models of systems? If so using EFI as the trigger
> is a bad idea, since what happens if you get a third model, you should be
> looking at other approaches. For that matter, the WAIK can handle much of
> this for you for system images.
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/ WinDrvr http:
>
>
>
> “A B” wrote in message news:xxxxx@ntdev:
>
>
> grigora,
>>
>> I never said I had binaries with the same name.
>>
>> i simply need to know the underlying firmware, whether it is efi or
>> legacy.
>>
>>
>>
>> On Thu, Nov 17, 2011 at 1:15 AM, wrote:
>>
>> > If you have different binaries with the same name, the design is broken.
>> >
>> > —
>> > 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=ListServerhttp:
>> >
>>
>>
>>
>> –
>>
>> - ab
>>
>
>
> —
> 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=ListServerhttp:
>



- ab</http:></http:></http:>

Perhaps this was already covered (and perhaps I’m not remembering
correctly), but I think that if you switch between BIOS and EFI, you have to
reinstall Widows.

As I said, this is just my recollection.

Good luck,

mm

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of A B
Sent: Wednesday, November 16, 2011 2:08 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Detecting EFI BIOS

let me try to explain what is happeinig here…

Here is a typical use case:

Say a backup utility takes backup of the system drive of an EFI system, it
then tries to restore the same image on a non-EFI system, the newly restored
system will never boot since EFI boot logic is different.

I need to identify the firmware before this restore happens, to prevent the
user from getting int othis situation.

On Thu, Nov 17, 2011 at 3:03 AM, Don Burn wrote:

Are you saying the same device ID needs different binaries depending on the
BIOS? I am trying to understand what you are doing, is this to distinguish
between two models of systems? If so using EFI as the trigger is a bad
idea, since what happens if you get a third model, you should be looking at
other approaches. For that matter, the WAIK can handle much of this for you
for system images.

Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr

“A B” wrote in message news:xxxxx@ntdev:

grigora,

I never said I had binaries with the same name.

i simply need to know the underlying firmware, whether it is efi or legacy.

On Thu, Nov 17, 2011 at 1:15 AM, wrote:

> If you have different binaries with the same name, the design is broken.
>
> —
> 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


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

— 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

>Here is a typical use case:

Say a backup utility takes backup of the system drive of an EFI system, it
then tries to restore the same image on a non-EFI system, the newly
restored system will never boot since EFI boot logic is different.

I need to identify the firmware before this restore happens, to prevent the
user from getting into this situation.

Well, unbootable syystem after restore may happen for all kinds of hardware incompatibility. Do you want to force the system restore to be on exact same hardware configuration?

Hi,

maybe this helps:

http://x86asm.net/articles/uefi-programming-first-steps/index.html

Maybe this in some way: GetSystemFirmwareTable()

K.

This is not going to be possible, unless you know the make, model, and
features of the target hardware. The BIOS is probably going to be the
least of the problems you encounter if you think you can deploy the same
image to any machine which is not absolutely compatible with the original
installation machine. I have had problems trying to do a system restore
to machines which have the *same* model number (but different motherboards
internally; Dell has done this to me twice, when I ordered a model XXXX to
replace a model XXXX, three years later. The new version of model XXXX
had a different, and incompatible, motherboard, requiring a re-install of
Windows).
joe

we need to deploy an OS image and the drivers in that image needs specific
binaries which differ for legacy/EFI

On Wed, Nov 16, 2011 at 7:42 PM, Doron Holan
wrote:
>
>> Why?
>>
>> d
>>
>> debt from my phone
>> ------------------------------
>> From: A B
>> Sent: 11/16/2011 4:42 AM
>> To: Windows System Software Devs Interest List
>> Subject: [ntdev] Detecting EFI BIOS
>>
>> Hi All,
>>
>> Is there a Win32/NT Api or a NTDDI or IOCTL to determine whether the
>> underlying BIOS is EFI or legacy?
>>
>> Thanks in advance
>>
>> –
>>
>> - ab
>> — 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
>>
>> —
>> 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
>
> —
> 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

all,

thanks for the helpful replies and pointers.

Our product is capable of handling non-uniform hardware while restoring an
OS image created in another platform to one which has a different hardware
configuration. This feature is called HIR (hardware independent restore).

We want our product to become more intelligent and warn the user when he
tries to restore between MBR and EFI or vice versa. Hence my question.

Nevertheless a lot of googling finally revealed a Win32 API which is
exactly what I need. Here is a link for the sake of future posters with the
same question:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724325(v=vs.85).aspx

best regards

AB

On Thu, Nov 17, 2011 at 8:09 AM, wrote:

> This is not going to be possible, unless you know the make, model, and
> features of the target hardware. The BIOS is probably going to be the
> least of the problems you encounter if you think you can deploy the same
> image to any machine which is not absolutely compatible with the original
> installation machine. I have had problems trying to do a system restore
> to machines which have the same model number (but different motherboards
> internally; Dell has done this to me twice, when I ordered a model XXXX to
> replace a model XXXX, three years later. The new version of model XXXX
> had a different, and incompatible, motherboard, requiring a re-install of
> Windows).
> joe
>
> > we need to deploy an OS image and the drivers in that image needs
> specific
> > binaries which differ for legacy/EFI
> >
> > On Wed, Nov 16, 2011 at 7:42 PM, Doron Holan
> > wrote:
> >
> >> Why?
> >>
> >> d
> >>
> >> debt from my phone
> >> ------------------------------
> >> From: A B
> >> Sent: 11/16/2011 4:42 AM
> >> To: Windows System Software Devs Interest List
> >> Subject: [ntdev] Detecting EFI BIOS
> >>
> >> Hi All,
> >>
> >> Is there a Win32/NT Api or a NTDDI or IOCTL to determine whether the
> >> underlying BIOS is EFI or legacy?
> >>
> >> Thanks in advance
> >>
> >> –
> >>
> >> - ab
> >> — 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
> >>
> >> —
> >> 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
> >
> > —
> > 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
>
>
>
> —
> 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