intelmp.cc (8852:c744483edfcf) | intelmp.cc (10292:933dfb9d8279) |
---|---|
1/* 2 * Copyright (c) 2008 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 78 unchanged lines hidden (view full) --- 87writeOutString(PortProxy& proxy, Addr addr, string str, int length) 88{ 89 char cleanedString[length + 1]; 90 cleanedString[length] = 0; 91 92 if (str.length() > length) { 93 memcpy(cleanedString, str.c_str(), length); 94 warn("Intel MP configuration table string \"%s\" " | 1/* 2 * Copyright (c) 2008 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 78 unchanged lines hidden (view full) --- 87writeOutString(PortProxy& proxy, Addr addr, string str, int length) 88{ 89 char cleanedString[length + 1]; 90 cleanedString[length] = 0; 91 92 if (str.length() > length) { 93 memcpy(cleanedString, str.c_str(), length); 94 warn("Intel MP configuration table string \"%s\" " |
95 "will be truncated to \"%s\".\n", str, cleanedString); | 95 "will be truncated to \"%s\".\n", str, (char *)&cleanedString); |
96 } else { 97 memcpy(cleanedString, str.c_str(), str.length()); 98 memset(cleanedString + str.length(), 0, length - str.length()); 99 } 100 proxy.writeBlob(addr, (uint8_t *)(&cleanedString), length); 101 102 uint8_t checkSum = 0; 103 for (int i = 0; i < length; i++) --- 355 unchanged lines hidden --- | 96 } else { 97 memcpy(cleanedString, str.c_str(), str.length()); 98 memset(cleanedString + str.length(), 0, length - str.length()); 99 } 100 proxy.writeBlob(addr, (uint8_t *)(&cleanedString), length); 101 102 uint8_t checkSum = 0; 103 for (int i = 0; i < length; i++) --- 355 unchanged lines hidden --- |