VirtualBox

Ignore:
Timestamp:
Oct 16, 2024 2:15:04 PM (4 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165199
Message:

Devices/EFI/Firmware: Make the BaseRngLib work on ARM platform where the initial firmware is mapped RX, bugref:10777

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/Makefile.kmk

    r106190 r106386  
    284284        -D NETWORK_IP6_ENABLE=1 -D NETWORK_ISCSI_ENABLE=1 \
    285285        $(if $(VBOX_WITH_EFI_SECURE_BOOT),-D "SECURE_BOOT_ENABLE=1") \
    286         $(if $(VBOX_WITH_EFI_TPM),-D "TPM_ENABLE=1" -D "TPM1_ENABLE" -D "TPM2_ENABLE") \
    287         $(if $(VBOX_WITH_EFI_TPM),-D "TPM_CONFIG_ENABLE=1") \
     286        $(if $(VBOX_WITH_EFI_TPM),-D "TPM_ENABLE=1" -D "TPM1_ENABLE=1" -D "TPM2_ENABLE=1") \
     287        $(if $(VBOX_WITH_EFI_TPM),-D "TPM_CONFIG_ENABLE=1" -D "TPM2_CONFIG_ENABLE=1") \
     288        $(if $(VBOX_WITH_LSILOGIC),-D "MPT_SCSI_ENABLE=1") \
    288289        $(if $(VBOX_WITH_LSILOGIC),-D "MPT_SCSI_ENABLE=1") \
    289290        -D BUILD_NEW_SHELL=1 \
  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/BaseRngLib/AArch64/Rndr.c

    r105670 r106386  
    2020#include "BaseRngLibInternals.h"
    2121
     22/*
     23 * This is non XIP (eXecute In Place) safe.
     24 * This is used very early on in the TPM code when tings are still directly running from the ROM region which is RX only,
     25 * causing a write access fault, so avoid caching the flag and query it always.
     26 */
     27#ifndef VBOX
    2228STATIC BOOLEAN  mRndrSupported;
     29#endif
    2330
    2431//
     
    4451  )
    4552{
     53#ifndef VBOX
    4654  UINT64  Isar0;
    4755
     
    5361
    5462  mRndrSupported = ((Isar0 & RNDR_MASK) != 0);
     63#endif
    5564
    5665  return EFI_SUCCESS;
     
    138147  )
    139148{
     149#ifndef VBOX
    140150  return mRndrSupported;
     151#else
     152  return (ArmReadIdIsar0() & RNDR_MASK) != 0;
     153#endif
    141154}
    142155
     
    163176  }
    164177
     178#ifndef VBOX
    165179  if (!mRndrSupported) {
    166180    return EFI_UNSUPPORTED;
    167181  }
     182#else
     183  if (!(ArmReadIdIsar0() & RNDR_MASK)) {
     184    return EFI_UNSUPPORTED;
     185  }
     186#endif
    168187
    169188  //
  • trunk/src/VBox/Devices/EFI/Firmware/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c

    r101291 r106386  
    971971  }
    972972
     973  /*
     974   * Measuring the BIOS would break BitLocker when updating VirtualBox with a new UEFI firmware
     975   * as the measurement would change requiring the user to enter the recovery key.
     976   * As we have to trust the hypervisor anyway for now we also trust it with providing an untampered
     977   * UEFI firmware image.
     978   */
     979#ifndef VBOX
    973980  Status = MeasureMainBios ();
    974981  if (EFI_ERROR (Status)) {
    975982    return Status;
    976983  }
     984#endif
    977985
    978986  //
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette