VirtualBox

Ignore:
Timestamp:
Jul 1, 2021 8:17:41 AM (3 years ago)
Author:
vboxsync
Message:

Devices/EFI: Merge edk-stable202105 and openssl 1.1.1j and make it build, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c

    r85718 r89983  
    33  write only) architecture, such as ARM and RISC-V processor.
    44
    5   Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
     5  Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
    66  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
    77  Copyright (c) 2017, AMD Incorporated. All rights reserved.<BR>
     
    409409{
    410410  UINT8                             Value;
    411 
    412   Value = *(volatile UINT8*)Address;
     411  BOOLEAN                           Flag;
     412
     413  Flag = FilterBeforeMmIoRead (FilterWidth8, Address, &Value);
     414  if (Flag) {
     415    Value = *(volatile UINT8*)Address;
     416  }
     417  FilterAfterMmIoRead (FilterWidth8, Address, &Value);
     418
    413419  return Value;
    414420}
     
    434440  )
    435441{
    436   *(volatile UINT8*)Address = Value;
     442  BOOLEAN                           Flag;
     443
     444  Flag = FilterBeforeMmIoWrite (FilterWidth8, Address, &Value);
     445  if (Flag) {
     446    *(volatile UINT8*)Address = Value;
     447  }
     448  FilterAfterMmIoWrite (FilterWidth8, Address, &Value);
     449
    437450  return Value;
    438451}
     
    459472{
    460473  UINT16                            Value;
     474  BOOLEAN                           Flag;
    461475
    462476  ASSERT ((Address & 1) == 0);
    463   Value = *(volatile UINT16*)Address;
     477
     478  Flag = FilterBeforeMmIoRead (FilterWidth16, Address, &Value);
     479  if (Flag) {
     480    Value = *(volatile UINT16*)Address;
     481  }
     482  FilterAfterMmIoRead (FilterWidth16, Address, &Value);
     483
    464484  return Value;
    465485}
     
    485505  )
    486506{
     507  BOOLEAN                           Flag;
     508
    487509  ASSERT ((Address & 1) == 0);
    488   *(volatile UINT16*)Address = Value;
     510
     511  Flag = FilterBeforeMmIoWrite (FilterWidth16, Address, &Value);
     512  if (Flag) {
     513    *(volatile UINT16*)Address = Value;
     514  }
     515  FilterAfterMmIoWrite (FilterWidth16, Address, &Value);
     516
    489517  return Value;
    490518}
     
    511539{
    512540  UINT32                            Value;
     541  BOOLEAN                           Flag;
    513542
    514543  ASSERT ((Address & 3) == 0);
    515   Value = *(volatile UINT32*)Address;
     544
     545  Flag = FilterBeforeMmIoRead (FilterWidth32, Address, &Value);
     546  if (Flag) {
     547    Value = *(volatile UINT32*)Address;
     548  }
     549  FilterAfterMmIoRead (FilterWidth32, Address, &Value);
     550
    516551  return Value;
    517552}
     
    537572  )
    538573{
     574  BOOLEAN                           Flag;
     575
    539576  ASSERT ((Address & 3) == 0);
     577
     578  Flag = FilterBeforeMmIoWrite (FilterWidth32, Address, &Value);
     579  if (Flag) {
    540580  *(volatile UINT32*)Address = Value;
     581  }
     582  FilterAfterMmIoWrite (FilterWidth32, Address, &Value);
     583
    541584  return Value;
    542585}
     
    563606{
    564607  UINT64                            Value;
     608  BOOLEAN                           Flag;
    565609
    566610  ASSERT ((Address & 7) == 0);
    567   Value = *(volatile UINT64*)Address;
     611
     612  Flag = FilterBeforeMmIoRead (FilterWidth64, Address, &Value);
     613  if (Flag) {
     614    Value = *(volatile UINT64*)Address;
     615  }
     616  FilterAfterMmIoRead (FilterWidth64, Address, &Value);
     617
    568618  return Value;
    569619}
     
    589639  )
    590640{
     641  BOOLEAN                           Flag;
     642
    591643  ASSERT ((Address & 7) == 0);
    592   *(volatile UINT64*)Address = Value;
    593   return Value;
    594 }
    595 
     644
     645  Flag = FilterBeforeMmIoWrite (FilterWidth64, Address, &Value);
     646  if (Flag) {
     647    *(volatile UINT64*)Address = Value;
     648  }
     649  FilterAfterMmIoWrite (FilterWidth64, Address, &Value);
     650
     651  return Value;
     652}
     653
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