Index: /trunk/include/iprt/mangling.h
===================================================================
--- /trunk/include/iprt/mangling.h	(revision 80707)
+++ /trunk/include/iprt/mangling.h	(revision 80708)
@@ -2217,4 +2217,7 @@
 # define RTSymlinkRead                                  RT_MANGLER(RTSymlinkRead)
 # define RTSymlinkReadA                                 RT_MANGLER(RTSymlinkReadA)
+# define RTSystemFirmwareQueryType                      RT_MANGLER(RTSystemFirmwareQueryType)
+# define RTSystemFirmwareValueFree                      RT_MANGLER(RTSystemFirmwareValueFree)
+# define RTSystemFirmwareValueGet                       RT_MANGLER(RTSystemFirmwareValueGet)
 # define RTSystemIsInsideVM                             RT_MANGLER(RTSystemIsInsideVM)
 # define RTSystemQueryAvailableRam                      RT_MANGLER(RTSystemQueryAvailableRam)
Index: /trunk/include/iprt/system.h
===================================================================
--- /trunk/include/iprt/system.h	(revision 80707)
+++ /trunk/include/iprt/system.h	(revision 80708)
@@ -260,4 +260,85 @@
 RTDECL(bool) RTSystemIsInsideVM(void);
 
+/**
+ * Enumeration for defining a system's firmware type.
+ */
+typedef enum RTSYSFWTYPE
+{
+    /** Unknown firmware. */
+    RTSYSFWTYPE_UNKNOWN = 0,
+    /** Firmware is BIOS. */
+    RTSYSFWTYPE_BIOS,
+    /** Firmware is UEFI. */
+    RTSYSFWTYPE_UEFI,
+    /** The usual 32-bit hack.  */
+    RTSYSFWTYP_32_BIT_HACK = 0x7fffffff
+} RTSYSFWTYPE;
+/** Pointer to a system firmware type. */
+typedef RTSYSFWTYPE *PRTSYSFWTYPE;
+
+/**
+ * Queries the system's firmware type.
+ *
+ * @retval  IPRT status code.
+ * @param   pFirmwareType       Where to store the firmware type on success.
+ */
+RTDECL(int) RTSystemFirmwareQueryType(PRTSYSFWTYPE pFirmwareType);
+
+/**
+ * Enumeration for defining a system firmware value type.
+ */
+typedef enum RTSYSFWVALUETYPE
+{
+    /** Invalid value type. */
+    RTSYSFWVALUETYPE_INVALID = 0,
+    /** Value is of type boolean. */
+    RTSYSFWVALUETYPE_BOOLEAN,
+    /** The usual 32-bit hack.  */
+    RTSYSFWVALUETYPE_32_BIT_HACK = 0x7fffffff
+} RTSYSFWVALUETYPE;
+
+/**
+ * Structure for keeping a system firmware value.
+ */
+typedef struct RTSYSFWVALUE
+{
+    /** Value type. */
+    RTSYSFWVALUETYPE enmType;
+    union
+    {
+        /** Boolean value. */
+        bool fVal;
+    } u;
+} RTSYSFWVALUE;
+/** Pointer to a system firmware value. */
+typedef RTSYSFWVALUE *PRTSYSFWVALUE;
+
+/**
+ * Enumeration for a system firmware property.
+ */
+typedef enum RTSYSFWPRPOP
+{
+    /** Invalid property, do not use. */
+    RTSYSFWPROP_INVALID = 0,
+    /** @todo Not yet implemented. */
+    RTSYSFWPROP_BOOT_CURRENT,
+    /** @todo Not yet implemented. */
+    RTSYSFWPROP_BOOT_ORDER,
+    /** @todo Not yet implemented. */
+    RTSYSFWPROP_BOOT_NEXT,
+    /** boolean: Whether Secure Boot is enabled or not. */
+    RTSYSFWPROP_SECURE_BOOT,
+    /** @todo Not yet implemented. */
+    RTSYSFWPROP_TIMEOUT,
+    /** @todo Not yet implemented. */
+    RTSYSFWPROP_PLATFORM_LANG,
+    /** The usual 32-bit hack.  */
+    RTSYSFWPROP_32_BIT_HACK = 0x7fffffff
+} RTSYSFWPROP;
+
+RTDECL(int) RTSystemFirmwareValueGet(RTSYSFWPROP enmProp, PRTSYSFWVALUE *ppValue);
+
+RTDECL(void) RTSystemFirmwareValueFree(PRTSYSFWVALUE pValue);
+
 #ifdef RT_OS_WINDOWS
 
