}\r
\r
//\r
- // Compute the total size of the record\r
+ // Compute the total size of the record.\r
+ // Note that the passing-in format string and variable parameters will be constructed to \r
+ // the following layout:\r
//\r
- TotalSize = sizeof (EFI_DEBUG_INFO) + 12 * sizeof (UINT64) + AsciiStrSize (Format);\r
+ // Buffer->|------------------------|\r
+ // | Pading | 4 bytes\r
+ // DebugInfo->|------------------------|\r
+ // | EFI_DEBUG_INFO | sizeof(EFI_DEBUG_INFO)\r
+ // BaseListMarker->|------------------------|\r
+ // | ... |\r
+ // | variable arguments | 12 * sizeof (UINT64)\r
+ // | ... |\r
+ // |------------------------|\r
+ // | Format String |\r
+ // |------------------------|<- (UINT8 *)Buffer + sizeof(Buffer)\r
+ //\r
+ TotalSize = 4 + sizeof (EFI_DEBUG_INFO) + 12 * sizeof (UINT64) + AsciiStrSize (Format);\r
\r
//\r
// If the TotalSize is larger than the maximum record size, then return\r