MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / DumpMemoryVgaOut

Function DumpMemoryVgaOut

CloverEFI/CpuDxe/Cpu.c:562–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560#endif
561
562STATIC
563CHAR16*
564DumpMemoryVgaOut (
565 IN CHAR16* VideoBuffer,
566 IN UINTN ColumnMax,
567 IN UINTN MemoryAddress,
568 IN UINTN Count
569 )
570{
571 UINT32 Space = 8U;
572 UINT32 InLine = 4U;
573 CHAR16* Line = VideoBuffer;
574 UINT8 CONST* Data = (UINT8 CONST*) MemoryAddress;
575
576 while (Count) {
577 UnicodeSPrintAsciiFormat (
578 VideoBuffer,
579 3U * sizeof (CHAR16),
580 "%02x",
581 (UINTN) *Data
582 );
583 VideoBuffer += 2;
584 --Space;
585 if (!Space) {
586 *(CHAR8*) VideoBuffer = ' ';
587 ++VideoBuffer;
588 Space = 8U;
589 --InLine;
590 if (!InLine) {
591 Line += ColumnMax;
592 VideoBuffer = Line;
593 InLine = 4U;
594 }
595 }
596 ++Data;
597 --Count;
598 }
599 if (VideoBuffer != Line) {
600 Line += ColumnMax;
601 VideoBuffer = Line;
602 }
603 return VideoBuffer;
604}
605
606VOID
607DumpExceptionDataVgaOut (

Callers 1

DumpExceptionDataVgaOutFunction · 0.85

Calls 1

UnicodeSPrintAsciiFormatFunction · 0.50

Tested by

no test coverage detected