mirror of https://github.com/acidanthera/audk.git
1. Fixed one bug in ConPlatform.c, add NULL judgment.
2. Fixed one type in UgaDraw.h. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3976 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
327f4e7d26
commit
c62a593c90
|
@ -41,9 +41,9 @@ EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding = {
|
||||||
/**
|
/**
|
||||||
The user Entry Point for module ConPlatform. The user code starts with this function.
|
The user Entry Point for module ConPlatform. The user code starts with this function.
|
||||||
|
|
||||||
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
@param[in] ImageHandle The firmware allocated handle for the EFI image.
|
||||||
@param[in] SystemTable A pointer to the EFI System Table.
|
@param[in] SystemTable A pointer to the EFI System Table.
|
||||||
|
|
||||||
@retval EFI_SUCCESS The entry point is executed successfully.
|
@retval EFI_SUCCESS The entry point is executed successfully.
|
||||||
@retval other Some error occurs when executing this entry point.
|
@retval other Some error occurs when executing this entry point.
|
||||||
|
|
||||||
|
@ -739,8 +739,7 @@ Returns:
|
||||||
--*/
|
--*/
|
||||||
{
|
{
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath1;
|
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *TempDevicePath2;
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePathInst;
|
||||||
UINTN Size;
|
UINTN Size;
|
||||||
|
|
||||||
|
@ -753,7 +752,7 @@ Returns:
|
||||||
//
|
//
|
||||||
// if performing Delete operation, the NewDevicePath must not be NULL.
|
// if performing Delete operation, the NewDevicePath must not be NULL.
|
||||||
//
|
//
|
||||||
TempDevicePath1 = NULL;
|
TempDevicePath = NULL;
|
||||||
|
|
||||||
DevicePath = Multi;
|
DevicePath = Multi;
|
||||||
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
|
DevicePathInst = GetNextDevicePathInstance (&DevicePath, &Size);
|
||||||
|
@ -769,14 +768,10 @@ Returns:
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Delete) {
|
if (Delete) {
|
||||||
TempDevicePath2 = AppendDevicePathInstance (
|
TempDevicePath = AppendDevicePathInstance (
|
||||||
TempDevicePath1,
|
NULL,
|
||||||
DevicePathInst
|
DevicePathInst
|
||||||
);
|
);
|
||||||
if (TempDevicePath1 != NULL) {
|
|
||||||
FreePool (TempDevicePath1);
|
|
||||||
}
|
|
||||||
TempDevicePath1 = TempDevicePath2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -785,7 +780,7 @@ Returns:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Delete) {
|
if (Delete) {
|
||||||
*NewDevicePath = TempDevicePath1;
|
*NewDevicePath = TempDevicePath;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -878,15 +873,17 @@ Returns:
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gRT->SetVariable (
|
if (NewVariableDevicePath != NULL) {
|
||||||
VariableName,
|
Status = gRT->SetVariable (
|
||||||
&gEfiGlobalVariableGuid,
|
VariableName,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
&gEfiGlobalVariableGuid,
|
||||||
GetDevicePathSize (NewVariableDevicePath),
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
NewVariableDevicePath
|
GetDevicePathSize (NewVariableDevicePath),
|
||||||
);
|
NewVariableDevicePath
|
||||||
|
);
|
||||||
|
|
||||||
FreePool (NewVariableDevicePath);
|
FreePool (NewVariableDevicePath);
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
|
|
||||||
Abstraction of a very simple graphics device.
|
Abstraction of a very simple graphics device.
|
||||||
|
|
||||||
Copyright (c) 2006, Intel Corporation
|
Copyright (c) 2006, Intel Corporation
|
||||||
All rights reserved. This program and the accompanying materials
|
All rights reserved. This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
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
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
http://opensource.org/licenses/bsd-license.php
|
http://opensource.org/licenses/bsd-license.php
|
||||||
|
|
||||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ EFI_STATUS
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Return the current video mode information.
|
Set the current video mode information.
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
@param This Protocol instance pointer.
|
||||||
@param HorizontalResolution Current video horizontal resolution in pixels
|
@param HorizontalResolution Current video horizontal resolution in pixels
|
||||||
|
@ -98,33 +98,33 @@ typedef enum {
|
||||||
|
|
||||||
The following table defines actions for BltOperations:
|
The following table defines actions for BltOperations:
|
||||||
|
|
||||||
<B>EfiUgaVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
|
<B>EfiUgaVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
|
||||||
directly to every pixel of the video display rectangle
|
directly to every pixel of the video display rectangle
|
||||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||||
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
||||||
|
|
||||||
<B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle
|
<B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
||||||
the BltBuffer rectangle (DestinationX, DestinationY )
|
the BltBuffer rectangle (DestinationX, DestinationY )
|
||||||
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
||||||
DestinationY is not zero then Delta must be set to the length in bytes
|
DestinationY is not zero then Delta must be set to the length in bytes
|
||||||
of a row in the BltBuffer.
|
of a row in the BltBuffer.
|
||||||
|
|
||||||
<B>EfiUgaBltBufferToVideo</B> - Write data from the BltBuffer rectangle
|
<B>EfiUgaBltBufferToVideo</B> - Write data from the BltBuffer rectangle
|
||||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
||||||
video display rectangle (DestinationX, DestinationY)
|
video display rectangle (DestinationX, DestinationY)
|
||||||
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
||||||
not zero then Delta must be set to the length in bytes of a row in the
|
not zero then Delta must be set to the length in bytes of a row in the
|
||||||
BltBuffer.
|
BltBuffer.
|
||||||
|
|
||||||
<B>EfiUgaVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
|
<B>EfiUgaVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
|
||||||
(SourceX + Width, SourceY + Height) .to the video display rectangle
|
(SourceX + Width, SourceY + Height) .to the video display rectangle
|
||||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||||
The BltBuffer and Delta are not used in this mode.
|
The BltBuffer and Delta are not used in this mode.
|
||||||
|
|
||||||
|
|
||||||
@param[in] This - Protocol instance pointer.
|
@param[in] This - Protocol instance pointer.
|
||||||
@param[in] BltBuffer - Buffer containing data to blit into video buffer. This
|
@param[in] BltBuffer - Buffer containing data to blit into video buffer. This
|
||||||
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
|
||||||
@param[in] BltOperation - Operation to perform on BlitBuffer and video memory
|
@param[in] BltOperation - Operation to perform on BlitBuffer and video memory
|
||||||
@param[in] SourceX - X coordinate of source for the BltBuffer.
|
@param[in] SourceX - X coordinate of source for the BltBuffer.
|
||||||
|
@ -134,7 +134,7 @@ typedef enum {
|
||||||
@param[in] Width - Width of rectangle in BltBuffer in pixels.
|
@param[in] Width - Width of rectangle in BltBuffer in pixels.
|
||||||
@param[in] Height - Hight of rectangle in BltBuffer in pixels.
|
@param[in] Height - Hight of rectangle in BltBuffer in pixels.
|
||||||
@param[in] Delta - OPTIONAL
|
@param[in] Delta - OPTIONAL
|
||||||
|
|
||||||
@retval EFI_SUCCESS - The Blt operation completed.
|
@retval EFI_SUCCESS - The Blt operation completed.
|
||||||
@retval EFI_INVALID_PARAMETER - BltOperation is not valid.
|
@retval EFI_INVALID_PARAMETER - BltOperation is not valid.
|
||||||
@retval EFI_DEVICE_ERROR - A hardware error occured writting to the video buffer.
|
@retval EFI_DEVICE_ERROR - A hardware error occured writting to the video buffer.
|
||||||
|
|
Loading…
Reference in New Issue