From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) by mx.groups.io with SMTP id smtpd.web11.26.1618612030964466699 for ; Fri, 16 Apr 2021 15:27:11 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=tSyzD0g+; spf=pass (domain: nuviainc.com, ip: 209.85.210.51, mailfrom: rebecca@nuviainc.com) Received: by mail-ot1-f51.google.com with SMTP id c8-20020a9d78480000b0290289e9d1b7bcso13040631otm.4 for ; Fri, 16 Apr 2021 15:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5IlcjAk5IvdIihhBDKWMPWIeqiBzXnZmDAMPzBc2PqQ=; b=tSyzD0g+b+Sdin/B3tBFCKDE41VuojbE3wrehMyNPA1raq3CQMp3Tq9yMSjxp6oICO DqMihNPfPey3BnTz64+Oxa8r2O0tru6JQpb9XZdkAWdNkuelZPhw5JVZkp6pB4pEeg7M CLrXeEkGm2w/srfl/p3ZEZgvqnEDIAivAQghizDu9n0FK2iqqTJT6vgpnjndZEfHKTSv QseOvDX7YJimcn7bTQcfRi6v17kCne5kd674p8gJ4Z9Fji3yOLg+BhoCG6awPK+4HO5W uZ1KEGQiZ1ODvzJNR5P2SU8qXUJ6TSOkxj7VuNoawDIPfNo9cdKL8aZG0/ena5tkEct7 +Mbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5IlcjAk5IvdIihhBDKWMPWIeqiBzXnZmDAMPzBc2PqQ=; b=lPbOX0emslHeTf0vQoP5lkMZYyAIyv090huKKzwnPCnDP555sykGrC0CqVL05UrLZS TznMBqrl8QLYFngrs4rJXPnpiyggMTxe7/vPznN6fqEwiJqSf1gqZnjbHh+rxIzBaxe+ 51Rr9WRDZ+i/OqVgIHAi1IM62FpN7wgC8EffJPoSlIAV3GAJ4dvHTro1jaWqBMARTz0w hr9gPTR0Orl+E2DhjFKdVMJWuaRauAbFTZBfxVYjYz0+q1BfZiRy8nPWrBZwvGh6s31j bMh6Zc8ggb08kuXId9gmhQW9Ue2dXpkXy6HOy3XKaxqyCz8vhOWHTppDgeijkUNUj6iY 5GkQ== X-Gm-Message-State: AOAM531MSQNAYYzbPefIV+RL/8aEVNC7hj0jMyCBQDcJngphXk2aCAIc 9tzpy2GZOWCiH3c93hcIZHhAVsm7FVinRtqrAVwNj1nrpXlWuSNnOAYnUmV0C+dh1Z61/5rkiF0 towXnjjENoOiakZF1ltnxDHy4NHNuU9SLCor5B5QEi0AxF980Jnx8NXnyNMaZXmB6Mv4k+oYV X-Google-Smtp-Source: ABdhPJyaZRuIlFgMHVeDvYcLlUpGxiTfFH8ISgiLpfAdo1jMepqi05d2Ug83AuSavDH7znPEPYH6ow== X-Received: by 2002:a9d:6c90:: with SMTP id c16mr5346152otr.80.1618612029965; Fri, 16 Apr 2021 15:27:09 -0700 (PDT) Return-Path: Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id n2sm1722288otr.46.2021.04.16.15.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Apr 2021 15:27:09 -0700 (PDT) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel , Graeme Gregory , Radoslaw Biernacki Subject: [edk2-platforms PATCH 1/1] SbsaQemu: Add OemMiscLib boot information and chassis status functions Date: Fri, 16 Apr 2021 16:26:49 -0600 Message-Id: <20210416222649.3697-1-rebecca@nuviainc.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add new SMBIOS Type 32 boot information and Type 3 chassis status functions that have been added to OemMiscLib in ArmPkg. Since this is a virtual platform, return fixed values for the chassis statuses. Signed-off-by: Rebecca Cran --- Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 91 ++++++++++++++++++++ Silicon/Qemu/SbsaQemu/SbsaQemu.dec | 2 +- 2 files changed, 92 insertions(+), 1 deletion(-) diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c index eb405b259848..b543045de3b7 100644 --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c @@ -239,3 +239,94 @@ OemUpdateSmbiosInfo ( HiiSetString (HiiHandle, TokenToUpdate, String, NULL); } } + +/** Fetches the Type 32 boot information status. + + @return Boot status. +**/ +MISC_BOOT_INFORMATION_STATUS_DATA_TYPE +EFIAPI +OemGetBootStatus ( + VOID + ) +{ + return BootInformationStatusNoError; +} + +/** Fetches the chassis status when it was last booted. + + @return Chassis status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisBootupState ( + VOID + ) +{ + return ChassisStateSafe; +} + +/** Fetches the chassis power supply/supplies status when last booted. + + @return Chassis power supply/supplies status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisPowerSupplyState ( + VOID + ) +{ + return ChassisStateSafe; +} + +/** Fetches the chassis thermal status when last booted. + + @return Chassis thermal status. +**/ +MISC_CHASSIS_STATE +EFIAPI +OemGetChassisThermalState ( + VOID + ) +{ + return ChassisStateSafe; +} + +/** Fetches the chassis security status when last booted. + + @return Chassis security status. +**/ +MISC_CHASSIS_SECURITY_STATE +EFIAPI +OemGetChassisSecurityStatus ( + VOID + ) +{ + return ChassisSecurityStatusNone; +} + +/** Fetches the chassis height in RMUs (Rack Mount Units). + + @return The height of the chassis. +**/ +UINT8 +EFIAPI +OemGetChassisHeight ( + VOID + ) +{ + return 1U; +} + +/** Fetches the number of power cords. + + @return The number of power cords. +**/ +UINT8 +EFIAPI +OemGetChassisNumPowerCords ( + VOID + ) +{ + return 1; +} \ No newline at end of file diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec index 9448852967b6..6051fabd683a 100644 --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec @@ -66,4 +66,4 @@ gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisVersion|L""|VOID*|0x0000011A gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisManufacturer|L""|VOID*|0x0000011B gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisAssetTag|L""|VOID*|0x0000011C - gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L""|VOID*|0x0000011D + gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdChassisSKU|L""|VOID*|0x0000011D \ No newline at end of file -- 2.26.2