VirtualBox

Ignore:
Timestamp:
Oct 28, 2015 8:17:18 PM (9 years ago)
Author:
vboxsync
Message:

EFI/Firmware: 'svn merge /vendor/edk2/UDK2010.SR1 /vendor/edk2/current .', reverting and removing files+dirs listed in ReadMe.vbox, resolving conflicts with help from ../UDK2014.SP1/. This is a raw untested merge.

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

Legend:

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

  • trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Include/Protocol/SimpleFileSystem.h

    r48674 r58459  
    88  UEFI 2.0 can boot from any valid EFI image contained in a SimpleFileSystem.
    99
    10 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
     10Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
    1111This program and the accompanying materials are licensed and made available under
    1212the terms and conditions of the BSD License that accompanies this distribution. 
     
    191191  @retval EFI_DEVICE_ERROR     On entry, the current file position is beyond the end of the file.
    192192  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
    193   @retval EFI_BUFFER_TO_SMALL The BufferSize is too small to read the current directory
     193  @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small to read the current directory
    194194                               entry. BufferSize has been updated with the size
    195195                               needed to complete the request.
     
    364364  );
    365365
    366 #define EFI_FILE_PROTOCOL_REVISION   0x00010000
     366typedef struct {
     367  //
     368  // If Event is NULL, then blocking I/O is performed.
     369  // If Event is not NULL and non-blocking I/O is supported, then non-blocking I/O is performed,
     370  // and Event will be signaled when the read request is completed.
     371  // The caller must be prepared to handle the case where the callback associated with Event
     372  // occurs before the original asynchronous I/O request call returns.
     373  //
     374  EFI_EVENT                   Event;
     375
     376  //
     377  // Defines whether or not the signaled event encountered an error.
     378  //
     379  EFI_STATUS                  Status;
     380
     381  //
     382  // For OpenEx():  Not Used, ignored.
     383  // For ReadEx():  On input, the size of the Buffer. On output, the amount of data returned in Buffer.
     384  //                In both cases, the size is measured in bytes.
     385  // For WriteEx(): On input, the size of the Buffer. On output, the amount of data actually written.
     386  //                In both cases, the size is measured in bytes.
     387  // For FlushEx(): Not used, ignored.
     388  //
     389  UINTN                       BufferSize;
     390
     391  //
     392  // For OpenEx():  Not Used, ignored.
     393  // For ReadEx():  The buffer into which the data is read.
     394  // For WriteEx(): The buffer of data to write.
     395  // For FlushEx(): Not Used, ignored.
     396  //
     397  VOID                        *Buffer;
     398} EFI_FILE_IO_TOKEN;
     399
     400/**
     401  Opens a new file relative to the source directory's location.
     402
     403  @param  This       A pointer to the EFI_FILE_PROTOCOL instance that is the file
     404                     handle to the source location.
     405  @param  NewHandle  A pointer to the location to return the opened handle for the new
     406                     file.
     407  @param  FileName   The Null-terminated string of the name of the file to be opened.
     408                     The file name may contain the following path modifiers: "\", ".",
     409                     and "..".
     410  @param  OpenMode   The mode to open the file. The only valid combinations that the
     411                     file may be opened with are: Read, Read/Write, or Create/Read/Write.
     412  @param  Attributes Only valid for EFI_FILE_MODE_CREATE, in which case these are the
     413                     attribute bits for the newly created file.
     414  @param  Token      A pointer to the token associated with the transaction.
     415
     416  @retval EFI_SUCCESS          If Event is NULL (blocking I/O): The data was read successfully.
     417                               If Event is not NULL (asynchronous I/O): The request was successfully
     418                                                                        queued for processing.
     419  @retval EFI_NOT_FOUND        The specified file could not be found on the device.
     420  @retval EFI_NO_MEDIA         The device has no medium.
     421  @retval EFI_MEDIA_CHANGED    The device has a different medium in it or the medium is no
     422                               longer supported.
     423  @retval EFI_DEVICE_ERROR     The device reported an error.
     424  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
     425  @retval EFI_WRITE_PROTECTED  An attempt was made to create a file, or open a file for write
     426                               when the media is write-protected.
     427  @retval EFI_ACCESS_DENIED    The service denied access to the file.
     428  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file.
     429  @retval EFI_VOLUME_FULL      The volume is full.
     430
     431**/
     432typedef
     433EFI_STATUS
     434(EFIAPI *EFI_FILE_OPEN_EX)(
     435  IN EFI_FILE_PROTOCOL        *This,
     436  OUT EFI_FILE_PROTOCOL       **NewHandle,
     437  IN CHAR16                   *FileName,
     438  IN UINT64                   OpenMode,
     439  IN UINT64                   Attributes,
     440  IN OUT EFI_FILE_IO_TOKEN    *Token
     441  );
     442
     443
     444/**
     445  Reads data from a file.
     446
     447  @param  This       A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to read data from.
     448  @param  Token      A pointer to the token associated with the transaction.
     449
     450  @retval EFI_SUCCESS          If Event is NULL (blocking I/O): The data was read successfully.
     451                               If Event is not NULL (asynchronous I/O): The request was successfully
     452                                                                        queued for processing.
     453  @retval EFI_NO_MEDIA         The device has no medium.
     454  @retval EFI_DEVICE_ERROR     The device reported an error.
     455  @retval EFI_DEVICE_ERROR     An attempt was made to read from a deleted file.
     456  @retval EFI_DEVICE_ERROR     On entry, the current file position is beyond the end of the file.
     457  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
     458  @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources.
     459**/
     460typedef
     461EFI_STATUS
     462(EFIAPI *EFI_FILE_READ_EX) (
     463  IN EFI_FILE_PROTOCOL        *This,
     464  IN OUT EFI_FILE_IO_TOKEN    *Token
     465);
     466
     467
     468/**
     469  Writes data to a file.
     470
     471  @param  This       A pointer to the EFI_FILE_PROTOCOL instance that is the file handle to write data to.
     472  @param  Token      A pointer to the token associated with the transaction.
     473
     474  @retval EFI_SUCCESS          If Event is NULL (blocking I/O): The data was read successfully.
     475                               If Event is not NULL (asynchronous I/O): The request was successfully
     476                                                                        queued for processing.
     477  @retval EFI_UNSUPPORTED      Writes to open directory files are not supported.
     478  @retval EFI_NO_MEDIA         The device has no medium.
     479  @retval EFI_DEVICE_ERROR     The device reported an error.
     480  @retval EFI_DEVICE_ERROR     An attempt was made to write to a deleted file.
     481  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
     482  @retval EFI_WRITE_PROTECTED  The file or medium is write-protected.
     483  @retval EFI_ACCESS_DENIED    The file was opened read only.
     484  @retval EFI_VOLUME_FULL      The volume is full.
     485  @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources.
     486**/
     487typedef
     488EFI_STATUS
     489(EFIAPI *EFI_FILE_WRITE_EX) (
     490  IN EFI_FILE_PROTOCOL        *This,
     491  IN OUT EFI_FILE_IO_TOKEN    *Token
     492);
     493
     494/**
     495  Flushes all modified data associated with a file to a device.
     496
     497  @param  This  A pointer to the EFI_FILE_PROTOCOL instance that is the file
     498                handle to flush.
     499  @param  Token A pointer to the token associated with the transaction.
     500
     501  @retval EFI_SUCCESS          If Event is NULL (blocking I/O): The data was read successfully.
     502                               If Event is not NULL (asynchronous I/O): The request was successfully
     503                                                                        queued for processing.
     504  @retval EFI_NO_MEDIA         The device has no medium.
     505  @retval EFI_DEVICE_ERROR     The device reported an error.
     506  @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.
     507  @retval EFI_WRITE_PROTECTED  The file or medium is write-protected.
     508  @retval EFI_ACCESS_DENIED    The file was opened read-only.
     509  @retval EFI_VOLUME_FULL      The volume is full.
     510  @retval EFI_OUT_OF_RESOURCES Unable to queue the request due to lack of resources.
     511
     512**/
     513typedef
     514EFI_STATUS
     515(EFIAPI *EFI_FILE_FLUSH_EX) (
     516  IN EFI_FILE_PROTOCOL        *This,
     517  IN OUT EFI_FILE_IO_TOKEN    *Token
     518  );
     519
     520#define EFI_FILE_PROTOCOL_REVISION        0x00010000
     521#define EFI_FILE_PROTOCOL_REVISION2       0x00020000
     522#define EFI_FILE_PROTOCOL_LATEST_REVISION EFI_FILE_PROTOCOL_REVISION2
     523
    367524//
    368525// Revision defined in EFI1.1.
     
    380537  ///
    381538  /// The version of the EFI_FILE_PROTOCOL interface. The version specified
    382   /// by this specification is 0x00010000. Future versions are required
    383   /// to be backward compatible to version 1.0.
     539  /// by this specification is EFI_FILE_PROTOCOL_LATEST_REVISION.
     540  /// Future versions are required to be backward compatible to version 1.0.
    384541  ///
    385542  UINT64                Revision;
     
    394551  EFI_FILE_SET_INFO     SetInfo;
    395552  EFI_FILE_FLUSH        Flush;
     553  EFI_FILE_OPEN_EX      OpenEx;
     554  EFI_FILE_READ_EX      ReadEx;
     555  EFI_FILE_WRITE_EX     WriteEx;
     556  EFI_FILE_FLUSH_EX     FlushEx;
    396557};
    397558
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