To fix
authorxgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 5 Apr 2007 09:04:12 +0000 (09:04 +0000)
committerxgu3 <xgu3@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 5 Apr 2007 09:04:12 +0000 (09:04 +0000)
USB Keyboard driver should add F11, F12 support
DxeIpl should not hardcode 36bit address

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2543 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Bus/Usb/UsbKb/Dxe/keyboard.c
EdkModulePkg/Core/DxeIplPeim/Ia32/VirtualMemory.c

index 79eded33c3c0ec0bd685746efb0e2343c7e6daa0..64bbd30d4ba79ca36602a5246040edab29739d79 100644 (file)
@@ -93,8 +93,8 @@ UINT8 KeyConvertionTable[USB_KEYCODE_MAX_MAKE][3] = {
   { SCAN_F8,        0x00,     0x00 },     // 0x41\r
   { SCAN_F9,        0x00,     0x00 },     // 0x42\r
   { SCAN_F10,       0x00,     0x00 },     // 0x43\r
-  { SCAN_NULL,      0x00,     0x00 },     // 0x44   F11\r
-  { SCAN_NULL,      0x00,     0x00 },     // 0x45   F12\r
+  { SCAN_F11,      0x00,     0x00 },     // 0x44   F11\r
+  { SCAN_F12,      0x00,     0x00 },     // 0x45   F12\r
   { SCAN_NULL,      0x00,     0x00 },     // 0x46   PrintScreen\r
   { SCAN_NULL,      0x00,     0x00 },     // 0x47   Scroll Lock\r
   { SCAN_NULL,      0x00,     0x00 },     // 0x48   Pause\r
@@ -289,6 +289,7 @@ InitUSBKeyboard (
   UsbKeyboardDevice->ShiftOn    = 0;\r
   UsbKeyboardDevice->NumLockOn  = 0;\r
   UsbKeyboardDevice->CapsOn     = 0;\r
+  UsbKeyboardDevice->ScrollOn   = 0;  \r
   ZeroMem (UsbKeyboardDevice->LastKeyCodeArray, sizeof (UINT8) * 8);\r
 \r
   //\r
index 609fea2eca629a4ebe0bd26fb64d39e22559b7dd..89b18c36f8cf9e9d09b0fdcfa466501433a778b3 100644 (file)
@@ -57,7 +57,6 @@ Returns:
 \r
 --*/\r
 {  \r
-  UINT32                                        RegEax;\r
   UINT8                                         PhysicalAddressBits;\r
   EFI_PHYSICAL_ADDRESS                          PageAddress;\r
   UINTN                                         IndexOfPml4Entries;\r
@@ -71,16 +70,16 @@ Returns:
   PAGE_TABLE_ENTRY                              *PageDirectoryEntry;\r
   UINTN                                         TotalPagesNum;\r
   UINTN                                         BigPageAddress;\r
+  VOID                                          *Hob;\r
 \r
   //\r
-  // Get physical address bits supported.\r
+  // Get physical address bits supported from CPU HOB.\r
   //\r
-  AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);\r
-  if (RegEax >= 0x80000008) {\r
-    AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);\r
-    PhysicalAddressBits = (UINT8) RegEax;\r
-  } else {\r
-    PhysicalAddressBits = 36;\r
+  PhysicalAddressBits = 36;\r
+  \r
+  Hob = GetFirstHob (EFI_HOB_TYPE_CPU);\r
+  if (Hob != NULL) {\r
+    PhysicalAddressBits = ((EFI_HOB_CPU *) Hob)->SizeOfMemorySpace;    \r
   }\r
 \r
   //\r