X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FTapeIo.h;h=222f5b5aed7f0e825cb27fcc28599a4dc4952917;hb=cf7958f7f9394c4a545b707b8409fc5b2ffaf84a;hp=94038fa83c077af5fb6a71d2a48203c1760bade3;hpb=842f5579c7e2a313f56c576e4c5150f7f4793079;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/TapeIo.h b/MdePkg/Include/Protocol/TapeIo.h index 94038fa83c..222f5b5aed 100644 --- a/MdePkg/Include/Protocol/TapeIo.h +++ b/MdePkg/Include/Protocol/TapeIo.h @@ -2,14 +2,14 @@ EFI_TAPE_IO_PROTOCOL as defined in the UEFI 2.0. Provide services to control and access a tape device. - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -23,7 +23,7 @@ typedef struct _EFI_TAPE_IO_PROTOCOL EFI_TAPE_IO_PROTOCOL; -typedef struct { +typedef struct _EFI_TAPE_HEADER { UINT64 Signature; UINT32 Revision; UINT32 BootDescSize; @@ -41,14 +41,14 @@ typedef struct { CHAR8 SystemName[256]; // UTF-8 CHAR8 TapeTitle[120]; // UTF-8 CHAR8 pad[468]; // pad to 1024 -} TAPE_HEADER; +} EFI_TAPE_HEADER; /** Reads from the tape. @param This A pointer to the EFI_TAPE_IO_PROTOCOL instance. - @param BufferSize Size of the buffer in bytes pointed to by Buffer. - @param Buffer Pointer to the buffer for data to be read into. + @param BufferSize The size of the buffer in bytes pointed to by Buffer. + @param Buffer The pointer to the buffer for data to be read into. @retval EFI_SUCCESS Data was successfully transferred from the media. @retval EFI_END_OF_FILE A filemark was encountered which limited the data @@ -63,7 +63,7 @@ typedef struct { The transfer was aborted since the current position of the media may be incorrect. @retval EFI_INVALID_PARAMETER A NULL Buffer was specified with a non-zero - BufferSize or the device is operating in fixed block + BufferSize, or the device is operating in fixed block size mode and the BufferSize was not a multiple of device's fixed block size @retval EFI_DEVICE_ERROR A device error occurred while attempting to transfer data @@ -72,19 +72,18 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_TAPE_READ) ( +(EFIAPI *EFI_TAPE_READ)( IN EFI_TAPE_IO_PROTOCOL *This, IN OUT UINTN *BufferSize, OUT VOID *Buffer - ) -; + ); /** Writes to the tape. @param This A pointer to the EFI_TAPE_IO_PROTOCOL instance. @param BufferSize Size of the buffer in bytes pointed to by Buffer. - @param Buffer Pointer to the buffer for data to be written from. + @param Buffer The pointer to the buffer for data to be written from. @retval EFI_SUCCESS Data was successfully transferred to the media. @retval EFI_END_OF_MEDIA The logical end of media has been reached. Data may have @@ -100,7 +99,7 @@ EFI_STATUS @retval EFI_WRITE_PROTECTED The media in the device is write-protected. The transfer was aborted since a write cannot be completed. @retval EFI_INVALID_PARAMETER A NULL Buffer was specified with a non-zero - BufferSize or the device is operating in fixed block + BufferSize, or the device is operating in fixed block size mode and the BufferSize was not a multiple of device's fixed block size @retval EFI_DEVICE_ERROR A device error occurred while attempting to transfer data @@ -109,12 +108,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TAPE_WRITE) ( +(EFIAPI *EFI_TAPE_WRITE)( IN EFI_TAPE_IO_PROTOCOL *This, IN UINTN *BufferSize, IN VOID *Buffer - ) -; + ); /** @@ -133,10 +131,9 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TAPE_REWIND) ( +(EFIAPI *EFI_TAPE_REWIND)( IN EFI_TAPE_IO_PROTOCOL *This - ) -; + ); /** @@ -145,6 +142,9 @@ EFI_STATUS @param This A pointer to the EFI_TAPE_IO_PROTOCOL instance. @param Direction Direction and number of data blocks or filemarks to space over on media. @param Type Type of mark to space over on media. + The following Type marks are mandatory: + BLOCK type : 0 + FILEMARK type : 1 @retval EFI_SUCCESS The media was successfully repositioned. @retval EFI_END_OF_MEDIA Beginning or end of media was reached before the @@ -162,12 +162,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TAPE_SPACE) ( +(EFIAPI *EFI_TAPE_SPACE)( IN EFI_TAPE_IO_PROTOCOL *This, - INTN Direction, - UINTN Type - ) -; + IN INTN Direction, + IN UINTN Type + ); /** @@ -190,11 +189,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TAPE_WRITEFM) ( +(EFIAPI *EFI_TAPE_WRITEFM)( IN EFI_TAPE_IO_PROTOCOL *This, IN UINTN Count - ) -; + ); /** @@ -214,12 +212,17 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TAPE_RESET) ( +(EFIAPI *EFI_TAPE_RESET)( IN EFI_TAPE_IO_PROTOCOL *This, IN BOOLEAN ExtendedVerification - ) -; - + ); + +/// +/// The EFI_TAPE_IO_PROTOCOL provides basic sequential operations for tape devices. +/// These include read, write, rewind, space, write filemarks and reset functions. +/// Per this specification, a boot application uses the services of this protocol +/// to load the bootloader image from tape. +/// struct _EFI_TAPE_IO_PROTOCOL { EFI_TAPE_READ TapeRead; EFI_TAPE_WRITE TapeWrite;