Index: /trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/Makefile.kmk	(revision 80707)
+++ /trunk/src/VBox/Runtime/Makefile.kmk	(revision 80708)
@@ -873,4 +873,5 @@
 	r3/win/RTSystemShutdown-win.cpp \
 	r3/win/RTSystemQueryDmiString-win.cpp \
+	r3/win/RTSystemFirmware-win.cpp \
 	r3/win/RTSystemQueryTotalRam-win.cpp \
 	r3/win/RTTimeZoneGetCurrent-win.cpp \
@@ -933,4 +934,5 @@
  	generic/RTSemEventMultiWait-2-ex-generic.cpp \
  	generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
+	generic/RTSystemFirmware-generic.cpp \
 	generic/RTTimeLocalNow-generic.cpp \
 	generic/RTTimerCreate-generic.cpp \
@@ -1043,4 +1045,5 @@
 	generic/RTRandAdvCreateSystemTruer-generic.cpp \
 	generic/RTSystemQueryDmiString-generic.cpp \
+	generic/RTSystemFirmware-generic.cpp \
 	generic/RTSystemShutdown-generic.cpp \
 	generic/RTTimeLocalNow-generic.cpp \
@@ -1147,4 +1150,5 @@
 	r3/darwin/rtProcInitExePath-darwin.cpp \
 	r3/darwin/RTSystemQueryDmiString-darwin.cpp \
+	r3/generic/RTSystemFirmware-generic.cpp \
 	r3/darwin/sched-darwin.cpp \
 	r3/darwin/systemmem-darwin.cpp \
@@ -1214,4 +1218,5 @@
 	generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
 	generic/RTSystemQueryDmiString-generic.cpp \
+	generic/RTSystemFirmware-generic.cpp \
 	generic/RTSystemShutdown-generic.cpp \
 	generic/RTThreadGetAffinity-stub-generic.cpp \
@@ -1297,4 +1302,5 @@
 	generic/RTSemEventMultiWaitNoResume-2-ex-generic.cpp \
 	generic/RTSystemQueryDmiString-generic.cpp \
+	generic/RTSystemFirmware-generic.cpp \
 	generic/RTSystemShutdown-generic.cpp \
 	generic/RTThreadGetAffinity-stub-generic.cpp \
@@ -1451,15 +1457,19 @@
 	common/string/memrchr.asm \
 	r3/solaris/coredumper-solaris.cpp \
-	r3/solaris/RTSystemQueryDmiString-solaris.cpp
+	r3/solaris/RTSystemQueryDmiString-solaris.cpp \
+	r3/generic/RTSystemFirmware-generic.cpp
 RuntimeR3_SOURCES.solaris.x86 = \
 	common/string/memrchr.asm \
 	r3/solaris/coredumper-solaris.cpp \
-	r3/solaris/RTSystemQueryDmiString-solaris.cpp
+	r3/solaris/RTSystemQueryDmiString-solaris.cpp \
+	r3/generic/RTSystemFirmware-generic.cpp
 RuntimeR3_SOURCES.solaris.sparc32 = \
 	common/string/memrchr.cpp \
-	generic/RTSystemQueryDmiString-generic.cpp
+	generic/RTSystemQueryDmiString-generic.cpp \
+	generic/RTSystemFirmware-generic.cpp
 RuntimeR3_SOURCES.solaris.sparc64 = \
 	common/string/memrchr.cpp \
-	generic/RTSystemQueryDmiString-generic.cpp
+	generic/RTSystemQueryDmiString-generic.cpp \
+	generic/RTSystemFirmware-generic.cpp
 
 RuntimeR3_SOURCES.haiku = \
@@ -3991,3 +4001,2 @@
 x509-template.o x509-template.obj: x509-core.o x509-asn1-decoder.o x509-sanity.o x509-init.o
 pkcs7-template.o pkcs7-template.obj: pkcs7-core.o pkcs7-asn1-decoder.o pkcs7-sanity.o pkcs7-init.o
