Got it working, thanks again.The code for anyone who needs it:
// -1 unknown, 0, disabled, 1 enabledINTN GetSecureBootStatus(){        
EFI_STATUS  Status;     UINT8       SecureBootMode;     UINTN       BufferSize 
= sizeof (UINT8);                Status = gRT->GetVariable (                    
           EFI_SECURE_BOOT_MODE_NAME ,                             
&gEfiGlobalVariableGuid,                                NULL,                   
        &BufferSize,                            &SecureBootMode                 
                );    if(EFI_ERROR (Status)) return -1;       if(SecureBootMode 
== 1) return 1;       return 0;}
Date: Mon, 15 Sep 2014 01:08:44 +1000
From: [email protected]
To: [email protected]
Subject: Re: [edk2] How to determine if Secure Boot is enabled








thanks i will give that a try



--- Original Message ---



From: "Thomas Rognon" <[email protected]>

Sent: 15 September 2014 12:43 AM

To: "edk2-devel" <[email protected]>

Subject: Re: [edk2] How to determine if Secure Boot is enabled





You use the GetVariable() function from runtime services. The name of the 
variable is SecureBoot and the guid is EFI_GLOBAL_VARIABLE. Refer to UEFI spec 
section 3.2
Thomas Rognon
On Sep 14, 2014 8:58 AM, "J. E." <[email protected]> wrote:







How do I check if Secure Boot is enabled or disabled in an EFI app?




------------------------------------------------------------------------------

Want excitement?

Manually upgrade your production database.

When you want reliability, choose Perforce

Perforce version control. Predictably reliable.

http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk

_______________________________________________

edk2-devel mailing list

[email protected]

https://lists.sourceforge.net/lists/listinfo/edk2-devel









------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel                         
                  
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to