SWDEV-354050 - Runtime support for HIP non hostcall printf
Relates to https://reviews.llvm.org/D150427, Each printf call populates buffer with following data 1. Control DWord - contains info regarding stream, format string constness and size of data frame (see http://gerrit-git.amd.com/c/lightning/ec/device-libs/+/857722 for more info) 2. Hash of the format string (if constant) else the format string itself 3. Printf arguments (each aligned to 8 byte boundary) Change-Id: I7e320deb343921b4b4cfaf08a2be2883e0bc1f65
This commit is contained in:
1 parent
2cda949920
commit
7b6a8f1702
5 files changed
+223
-11
No files matched your search
@@ -133,7 +133,9 @@ void MessageHandler::discardMessage(Message* message) {
|
||||
}
|
||||
|
||||
// Defined in devhcprintf.cpp
|
||||
namespace amd {
|
||||
void handlePrintf(uint64_t* output, const uint64_t* input, uint64_t len);
|
||||
} // namespace amd
|
||||
|
||||
bool MessageHandler::handlePayload(uint32_t service, uint64_t* payload) {
|
||||
Message* message = nullptr;
|
||||
@@ -166,7 +168,7 @@ bool MessageHandler::handlePayload(uint32_t service, uint64_t* payload) {
|
||||
|
||||
switch (service) {
|
||||
case SERVICE_PRINTF:
|
||||
handlePrintf(payload, message->data_.data(), message->data_.size());
|
||||
amd::handlePrintf(payload, message->data_.data(), message->data_.size());
|
||||
break;
|
||||
default:
|
||||
ClPrint(amd::LOG_ERROR, amd::LOG_ALWAYS, "Hostcall: Messages not supported for service %d",
|
||||
|
||||
Reference in new issue
Block a user