//\r
// This is the first Graphics Output device added\r
//\r
- CopyMem (CurrentGraphicsOutputMode, GraphicsOutput->Mode, sizeof (EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE));\r
+ CurrentGraphicsOutputMode->MaxMode = GraphicsOutput->Mode->MaxMode;\r
+ CurrentGraphicsOutputMode->Mode = GraphicsOutput->Mode->Mode;\r
CopyMem (CurrentGraphicsOutputMode->Info, GraphicsOutput->Mode->Info, GraphicsOutput->Mode->SizeOfInfo);\r
-\r
+ CurrentGraphicsOutputMode->SizeOfInfo = GraphicsOutput->Mode->SizeOfInfo;\r
+ CurrentGraphicsOutputMode->FrameBufferBase = GraphicsOutput->Mode->FrameBufferBase;\r
+ CurrentGraphicsOutputMode->FrameBufferSize = GraphicsOutput->Mode->FrameBufferSize;\r
+ \r
//\r
// Allocate resource for the private mode buffer\r
//\r
UINTN MaxMode;\r
EFI_STATUS Status;\r
CONSOLE_OUT_MODE ModeInfo;\r
- UINTN ModeInfoSize;\r
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;\r
\r
PreferMode = 0xFF;\r
TextOut = &Private->TextOut;\r
MaxMode = (UINTN) (TextOut->Mode->MaxMode);\r
\r
- ModeInfoSize = sizeof (CONSOLE_OUT_MODE);\r
- Status = gRT->GetVariable (\r
- VARCONOUTMODE,\r
- &gEfiGenericPlatformVariableGuid,\r
- NULL,\r
- &ModeInfoSize,\r
- &ModeInfo\r
- );\r
-\r
- if (EFI_ERROR(Status)) {\r
- //\r
- // If fail to get variable, set variable to the default mode 80 x 25\r
- // required by UEFI spec;\r
- //\r
- ModeInfo.Column = 80;\r
- ModeInfo.Row = 25;\r
-\r
- gRT->SetVariable (\r
- VARCONOUTMODE,\r
- &gEfiGenericPlatformVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- sizeof (CONSOLE_OUT_MODE),\r
- &ModeInfo\r
- );\r
- }\r
+ ModeInfo.Column = PcdGet32 (PcdConOutColumn);\r
+ ModeInfo.Row = PcdGet32 (PcdConOutRow);\r
\r
//\r
// To find the prefer mode and basic mode from Text Out mode list\r
}\r
\r
//\r
- // Set perfer mode to Text Out devices.\r
+ // Set prefer mode to Text Out devices.\r
//\r
Status = TextOut->SetMode (TextOut, PreferMode);\r
if (EFI_ERROR(Status)) {\r
//\r
Status = TextOut->SetMode (TextOut, BaseMode);\r
ASSERT(!EFI_ERROR(Status));\r
-\r
- ModeInfo.Column = 80;\r
- ModeInfo.Row = 25;\r
-\r
- //\r
- // Update ConOutMode variable\r
- //\r
- gRT->SetVariable (\r
- VARCONOUTMODE,\r
- &gEfiGenericPlatformVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- sizeof (CONSOLE_OUT_MODE),\r
- &ModeInfo\r
- );\r
+ \r
+ PcdSet32 (PcdConOutColumn, 80);\r
+ PcdSet32 (PcdConOutRow, 25);\r
}\r
\r
return ;\r
\r
\r
/**\r
- This timer event will fire when StdIn is locked. It will check the key\r
- sequence on StdIn to see if it matches the password. Any error in the\r
- password will cause the check to reset. As long a mConIn.PasswordEnabled is\r
- TRUE the StdIn splitter will not report any input.\r
+ Record and check key sequence on StdIn.\r
+\r
+ This timer event will fire when StdIn is locked. It will record the key sequence\r
+ on StdIn and also check to see if it matches the password. Any error in the\r
+ password will cause the check to reset. As long as a mConIn.PasswordEnabled is\r
+ TRUE, the StdIn splitter will not report any input.\r
\r
@param Event The Event this notify function registered to.\r
@param Context Pointer to the context data registerd to the\r
Status = ConSplitterTextInPrivateReadKeyStroke (&mConIn, &Key);\r
if (!EFI_ERROR (Status)) {\r
//\r
- // if it's an ENTER, match password\r
+ // If key read successfully\r
//\r
if ((Key.UnicodeChar == CHAR_CARRIAGE_RETURN) && (Key.ScanCode == SCAN_NULL)) {\r
+ //\r
+ // If it's an ENTER, match password\r
+ //\r
mConIn.PwdAttempt[mConIn.PwdIndex] = CHAR_NULL;\r
if (StrCmp (mConIn.Password, mConIn.PwdAttempt) != 0) {\r
//\r
}\r
} else if ((Key.ScanCode == SCAN_NULL) && (Key.UnicodeChar >= 32)) {\r
//\r
- // If it's not an ENTER, neigher a function key, nor a CTRL-X or ALT-X, record the input\r
+ // If it's not an ENTER, neigher a function key, nor a CTRL-X or ALT-X, record the input,\r
+ // value 32 stands for a Blank Space key.\r
//\r
if (mConIn.PwdIndex < (MAX_STD_IN_PASSWORD - 1)) {\r
if (mConIn.PwdIndex == 0) {\r
mConIn.PasswordEnabled = TRUE;\r
mConIn.PwdIndex = 0;\r
//\r
- // Timer Periodic is 25ms.\r
+ // Lock Timer Periodic is 25ms.\r
//\r
gBS->SetTimer (mConIn.LockEvent, TimerPeriodic, 10000 * 25);\r
\r
\r
\r
/**\r
- This event agregates all the events of the ConIn devices in the spliter.\r
+ This event aggregates all the events of the ConIn devices in the spliter.\r
+\r
If the ConIn is password locked then return.\r
If any events of physical ConIn devices are signaled, signal the ConIn\r
spliter event. This will cause the calling code to call\r
UINTN Index;\r
\r
Private = (TEXT_IN_SPLITTER_PRIVATE_DATA *) Context;\r
+\r
if (Private->PasswordEnabled) {\r
//\r
// If StdIn Locked return not ready\r
return ;\r
}\r
\r
- //\r
- // if KeyEventSignalState is flagged before, and not cleared by Reset() or ReadKeyStroke()\r
- //\r
if (Private->KeyEventSignalState) {\r
+ //\r
+ // If KeyEventSignalState is flagged before, and not cleared by Reset() or ReadKeyStroke()\r
+ //\r
gBS->SignalEvent (Event);\r
return ;\r
}\r
+\r
//\r
- // if any physical console input device has key input, signal the event.\r
+ // If any physical console input device has key input, signal the event.\r
//\r
for (Index = 0; Index < Private->CurrentNumberOfConsoles; Index++) {\r
Status = gBS->CheckEvent (Private->TextInList[Index]->WaitForKey);\r
successfully.\r
@retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data\r
structures.\r
- @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.\r
+ @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.\r
\r
**/\r
EFI_STATUS\r
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);\r
\r
//\r
- // if no physical console input device exists,\r
+ // If no physical console input device exists,\r
// return EFI_SUCCESS directly.\r
//\r
if (Private->CurrentNumberOfExConsoles <= 0) {\r