-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into openblt-can
- Loading branch information
Showing
79 changed files
with
498 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3202128349 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.48way.3202128349" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.48way.3202128349" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3747157664 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.alphax-2chan.3747157664" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.alphax-2chan.3747157664" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 1435571393 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.alphax-4chan.1435571393" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.alphax-4chan.1435571393" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 757731896 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.alphax-8chan.757731896" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.alphax-8chan.757731896" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3872187456 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.atlas.3872187456" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.atlas.3872187456" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3256949969 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.core8.3256949969" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.core8.3256949969" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 2787437970 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.f407-discovery.2787437970" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.f407-discovery.2787437970" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 4194701671 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.f429-discovery.4194701671" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.f429-discovery.4194701671" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3629445549 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.frankenso_na6.3629445549" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.frankenso_na6.3629445549" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 1939024157 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.harley81.1939024157" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.harley81.1939024157" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 2473541556 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen-gm-e67.2473541556" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen-gm-e67.2473541556" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 150925813 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen-honda-k.150925813" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen-honda-k.150925813" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 220266715 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen-nb1.220266715" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen-nb1.220266715" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 2113580177 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen121nissan.2113580177" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen121nissan.2113580177" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3522798402 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen121vag.3522798402" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen121vag.3522798402" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 2056548544 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen128.2056548544" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen128.2056548544" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3999485985 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen154hyundai.3999485985" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen154hyundai.3999485985" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 196249808 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen72.196249808" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen72.196249808" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 2805527122 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen81.2805527122" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen81.2805527122" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 2701190497 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellen88bmw.2701190497" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellen88bmw.2701190497" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3921039584 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellenNA6.3921039584" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellenNA6.3921039584" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 1427253072 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.hellenNA8_96.1427253072" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.hellenNA8_96.1427253072" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 495482079 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.mre_f4.495482079" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.mre_f4.495482079" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 495482079 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.mre_f7.495482079" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.mre_f7.495482079" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3398622455 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.prometheus_405.3398622455" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.prometheus_405.3398622455" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 3398622455 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.prometheus_469.3398622455" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.prometheus_469.3398622455" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 1798886028 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.proteus_f4.1798886028" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.proteus_f4.1798886028" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 1798886028 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.proteus_f7.1798886028" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.proteus_f7.1798886028" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 1798886028 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.proteus_h7.1798886028" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.proteus_h7.1798886028" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 2133657576 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.subaru_eg33_f7.2133657576" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.subaru_eg33_f7.2133657576" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#define SIGNATURE_HASH 1890073925 | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.27.tdg-pdm8.1890073925" | ||
#define TS_SIGNATURE "rusEFI (FOME) master.2023.08.28.tdg-pdm8.1890073925" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
// Common logic for flash memory between F4/F7 and H7 implementations | ||
|
||
#include "pch.h" | ||
|
||
#if EFI_INTERNAL_FLASH | ||
|
||
#include "flash_int.h" | ||
|
||
flashaddr_t intFlashSectorEnd(flashsector_t sector) { | ||
return intFlashSectorBegin(sector + 1); | ||
} | ||
|
||
flashsector_t intFlashSectorAt(flashaddr_t address) { | ||
flashsector_t sector = 0; | ||
while (address >= intFlashSectorEnd(sector)) | ||
++sector; | ||
return sector; | ||
} | ||
|
||
int intFlashErase(flashaddr_t address, size_t size) { | ||
while (size > 0) { | ||
flashsector_t sector = intFlashSectorAt(address); | ||
int err = intFlashSectorErase(sector); | ||
if (err != FLASH_RETURN_SUCCESS) | ||
return err; | ||
address = intFlashSectorEnd(sector); | ||
size_t sector_size = flashSectorSize(sector); | ||
if (sector_size >= size) | ||
break; | ||
size -= sector_size; | ||
} | ||
|
||
return FLASH_RETURN_SUCCESS; | ||
} | ||
|
||
bool intFlashIsErased(flashaddr_t address, size_t size) { | ||
#if CORTEX_MODEL == 7 | ||
// If we have a cache, invalidate the relevant cache lines. | ||
// They may still contain old data, leading us to believe that the | ||
// flash erase failed. | ||
SCB_InvalidateDCache_by_Addr((uint32_t*)address, size); | ||
#endif | ||
|
||
/* Check for default set bits in the flash memory | ||
* For efficiency, compare flashdata_t values as much as possible, | ||
* then, fallback to byte per byte comparison. */ | ||
while (size >= sizeof(flashdata_t)) { | ||
if (*(volatile flashdata_t*) address != (flashdata_t) (-1)) // flashdata_t being unsigned, -1 is 0xFF..FF | ||
return false; | ||
address += sizeof(flashdata_t); | ||
size -= sizeof(flashdata_t); | ||
} | ||
while (size > 0) { | ||
if (*(char*) address != 0xFF) | ||
return false; | ||
++address; | ||
--size; | ||
} | ||
|
||
return TRUE; | ||
} | ||
|
||
bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size) { | ||
/* For efficiency, compare flashdata_t values as much as possible, | ||
* then, fallback to byte per byte comparison. */ | ||
while (size >= sizeof(flashdata_t)) { | ||
if (*(volatile flashdata_t*) address != *(flashdata_t*) buffer) | ||
return FALSE; | ||
address += sizeof(flashdata_t); | ||
buffer += sizeof(flashdata_t); | ||
size -= sizeof(flashdata_t); | ||
} | ||
while (size > 0) { | ||
if (*(volatile char*) address != *buffer) | ||
return FALSE; | ||
++address; | ||
++buffer; | ||
--size; | ||
} | ||
|
||
return TRUE; | ||
} | ||
|
||
int intFlashRead(flashaddr_t source, char* destination, size_t size) { | ||
#if CORTEX_MODEL == 7 | ||
// If we have a cache, invalidate the relevant cache lines. | ||
// They may still contain old data, leading us to read invalid data. | ||
SCB_InvalidateDCache_by_Addr((uint32_t*)source, size); | ||
#endif | ||
|
||
memcpy(destination, (char*) source, size); | ||
return FLASH_RETURN_SUCCESS; | ||
} | ||
|
||
#endif // EFI_INTERNAL_FLASH |
Oops, something went wrong.