VirtualBox

Ignore:
Timestamp:
Apr 14, 2023 3:17:44 PM (23 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156854
Message:

Devices/EFI/FirmwareNew: Update to edk2-stable202302 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/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.h

    r85718 r99404  
    99**/
    1010
    11 
    1211#ifndef _RTC_H_
    1312#define _RTC_H_
    14 
    1513
    1614#include <Uefi.h>
     
    3432
    3533typedef struct {
    36   EFI_LOCK  RtcLock;
    37   INT16     SavedTimeZone;
    38   UINT8     Daylight;
    39   UINT8     CenturyRtcAddress;
     34  EFI_LOCK    RtcLock;
     35  INT16       SavedTimeZone;
     36  UINT8       Daylight;
     37  UINT8       CenturyRtcAddress;
    4038} PC_RTC_MODULE_GLOBALS;
    4139
     
    6361// They are used if the RTC values are invalid during driver initialization
    6462//
    65 #define RTC_INIT_SECOND 0
    66 #define RTC_INIT_MINUTE 0
    67 #define RTC_INIT_HOUR   0
    68 #define RTC_INIT_DAY    1
    69 #define RTC_INIT_MONTH  1
     63#define RTC_INIT_SECOND  0
     64#define RTC_INIT_MINUTE  0
     65#define RTC_INIT_HOUR    0
     66#define RTC_INIT_DAY     1
     67#define RTC_INIT_MONTH   1
    7068
    7169#pragma pack(1)
     
    7472//
    7573typedef struct {
    76   UINT8 Rs : 4;  // Rate Selection Bits
    77   UINT8 Dv : 3;  // Divisor
    78   UINT8 Uip : 1; // Update in progress
     74  UINT8    Rs  : 4; // Rate Selection Bits
     75  UINT8    Dv  : 3; // Divisor
     76  UINT8    Uip : 1; // Update in progress
    7977} RTC_REGISTER_A_BITS;
    8078
    8179typedef union {
    82   RTC_REGISTER_A_BITS Bits;
    83   UINT8               Data;
     80  RTC_REGISTER_A_BITS    Bits;
     81  UINT8                  Data;
    8482} RTC_REGISTER_A;
    8583
     
    8886//
    8987typedef struct {
    90   UINT8 Dse : 1; // 0 - Daylight saving disabled  1 - Daylight savings enabled
    91   UINT8 Mil : 1; // 0 - 12 hour mode              1 - 24 hour mode
    92   UINT8 Dm : 1;  // 0 - BCD Format                1 - Binary Format
    93   UINT8 Sqwe : 1; // 0 - Disable SQWE output       1 - Enable SQWE output
    94   UINT8 Uie : 1; // 0 - Update INT disabled       1 - Update INT enabled
    95   UINT8 Aie : 1; // 0 - Alarm INT disabled        1 - Alarm INT Enabled
    96   UINT8 Pie : 1; // 0 - Periodic INT disabled     1 - Periodic INT Enabled
    97   UINT8 Set : 1; // 0 - Normal operation.         1 - Updates inhibited
     88  UINT8    Dse  : 1; // 0 - Daylight saving disabled  1 - Daylight savings enabled
     89  UINT8    Mil  : 1; // 0 - 12 hour mode              1 - 24 hour mode
     90  UINT8    Dm   : 1; // 0 - BCD Format                1 - Binary Format
     91  UINT8    Sqwe : 1; // 0 - Disable SQWE output       1 - Enable SQWE output
     92  UINT8    Uie  : 1; // 0 - Update INT disabled       1 - Update INT enabled
     93  UINT8    Aie  : 1; // 0 - Alarm INT disabled        1 - Alarm INT Enabled
     94  UINT8    Pie  : 1; // 0 - Periodic INT disabled     1 - Periodic INT Enabled
     95  UINT8    Set  : 1; // 0 - Normal operation.         1 - Updates inhibited
    9896} RTC_REGISTER_B_BITS;
    9997
    10098typedef union {
    101   RTC_REGISTER_B_BITS Bits;
    102   UINT8               Data;
     99  RTC_REGISTER_B_BITS    Bits;
     100  UINT8                  Data;
    103101} RTC_REGISTER_B;
    104102
     
    107105//
    108106typedef struct {
    109   UINT8 Reserved : 4; // Read as zero.  Can not be written.
    110   UINT8 Uf : 1;      // Update End Interrupt Flag
    111   UINT8 Af : 1;      // Alarm Interrupt Flag
    112   UINT8 Pf : 1;      // Periodic Interrupt Flag
    113   UINT8 Irqf : 1;    // Interrupt Request Flag = PF & PIE | AF & AIE | UF & UIE
     107  UINT8    Reserved : 4; // Read as zero.  Can not be written.
     108  UINT8    Uf       : 1; // Update End Interrupt Flag
     109  UINT8    Af       : 1; // Alarm Interrupt Flag
     110  UINT8    Pf       : 1; // Periodic Interrupt Flag
     111  UINT8    Irqf     : 1; // Interrupt Request Flag = PF & PIE | AF & AIE | UF & UIE
    114112} RTC_REGISTER_C_BITS;
    115113
    116114typedef union {
    117   RTC_REGISTER_C_BITS Bits;
    118   UINT8               Data;
     115  RTC_REGISTER_C_BITS    Bits;
     116  UINT8                  Data;
    119117} RTC_REGISTER_C;
    120118
     
    123121//
    124122typedef struct {
    125   UINT8 Reserved : 7; // Read as zero.  Can not be written.
    126   UINT8 Vrt : 1;      // Valid RAM and Time
     123  UINT8    Reserved : 7; // Read as zero.  Can not be written.
     124  UINT8    Vrt      : 1; // Valid RAM and Time
    127125} RTC_REGISTER_D_BITS;
    128126
    129127typedef union {
    130   RTC_REGISTER_D_BITS Bits;
    131   UINT8               Data;
     128  RTC_REGISTER_D_BITS    Bits;
     129  UINT8                  Data;
    132130} RTC_REGISTER_D;
    133131
     
    181179EFI_STATUS
    182180PcRtcGetTime (
    183   OUT EFI_TIME              *Time,
    184   OUT EFI_TIME_CAPABILITIES *Capabilities, OPTIONAL
    185   IN  PC_RTC_MODULE_GLOBALS *Global
     181  OUT EFI_TIME               *Time,
     182  OUT EFI_TIME_CAPABILITIES  *Capabilities  OPTIONAL,
     183  IN  PC_RTC_MODULE_GLOBALS  *Global
    186184  );
    187185
     
    204202PcRtcSetWakeupTime (
    205203  IN BOOLEAN                Enable,
    206   IN EFI_TIME               *Time,  OPTIONAL
     204  IN EFI_TIME               *Time   OPTIONAL,
    207205  IN PC_RTC_MODULE_GLOBALS  *Global
    208206  );
     
    226224EFI_STATUS
    227225PcRtcGetWakeupTime (
    228   OUT BOOLEAN               *Enabled,
    229   OUT BOOLEAN               *Pending,
    230   OUT EFI_TIME              *Time,
    231   IN  PC_RTC_MODULE_GLOBALS *Global
     226  OUT BOOLEAN                *Enabled,
     227  OUT BOOLEAN                *Pending,
     228  OUT EFI_TIME               *Time,
     229  IN  PC_RTC_MODULE_GLOBALS  *Global
    232230  );
    233231
     
    248246EFIAPI
    249247InitializePcRtc (
    250   IN EFI_HANDLE                            ImageHandle,
    251   IN EFI_SYSTEM_TABLE                      *SystemTable
     248  IN EFI_HANDLE        ImageHandle,
     249  IN EFI_SYSTEM_TABLE  *SystemTable
    252250  );
    253251
     
    263261EFI_STATUS
    264262RtcTimeFieldsValid (
    265   IN EFI_TIME *Time
     263  IN EFI_TIME  *Time
    266264  );
    267265
     
    283281  );
    284282
    285 
    286283/**
    287284  Converts time read from RTC to EFI_TIME format defined by UEFI spec.
     
    317314EFI_STATUS
    318315RtcWaitToUpdate (
    319   UINTN Timeout
     316  UINTN  Timeout
    320317  );
    321318
     
    343340BOOLEAN
    344341IsLeapYear (
    345   IN EFI_TIME   *Time
     342  IN EFI_TIME  *Time
    346343  );
    347344
     
    369366EFIAPI
    370367PcRtcAcpiTableChangeCallback (
    371   IN EFI_EVENT        Event,
    372   IN VOID             *Context
    373   );
     368  IN EFI_EVENT  Event,
     369  IN VOID       *Context
     370  );
     371
    374372#endif
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