]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1.Fix a typo in DevicePath Driver
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Jan 2007 03:09:40 +0000 (03:09 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Jan 2007 03:09:40 +0000 (03:09 +0000)
2.Fix a bug in EBC, the periodic callback timer should be 1s
3.Add a dependency file for DriverSample in UI since it consume EFI_SIMPLE_TEXT_OUT protocol.
4.Fix a memory allocation defects in DriverSample.

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

EdkModulePkg/Universal/DevicePath/Dxe/DevicePathFromText.c
EdkModulePkg/Universal/Ebc/Dxe/EbcInt.h
EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.c
EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.dxs [new file with mode: 0644]
EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.msa

index d9dcd44352d534404b8b6f8e7ff8c1928574acbe..aff628b54affd17f0953a9429c87d995573a997c 100644 (file)
@@ -510,7 +510,7 @@ TrimHexStr (
     Str += 1;\r
   }\r
   //\r
-  // skip preceeding white space\r
+  // skip preceeding character 'x' or 'X'\r
   //\r
   if (*Str && (*Str == 'x' || *Str == 'X')) {\r
     Str += 1;\r
index 11b72f64aa66e0a181fe5155ba1302acaaf53be7..5ccf8e11c73349035ea647ac6355c27d4f9373df 100644 (file)
@@ -104,7 +104,8 @@ EbcDebugSignalException (
 // Define a constant of how often to call the debugger periodic callback\r
 // function.\r
 //\r
-#define EBC_VM_PERIODIC_CALLBACK_RATE 1000\r
+#define EFI_TIMER_UNIT_1MS            (1000 * 10)\r
+#define EBC_VM_PERIODIC_CALLBACK_RATE (1000 * EFI_TIMER_UNIT_1MS)\r
 \r
 EFI_STATUS\r
 EbcDebugSignalPeriodic (\r
index c383d1660ae639eb72ba00185f6f30a4bdc6219e..dd316114bf703f7af2fb61d9bd9db56ce96f7382 100644 (file)
@@ -242,7 +242,7 @@ Returns:
     //\r
     // Allocate space for creation of Buffer\r
     //\r
-    QuestionId = (UINT16) ((UINTN) (&NVStruc.DynamicCheck));\r
+    QuestionId = (UINT16) ((UINTN) (&NVStruc.DynamicCheck) - (UINTN) (&NVStruc));\r
     Status = gBS->AllocatePool (\r
                     EfiBootServicesData,\r
                     0x1000,\r
diff --git a/EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.dxs b/EdkModulePkg/Universal/UserInterface/DriverSample/DriverSample.dxs
new file mode 100644 (file)
index 0000000..ae2a1c0
--- /dev/null
@@ -0,0 +1,26 @@
+/*++\r
+\r
+Copyright (c) 2007, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  DriverSample.dxs\r
+\r
+Abstract:\r
+\r
+  Dependency expression source file.\r
+  \r
+--*/\r
+\r
+#include <DxeDepex.h>\r
+\r
+DEPENDENCY_START\r
+  EFI_SIMPLE_TEXT_OUT_PROTOCOL_GUID\r
+DEPENDENCY_END\r
index 3aba03f8e5326560fcdfb153cd666b4df7e046cb..cf44d1a8ab1ca05d00d19b936f2a7aaa7b896c80 100644 (file)
@@ -67,6 +67,7 @@
     <Filename>DriverSample.c</Filename>\r
     <Filename>NVDataStruc.h</Filename>\r
     <Filename>DriverSample.h</Filename>\r
+    <Filename>DriverSample.dxs</Filename>\r
   </SourceFiles>\r
   <PackageDependencies>\r
     <Package PackageGuid="5e0e9358-46b6-4ae2-8218-4ab8b9bbdcec"/>\r