-
Index: /trunk/src/VBox/Runtime/generic/RTSystemFirmware-generic.cpp
===================================================================
--- /trunk/src/VBox/Runtime/generic/RTSystemFirmware-generic.cpp	(revision 80708)
+++ /trunk/src/VBox/Runtime/generic/RTSystemFirmware-generic.cpp	(revision 80708)
@@ -0,0 +1,68 @@
+/* $Id$ */
+/** @file
+ * IPRT - System firmware information, Generic stub.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+
+#include <iprt/assert.h>
+#include <iprt/errcore.h>
+#include <iprt/ldr.h>
+#include <iprt/system.h>
+#include "internal/iprt.h"
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+
+
+RTDECL(int) RTSystemFirmwareQueryType(PRTSYSFWTYPE pFirmwareType)
+{
+    AssertPtrReturn(pFirmwareType, VERR_INVALID_POINTER);
+
+    return VERR_NOT_SUPPORTED;
+}
+RT_EXPORT_SYMBOL(RTSystemFirmwareQueryType);
+
+
+RTDECL(void) RTSystemFirmwareValueFree(PRTSYSFWVALUE pValue)
+{
+    RT_NOREF(pValue);
+}
+RT_EXPORT_SYMBOL(RTSystemFirmwareValueFree);
+
+
+RTDECL(int) RTSystemFirmwareValueGet(RTSYSFWPROP enmProp, PRTSYSFWVALUE *ppValue)
+{
+    AssertPtrReturn(ppValue, VERR_INVALID_POINTER);
+
+    RT_NOREF(enmProp, ppValue);
+
+    return VERR_NOT_SUPPORTED;
+}
+RT_EXPORT_SYMBOL(RTSystemFirmwareValueGet);
Index: /trunk/src/VBox/Runtime/r3/win/RTSystemFirmware-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/RTSystemFirmware-win.cpp	(revision 80708)
+++ /trunk/src/VBox/Runtime/r3/win/RTSystemFirmware-win.cpp	(revision 80708)
@@ -0,0 +1,264 @@
+/* $Id$ */
+/** @file
+ * IPRT - System firmware information, Win32.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+
+#include <iprt/nt/nt-and-windows.h>
+
+#include <iprt/assert.h>
+#include <iprt/errcore.h>
+#include <iprt/mem.h>
+#include <iprt/ldr.h>
+#include <iprt/string.h>
+#include <iprt/system.h>
+#include <iprt/utf16.h>
+
+
+/*********************************************************************************************************************************
+*   Structures and Typedefs                                                                                                      *
+*********************************************************************************************************************************/
+/**
+ * These are the FirmwareType* defines found in the Vista Platform SDK and returned
+ * by GetProductInfo().
+ *
+ * We define them ourselves because we don't necessarily have any Vista PSDK around.
+ */
+typedef enum RTWINFWTYPE
+{
+    kRTWinFirmwareTypeUnknown = 0,
+    kRTWinFirmwareTypeBios    = 1,
+    kRTWinFirmwareTypeUefi    = 2,
+    kRTWinFirmwareTypeMax     = 3
+} RTWINFWTYPE;
+
+/** Function pointer for dynamic import of GetFirmwareType(). */
+typedef BOOL (WINAPI *PFNGETFIRMWARETYPE)(RTWINFWTYPE *);
+
+/** Defines the UEFI Globals UUID. */
+#define VBOX_UEFI_UUID_GLOBALS L"{8BE4DF61-93CA-11D2-AA0D-00E098032B8C}"
+/** Defines an UEFI dummy UUID. */
+#define VBOX_UEFI_UUID_DUMMY   L"{00000000-0000-0000-0000-000000000000}"
+
+
+static int rtSystemFirmwareGetPrivileges(LPCTSTR pcszPrivilege)
+{
+    HANDLE hToken;
+    BOOL fRc = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
+    if (!fRc)
+        return RTErrConvertFromWin32(GetLastError());
+
+    int rc = VINF_SUCCESS;
+
+    TOKEN_PRIVILEGES tokenPriv;
+    fRc = LookupPrivilegeValue(NULL, pcszPrivilege, &tokenPriv.Privileges[0].Luid);
+    if (fRc)
+    {
+        tokenPriv.PrivilegeCount = 1;
+        tokenPriv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+        fRc = AdjustTokenPrivileges(hToken, FALSE, &tokenPriv, 0, (PTOKEN_PRIVILEGES)NULL, 0);
+        if (!fRc)
+            rc = RTErrConvertFromWin32(GetLastError());
+    }
+    else
+        rc = RTErrConvertFromWin32(GetLastError());
+
+    CloseHandle(hToken);
+
+    return rc;
+}
+
+
+RTDECL(int) RTSystemFirmwareQueryType(PRTSYSFWTYPE pFirmwareType)
+{
+    AssertPtrReturn(pFirmwareType, VERR_INVALID_POINTER);
+
+    RTSYSFWTYPE fwType = RTSYSFWTYPE_UNKNOWN;
+
+    RTLDRMOD hKernel32 = NIL_RTLDRMOD;
+    int rc = RTLdrLoadSystem("Kernel32.dll", /* fNoUnload = */ true, &hKernel32);
+    if (RT_SUCCESS(rc))
+    {
+        PFNGETFIRMWARETYPE pfnGetFirmwareType;
+        rc = RTLdrGetSymbol(hKernel32, "GetFirmwareType", (void **)&pfnGetFirmwareType); /* Only >= Windows 8. */
+        if (RT_SUCCESS(rc))
+        {
+            RTWINFWTYPE winFwType;
+            if (pfnGetFirmwareType(&winFwType))
+            {
+                switch (winFwType)
+                {
+                    case kRTWinFirmwareTypeBios:
+                        fwType = RTSYSFWTYPE_BIOS;
+                        break;
+
+                    case kRTWinFirmwareTypeUefi:
+                        fwType = RTSYSFWTYPE_UEFI;
+                        break;
+
+                    default: /* Huh? */
+                        fwType = RTSYSFWTYPE_UNKNOWN;
+                        break;
+                }
+            }
+            else
+                rc = RTErrConvertFromWin32(GetLastError());
+        }
+        else /* Fallback for OSes < Windows 8. */
+        {
+            rc = rtSystemFirmwareGetPrivileges(SE_SYSTEM_ENVIRONMENT_NAME);
+            if (RT_SUCCESS(rc))
+            {
+                PCWCHAR pcwszGUID = VBOX_UEFI_UUID_GLOBALS; /* UEFI Globals. */
+                PCWCHAR pcwszName = L"";
+
+                uint8_t uEnabled = 0;
+                DWORD dwRet = GetFirmwareEnvironmentVariableW(pcwszName, pcwszGUID, &uEnabled, sizeof(uEnabled));
+                if (dwRet) /* Returns the bytes written. */
+                {
+                    Assert(dwRet == sizeof(uEnabled));
+                    fwType = RT_BOOL(uEnabled) ? RTSYSFWTYPE_UEFI : RTSYSFWTYPE_BIOS;
+                }
+                else
+                    rc = RTErrConvertFromWin32(GetLastError());
+            }
+        }
+
+        RTLdrClose(hKernel32);
+    }
+
+    if (RT_SUCCESS(rc))
+        *pFirmwareType = fwType;
+
+    return rc;
+}
+
+
+RTDECL(void) RTSystemFirmwareValueFree(PRTSYSFWVALUE pValue)
+{
+    if (!pValue)
+        return;
+
+    /** @todo Implement cleanup here. */
+}
+
+
+RTDECL(int) RTSystemFirmwareValueGet(RTSYSFWPROP enmProp, PRTSYSFWVALUE *ppValue)
+{
+    int rc = rtSystemFirmwareGetPrivileges(SE_SYSTEM_ENVIRONMENT_NAME);
+    if (RT_FAILURE(rc))
+        return rc;
+
+    PRTSYSFWVALUE pValue = (PRTSYSFWVALUE)RTMemAlloc(sizeof(RTSYSFWVALUE));
+    if (!pValue)
+        return VERR_NO_MEMORY;
+
+    char *pszName = NULL;
+    DWORD dwSize  = 0;
+
+    switch (enmProp)
+    {
+        case RTSYSFWPROP_SECURE_BOOT:
+        {
+            rc = RTStrAAppend(&pszName, "SecureBoot");
+            if (RT_FAILURE(rc))
+                break;
+
+            pValue->enmType = RTSYSFWVALUETYPE_BOOLEAN;
+            dwSize = 1;
+            break;
+        }
+
+        case RTSYSFWPROP_BOOT_CURRENT:
+            RT_FALL_THROUGH();
+        case RTSYSFWPROP_BOOT_ORDER:
+            RT_FALL_THROUGH();
+        case RTSYSFWPROP_BOOT_NEXT:
+            RT_FALL_THROUGH();
+        case RTSYSFWPROP_TIMEOUT:
+            RT_FALL_THROUGH();
+        case RTSYSFWPROP_PLATFORM_LANG:
+            rc = VERR_NOT_IMPLEMENTED;
+            break;
+
+        default:
+            rc = VERR_INVALID_PARAMETER;
+            break;
+    }
+
+    if (RT_SUCCESS(rc))
+    {
+        PRTUTF16 pwszName;
+        rc = RTStrToUtf16(pszName, &pwszName);
+        if (RT_SUCCESS(rc))
+        {
+            void *pvBuf = RTMemAlloc(dwSize);
+            DWORD dwBuf = dwSize;
+
+            if (pvBuf)
+            {
+                DWORD dwRet = GetFirmwareEnvironmentVariableW(pwszName, VBOX_UEFI_UUID_GLOBALS, pvBuf, dwBuf);
+                if (dwRet)
+                {
+                    switch (pValue->enmType)
+                    {
+                        case RTSYSFWVALUETYPE_BOOLEAN:
+                            pValue->u.fVal = RT_BOOL(*(uint8_t *)pvBuf);
+                            break;
+
+                        case RTSYSFWVALUETYPE_INVALID:
+                            RT_FALL_THROUGH();
+                        default:
+                            AssertFailed();
+                            break;
+                    }
+                }
+                else
+                    rc = RTErrConvertFromWin32(GetLastError());
+
+                RTMemFree(pvBuf);
+            }
+            else
+                rc = VERR_NO_MEMORY;
+
+            RTUtf16Free(pwszName);
+        }
+    }
+
+    RTStrFree(pszName);
+
+    if (RT_SUCCESS(rc))
+    {
+        *ppValue = pValue;
+    }
+    else
+        RTSystemFirmwareValueFree(pValue);
+
+    return rc;
+}
+
Index: /trunk/src/VBox/Runtime/testcase/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Runtime/testcase/Makefile.kmk	(revision 80707)
+++ /trunk/src/VBox/Runtime/testcase/Makefile.kmk	(revision 80708)
@@ -127,4 +127,5 @@
 	tstRTSymlink \
 	tstRTSystemQueryDmi \
