Remove redundant RAM address and data scrambling

The RAM address and data scrambling API was called twice, once before filling
RAM with random values, and once after. Since moving to a significantly
better PRNG (xorwow) this is now deemed unnecessary. See issue #225.

This changes both FPGA and firmware hashes.
This commit is contained in:
dehanj 2024-06-12 15:12:09 +02:00
parent 92712a11bf
commit b4c525695a
No known key found for this signature in database
GPG Key ID: 3707A9DBF4BB8F1A
3 changed files with 3 additions and 8 deletions

View File

@ -1 +1 @@
c0da9e30042b87e0acbb01c9faf135b604f3f3b8cc1c7f7cc426d926bba785c1 application_fpga.bin 809eedf8a582b2b985292ea35102b6dd23c501202ea1c9c3b13dfdb4ff934e8e application_fpga.bin

View File

@ -1 +1 @@
d14bc9d8366505bc6f3312991d49ce7fe07d472fc936f4fabde4bf7d8775bde576268c79579d60f83e79de173a4217e00ecb1e04178db621cf9f332315485a73 firmware.bin edb39fca7dafb8ea0b89fdeecd960d7656e14ce461e49af97160a8bd6e67d9987e816adad37ba0fcfa63d107c3160988e4c3423ce4a71c39544bc0045888fec1 firmware.bin

View File

@ -377,10 +377,6 @@ static void scramble_ram(void)
{ {
uint32_t *ram = (uint32_t *)(TK1_RAM_BASE); uint32_t *ram = (uint32_t *)(TK1_RAM_BASE);
// Set RAM address and data scrambling values
*ram_rand = rnd_word();
*ram_scramble = rnd_word();
// Fill RAM with random data // Fill RAM with random data
// Get random state and accumulator seeds. // Get random state and accumulator seeds.
uint32_t data_state = rnd_word(); uint32_t data_state = rnd_word();
@ -391,8 +387,7 @@ static void scramble_ram(void)
ram[w] = data_state; ram[w] = data_state;
} }
// Set new address and RAM scrambling values, // Set RAM address and data scrambling parameters
// for all use of RAM by app.
*ram_rand = rnd_word(); *ram_rand = rnd_word();
*ram_scramble = rnd_word(); *ram_scramble = rnd_word();
} }