]>
git.proxmox.com Git - mirror_edk2.git/blob - DuetPkg/DxeIpl/Debug.c
3 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 #include <Library/SerialPortLib.h>
23 #include "SerialStatusCode.h"
27 UINT8 mHeaderIndex
= 10;
35 *(UINT8
*)(UINTN
)(0x000b8000 + mHeaderIndex
) = Char
;
46 mCursor
= (UINT8
*)(UINTN
)(0x000b8000 + 160);
47 for (Index
= 0; Index
< 80 * 49; Index
++) {
51 mCursor
= (UINT8
*)(UINTN
)(0x000b8000 + 160);
57 IN CONST CHAR8
*FormatString
,
62 CHAR8 PrintBuffer
[1000];
65 VA_START (Marker
, FormatString
);
66 AsciiVSPrint (PrintBuffer
, sizeof (PrintBuffer
), FormatString
, Marker
);
69 for (Index
= 0; PrintBuffer
[Index
] != 0; Index
++) {
70 if (PrintBuffer
[Index
] == '\n') {
71 mCursor
= (UINT8
*) (UINTN
) (0xb8000 + (((((UINTN
)mCursor
- 0xb8000) + 160) / 160) * 160));
73 *mCursor
= (UINT8
) PrintBuffer
[Index
];
79 // All information also output to serial port.
81 SerialPortWrite ((UINT8
*) PrintBuffer
, Index
);