MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / move_data

Function move_data

rEFIt_UEFI/Platform/FixBiosDsdt.cpp:1093–1108  ·  view source on GitHub ↗

start => move data start address offset => data move how many byte len => initial length of the buffer return final length of the buffer we suppose that buffer allocation is more then len+offset

Source from the content-addressed store, hash-verified

1091// return final length of the buffer
1092// we suppose that buffer allocation is more then len+offset
1093UINT32 move_data(UINT32 start, UINT8* buffer, UINT32 len, INT32 offset)
1094{
1095 UINT32 i;
1096
1097 if (offset<0) {
1098 for (i=start; i<len+offset; i++) {
1099 buffer[i] = buffer[i-offset];
1100 }
1101 }
1102 else if (offset>0 && len >=1) { // data move to back
1103 for (i=len-1; i>=start; i--) {
1104 buffer[i+offset] = buffer[i];
1105 }
1106 }
1107 return len + offset;
1108}
1109
1110UINT32 get_size(UINT8* Buffer, UINT32 adr)
1111{

Callers 15

write_sizeFunction · 0.85
DeleteDeviceFunction · 0.85
FixADP1Function · 0.85
FixAnyFunction · 0.85
FIXDarwinFunction · 0.85
AddPNLFFunction · 0.85
FixRTCFunction · 0.85
FixTMRFunction · 0.85
FixPICFunction · 0.85
FixHPETFunction · 0.85
FIXLPCBFunction · 0.85
FIXDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected