@@ -80,7 +80,7 @@ struct BitFieldManager
80
80
{
81
81
const BlockDeviceInfo* deviceInfo = m_blockDevice->GetDeviceInfo ();
82
82
83
- data = (BYTE*)private_malloc ( m_region->BytesPerBlock );
83
+ data = (BYTE*)malloc ( m_region->BytesPerBlock );
84
84
85
85
if (data != NULL )
86
86
{
@@ -99,7 +99,7 @@ struct BitFieldManager
99
99
ConfigurationSector *pCfg = (ConfigurationSector*)data;
100
100
memset ( (void *)&pCfg->SignatureCheck [ 0 ], 0xFF , sizeof (pCfg->SignatureCheck ) );
101
101
m_blockDevice->Write ( m_cfgPhysicalAddress, m_region->BytesPerBlock ,data, FALSE );
102
- private_free (data);
102
+ free (data);
103
103
}
104
104
else
105
105
{
@@ -150,7 +150,7 @@ struct BitFieldManager
150
150
else
151
151
{
152
152
UINT32 length = m_region->BytesPerBlock ;
153
- BYTE* dataptr = (BYTE*)private_malloc (length);
153
+ BYTE* dataptr = (BYTE*)malloc (length);
154
154
155
155
if (dataptr != NULL )
156
156
{
@@ -174,7 +174,7 @@ struct BitFieldManager
174
174
175
175
// write back to sector, as we only change one bit from 0 to 1, no need to erase sector
176
176
m_blockDevice->Write ( m_cfgPhysicalAddress, length, dataptr, FALSE );
177
- private_free (dataptr);
177
+ free (dataptr);
178
178
}
179
179
180
180
}
@@ -227,7 +227,7 @@ struct BitFieldManager
227
227
UINT32 length = sizeof (ConfigurationSector);
228
228
229
229
memset ( &m_skipCfgSectorCheck, 0xff , sizeof (m_skipCfgSectorCheck) );
230
- data = (BYTE*)private_malloc (length);
230
+ data = (BYTE*)malloc (length);
231
231
stream.Device ->Read ( m_cfgPhysicalAddress, length, (BYTE *)data );
232
232
configSector = (ConfigurationSector*)data;
233
233
m_signatureCheck = NULL ;
@@ -253,7 +253,7 @@ struct BitFieldManager
253
253
m_signatureCheck = &m_skipCfgSectorCheck;
254
254
}
255
255
256
- private_free (data);
256
+ free (data);
257
257
258
258
}
259
259
else // XIP device
@@ -476,7 +476,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
476
476
{
477
477
if (mode == AccessMemory_Check)
478
478
{
479
- bufPtr = (BYTE*) private_malloc (NumOfBytes);
479
+ bufPtr = (BYTE*) malloc (NumOfBytes);
480
480
if (!bufPtr) return false ;
481
481
}
482
482
@@ -486,7 +486,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
486
486
{
487
487
if (mode == AccessMemory_Check)
488
488
{
489
- private_free (bufPtr);
489
+ free (bufPtr);
490
490
}
491
491
492
492
break ;
@@ -495,7 +495,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
495
495
if (mode == AccessMemory_Check)
496
496
{
497
497
*(UINT32*)buf = SUPPORT_ComputeCRC ( bufPtr, NumOfBytes, *(UINT32*)buf );
498
- private_free (bufPtr);
498
+ free (bufPtr);
499
499
}
500
500
}
501
501
break ;
@@ -525,18 +525,18 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
525
525
{
526
526
if (g_ConfigBuffer != NULL )
527
527
{
528
- private_free (g_ConfigBuffer);
528
+ free (g_ConfigBuffer);
529
529
}
530
530
g_ConfigBufferLength = 0 ;
531
531
532
- // g_ConfigBuffer = (UINT8*)private_malloc (pRegion->BytesPerBlock);
532
+ // g_ConfigBuffer = (UINT8*)malloc (pRegion->BytesPerBlock);
533
533
// Just allocate the configuration Sector size, configuration block can be large and not necessary to have that buffer.
534
- g_ConfigBuffer = (UINT8*)private_malloc (g_ConfigBufferTotalSize);
534
+ g_ConfigBuffer = (UINT8*)malloc (g_ConfigBufferTotalSize);
535
535
536
536
}
537
537
else if (g_ConfigBufferTotalSize < ( g_ConfigBufferLength + lengthInBytes))
538
538
{
539
- UINT8* tmp = (UINT8*)private_malloc (g_ConfigBufferLength + lengthInBytes);
539
+ UINT8* tmp = (UINT8*)malloc (g_ConfigBufferLength + lengthInBytes);
540
540
541
541
if (tmp == NULL )
542
542
{
@@ -545,7 +545,7 @@ static bool AccessMemory( UINT32 location, UINT32 lengthInBytes, BYTE* buf, int
545
545
546
546
memcpy ( tmp, g_ConfigBuffer, g_ConfigBufferLength );
547
547
548
- private_free (g_ConfigBuffer);
548
+ free (g_ConfigBuffer);
549
549
550
550
g_ConfigBuffer = tmp;
551
551
}
@@ -754,7 +754,7 @@ bool Loader_Engine::SignedDataState::VerifySignature( UINT8* signature, UINT32 l
754
754
const BlockDeviceInfo* deviceInfo = m_pDevice->GetDeviceInfo ();
755
755
if (!deviceInfo->Attribute .SupportsXIP )
756
756
{
757
- signCheckedAddr = (BYTE*)private_malloc (m_dataLength);
757
+ signCheckedAddr = (BYTE*)malloc (m_dataLength);
758
758
if (signCheckedAddr == NULL )
759
759
{
760
760
EraseMemoryAndReset ();
@@ -764,7 +764,7 @@ bool Loader_Engine::SignedDataState::VerifySignature( UINT8* signature, UINT32 l
764
764
if (!m_pDevice->Read ( m_dataAddress, m_dataLength, signCheckedAddr ))
765
765
{
766
766
EraseMemoryAndReset ();
767
- private_free (signCheckedAddr);
767
+ free (signCheckedAddr);
768
768
769
769
return false ;
770
770
}
@@ -791,7 +791,7 @@ bool Loader_Engine::SignedDataState::VerifySignature( UINT8* signature, UINT32 l
791
791
792
792
if (!deviceInfo->Attribute .SupportsXIP )
793
793
{
794
- private_free (signCheckedAddr);
794
+ free (signCheckedAddr);
795
795
}
796
796
797
797
return fret;
@@ -979,7 +979,7 @@ bool Loader_Engine::ProcessPayload( WP_Message* msg )
979
979
LOADER_ENGINE_SETFLAG ( this , c_LoaderEngineFlag_ValidConnection );
980
980
981
981
// --//
982
- #if defined(BIG_ENDIAN )
982
+ #if defined(NETMF_TARGET_BIG_ENDIAN )
983
983
SwapEndian ( msg, msg->m_payload , msg->m_header .m_size , false );
984
984
#endif
985
985
size_t num;
@@ -1120,7 +1120,7 @@ bool Loader_Engine::TransmitMessage( const WP_Message* msg, bool fQueue )
1120
1120
UINT32 payloadSize;
1121
1121
UINT32 flags;
1122
1122
1123
- #if !defined(BIG_ENDIAN )
1123
+ #if !defined(NETMF_TARGET_BIG_ENDIAN )
1124
1124
payloadSize = msg->m_header .m_size ;
1125
1125
flags = msg->m_header .m_flags ;
1126
1126
#else
@@ -1178,7 +1178,7 @@ void Loader_Engine::ReplyToCommand( WP_Message* msg, bool fSuccess, bool fCritic
1178
1178
1179
1179
msgReply.Initialize ( &m_controller );
1180
1180
1181
- #if defined(BIG_ENDIAN )
1181
+ #if defined(NETMF_TARGET_BIG_ENDIAN )
1182
1182
SwapEndian ( msg, ptr, size, true );
1183
1183
#endif
1184
1184
msgReply.PrepareReply ( msg->m_header , flags, size, (UINT8*)ptr );
@@ -1203,7 +1203,7 @@ bool Loader_Engine::Monitor_Ping( WP_Message* msg )
1203
1203
CLR_DBG_Commands::Monitor_Ping::Reply cmdReply;
1204
1204
cmdReply.m_source = CLR_DBG_Commands::Monitor_Ping::c_Ping_Source_TinyBooter;
1205
1205
1206
- #if defined(BIG_ENDIAN )
1206
+ #if defined(NETMF_TARGET_BIG_ENDIAN )
1207
1207
cmdReply.m_dbg_flags = CLR_DBG_Commands::Monitor_Ping::c_Ping_DbgFlag_BigEndian;
1208
1208
#endif
1209
1209
@@ -1542,7 +1542,7 @@ bool Loader_Engine::Monitor_FlashSectorMap( WP_Message* msg )
1542
1542
1543
1543
if (cnt == 1 )
1544
1544
{
1545
- pData = (struct Flash_Sector *)private_malloc (rangeCount * sizeof (struct Flash_Sector ));
1545
+ pData = (struct Flash_Sector *)malloc (rangeCount * sizeof (struct Flash_Sector ));
1546
1546
1547
1547
if (pData == NULL )
1548
1548
{
@@ -1582,12 +1582,12 @@ bool Loader_Engine::Monitor_FlashSectorMap( WP_Message* msg )
1582
1582
1583
1583
ReplyToCommand (msg, true , false , (void *)pData, rangeCount * sizeof (struct Flash_Sector ) );
1584
1584
1585
- private_free (pData);
1585
+ free (pData);
1586
1586
1587
1587
return true ;
1588
1588
}
1589
1589
1590
- #if defined(BIG_ENDIAN )
1590
+ #if defined(NETMF_TARGET_BIG_ENDIAN )
1591
1591
1592
1592
UINT32 Loader_Engine::SwapEndianPattern ( UINT8* &buffer, UINT32 size, UINT32 count )
1593
1593
{
0 commit comments