@@ -275,7 +275,7 @@ OnLoadedImageNotification (
275275 CHAR8 * PdbPointer ;
276276 CHAR8 Name [64 ];
277277 CHAR8 * NameEnd ;
278- UINTN i ;
278+ UINTN Index ;
279279
280280 BufferSize = sizeof (EFI_HANDLE );
281281
@@ -314,9 +314,9 @@ OnLoadedImageNotification (
314314 }
315315
316316 // Strip of the directories.
317- for (i = AsciiStrLen (PdbPointer ); i > 0 ; i -- ) {
318- if ((PdbPointer [i - 1 ] == '\\' ) || (PdbPointer [i - 1 ] == '/' )) {
319- PdbPointer = & PdbPointer [i ];
317+ for (Index = AsciiStrLen (PdbPointer ); Index > 0 ; Index -- ) {
318+ if ((PdbPointer [Index - 1 ] == '\\' ) || (PdbPointer [Index - 1 ] == '/' )) {
319+ PdbPointer = & PdbPointer [Index ];
320320 break ;
321321 }
322322 }
@@ -347,18 +347,18 @@ VOID
347347DebugAgentExceptionDestroy (
348348 )
349349{
350- UINT8 i ;
350+ UINT8 Index ;
351351
352352 if (gCpu != NULL ) {
353- for (i = 0 ; ArchExceptionTypes [ i ] != MAX_UINT32 ; i += 1 ) {
353+ for (Index = 0 ; mArchExceptionTypes [ Index ] != MAX_UINT32 ; Index += 1 ) {
354354 if (gCpu != NULL ) {
355355 gCpu -> RegisterInterruptHandler (
356356 gCpu ,
357- ArchExceptionTypes [ i ],
357+ mArchExceptionTypes [ Index ],
358358 NULL
359359 );
360360 } else {
361- RegisterCpuInterruptHandler (ArchExceptionTypes [ i ], NULL );
361+ RegisterCpuInterruptHandler (mArchExceptionTypes [ Index ], NULL );
362362 }
363363 }
364364 }
@@ -375,21 +375,21 @@ EFI_STATUS
375375DebugAgentExceptionInitialize (
376376 )
377377{
378- UINT8 i ;
378+ UINT8 Index ;
379379 EFI_STATUS Status ;
380380
381381 // First uninstall any handler that needs to be replaced.
382382 DebugAgentExceptionDestroy ();
383383
384- for (i = 0 ; ArchExceptionTypes [ i ] != MAX_UINT32 ; i += 1 ) {
384+ for (Index = 0 ; mArchExceptionTypes [ Index ] != MAX_UINT32 ; Index += 1 ) {
385385 if (gCpu != NULL ) {
386386 Status = gCpu -> RegisterInterruptHandler (
387387 gCpu ,
388- ArchExceptionTypes [ i ],
388+ mArchExceptionTypes [ Index ],
389389 DebuggerExceptionHandler
390390 );
391391 } else {
392- Status = RegisterCpuInterruptHandler (ArchExceptionTypes [ i ], DebuggerExceptionHandler );
392+ Status = RegisterCpuInterruptHandler (mArchExceptionTypes [ Index ], DebuggerExceptionHandler );
393393 }
394394
395395 if (EFI_ERROR (Status )) {
@@ -428,10 +428,10 @@ DebugReboot (
428428**/
429429BOOLEAN
430430AccessMemory (
431- UINTN Address ,
432- UINT8 * Data ,
433- UINTN Length ,
434- BOOLEAN Write
431+ IN UINTN Address ,
432+ IN OUT UINT8 * Data ,
433+ IN UINTN Length ,
434+ IN BOOLEAN Write
435435 )
436436{
437437 UINTN LengthInPage ;
@@ -517,17 +517,17 @@ AccessMemory (
517517 Read system memory.
518518
519519 @param[in] Address The virtual address of the memory access.
520- @param[in, out] Data The buffer to read memory into.
520+ @param[out] Data The buffer to read memory into.
521521 @param[in] Length The length of the memory range.
522522
523523 @retval TRUE Memory access was complete successfully.
524524 @retval FALSE Memory access failed, either completely or partially.
525525**/
526526BOOLEAN
527527DbgReadMemory (
528- UINTN Address ,
529- VOID * Data ,
530- UINTN Length
528+ IN UINTN Address ,
529+ OUT VOID * Data ,
530+ IN UINTN Length
531531 )
532532{
533533 return AccessMemory (Address , Data , Length , FALSE);
@@ -537,17 +537,17 @@ DbgReadMemory (
537537 Write to system memory.
538538
539539 @param[in] Address The virtual address of the memory access.
540- @param[in,out] Data The buffer of data to write.
540+ @param[in] Data The buffer of data to write.
541541 @param[in] Length The length of the memory range.
542542
543543 @retval TRUE Memory access was complete successfully.
544544 @retval FALSE Memory access failed, either completely or partially.
545545**/
546546BOOLEAN
547547DbgWriteMemory (
548- UINTN Address ,
549- VOID * Data ,
550- UINTN Length
548+ IN UINTN Address ,
549+ IN VOID * Data ,
550+ IN UINTN Length
551551 )
552552{
553553 return AccessMemory (Address , Data , Length , TRUE);
0 commit comments