Lines Matching refs:buffer
455 IOReturn IODTNVRAM::readXPRAM(IOByteCount offset, UInt8 *buffer,
460 if ((buffer == 0) || (length == 0) ||
464 bcopy(_nvramImage + _xpramPartitionOffset + offset, buffer, length);
469 IOReturn IODTNVRAM::writeXPRAM(IOByteCount offset, UInt8 *buffer,
474 if ((buffer == 0) || (length == 0) ||
478 bcopy(buffer, _nvramImage + _xpramPartitionOffset + offset, length);
519 IOByteCount offset, UInt8 *buffer,
536 if ((buffer == 0) || (length == 0) ||
540 bcopy(_nvramImage + partitionOffset + offset, buffer, length);
546 IOByteCount offset, UInt8 *buffer,
563 if ((buffer == 0) || (length == 0) ||
567 bcopy(buffer, _nvramImage + partitionOffset + offset, length);
574 IOByteCount IODTNVRAM::savePanicInfo(UInt8 *buffer, IOByteCount length)
582 bcopy(buffer, _piImage + 4, length);
766 UInt8 *buffer, *tmpBuffer;
781 buffer = tmpBuffer = IONew(UInt8, _ofPartitionSize);
782 if (buffer == 0) return kIOReturnNoMemory;
783 bzero(buffer, _ofPartitionSize);
810 bcopy(buffer, _ofImage, _ofPartitionSize);
813 IODelete(buffer, UInt8, _ofPartitionSize);
817 buffer = IONew(UInt8, _ofPartitionSize);
818 if (buffer == 0) return kIOReturnNoMemory;
819 bzero(buffer, _ofPartitionSize);
821 owHeader = (OWVariablesHeader *)buffer;
863 bcopy(tmpData, buffer + curOffset, tmpDataLength);
874 owHeader->owChecksum = ~generateOWChecksum(buffer);
876 bcopy(buffer, _ofImage, _ofPartitionSize);
879 IODelete(buffer, UInt8, _ofPartitionSize);
1077 bool IODTNVRAM::convertObjectToProp(UInt8 *buffer, UInt32 *length,
1124 buffer += snprintf((char *)buffer, *length, "%s=", propName);
1129 strlcpy((char *)buffer, "true", *length - propNameLength);
1131 strlcpy((char *)buffer, "false", *length - propNameLength);
1138 strlcpy((char *)buffer, "-1", *length - propNameLength);
1140 snprintf((char *)buffer, *length - propNameLength, "%d", (uint32_t)tmpValue);
1142 snprintf((char *)buffer, *length - propNameLength, "0x%x", (uint32_t)tmpValue);
1147 strlcpy((char *)buffer, tmpString->getCStringNoCopy(), *length - propNameLength);
1151 bcopy(tmpData->getBytesNoCopy(), buffer, propDataLength);
1156 propDataLength = strlen((const char *)buffer);
1164 UInt16 IODTNVRAM::generateOWChecksum(UInt8 *buffer)
1167 UInt16 *tmpBuffer = (UInt16 *)buffer;
1175 bool IODTNVRAM::validateOWChecksum(UInt8 *buffer)
1178 UInt16 *tmpBuffer = (UInt16 *)buffer;