+	tstRTSystemQueryFirmware \
 	tstRTSystemQueryOsInfo \
 	tstRTTcp-1 \
@@ -656,4 +657,7 @@
 tstRTSystemQueryDmi_SOURCES = tstRTSystemQueryDmi.cpp
 
+tstRTSystemQueryFirmware_TEMPLATE = VBOXR3TSTEXE
+tstRTSystemQueryFirmware_SOURCES = tstRTSystemQueryFirmware.cpp
+
 tstRTSystemQueryOsInfo_TEMPLATE = VBOXR3TSTEXE
 tstRTSystemQueryOsInfo_SOURCES = tstRTSystemQueryOsInfo.cpp
Index: /trunk/src/VBox/Runtime/testcase/tstRTSystemQueryFirmware.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstRTSystemQueryFirmware.cpp	(revision 80708)
+++ /trunk/src/VBox/Runtime/testcase/tstRTSystemQueryFirmware.cpp	(revision 80708)
@@ -0,0 +1,80 @@
+/* $Id$ */
+/** @file
+ * IPRT Testcase - RTSystemQuerFirmware*.
+ */
+
+/*
+ * Copyright (C) 2019 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+
+/*********************************************************************************************************************************
+*   Header Files                                                                                                                 *
+*********************************************************************************************************************************/
+#include <iprt/system.h>
+
+#include <iprt/assert.h>
+#include <iprt/errcore.h>
+#include <iprt/string.h>
+#include <iprt/test.h>
+
+
+int main()
+{
+    RTTEST hTest;
+    int rc = RTTestInitAndCreate("tstRTSystemQueryFirmware", &hTest);
+    if (rc)
+        return rc;
+    RTTestBanner(hTest);
+
+    RTSYSFWTYPE fwType;
+    rc = RTSystemFirmwareQueryType(&fwType);
+    if (RT_FAILURE(rc))
+        RTTestIFailed("Querying firmware type failed, rc=%Rrc\n", rc);
+
+    switch (fwType)
+    {
+        case RTSYSFWTYPE_BIOS:
+            RTTestPrintf(hTest, RTTESTLVL_INFO, "Firmware type: BIOS (Legacy)\n");
+            break;
+        case RTSYSFWTYPE_UEFI:
+            RTTestPrintf(hTest, RTTESTLVL_INFO, "Firmware type: UEFI\n");
+            break;
+        case RTSYSFWTYPE_UNKNOWN: /* Do not fail on not-implemented platforms. */
+            RT_FALL_THROUGH();
+        default:
+            RTTestPrintf(hTest, RTTESTLVL_INFO, "Unknown firmware type\n");
+            break;
+    }
+
+    PRTSYSFWVALUE pValue;
+    rc = RTSystemFirmwareValueGet(RTSYSFWPROP_SECURE_BOOT, &pValue);
+    if (RT_SUCCESS(rc))
+    {
+        RTTestPrintf(hTest, RTTESTLVL_INFO, "Secure Boot enabled: %RTbool\n", pValue->u.fVal);
+
+        RTSystemFirmwareValueFree(pValue);
+    }
+    else if (rc != VERR_NOT_SUPPORTED)
+        RTTestIFailed("Querying secure boot failed, rc=%Rrc\n", rc);
+
+    return RTTestSummaryAndDestroy(hTest);
+}
+
