From 129bb4b800e1aaddc6c88c8688c722361ae459b8 Mon Sep 17 00:00:00 2001 From: Mateusz Faderewski Date: Sat, 26 Aug 2023 14:18:22 +0200 Subject: [PATCH] [SC64][SW] SDRAM test use cached memory address --- sw/bootloader/src/test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sw/bootloader/src/test.c b/sw/bootloader/src/test.c index 567153e..7a0d679 100644 --- a/sw/bootloader/src/test.c +++ b/sw/bootloader/src/test.c @@ -190,7 +190,7 @@ static void test_sdram (void) { for (int offset = 0; offset < SDRAM_SIZE; offset += BUFFER_SIZE) { if (!patterns[pattern].constant) { for (int i = 0; i < BUFFER_SIZE / sizeof(uint32_t); i++) { - *UNCACHED(&w_buffer[i]) = (rand() << 31) | rand(); + w_buffer[i] = (rand() << 31) | rand(); } } @@ -199,12 +199,12 @@ static void test_sdram (void) { pi_dma_read((io32_t *) (SDRAM_ADDRESS + offset), r_buffer, BUFFER_SIZE); for (int i = 0; i < BUFFER_SIZE / sizeof(uint32_t); i++) { - if (*UNCACHED(&w_buffer[i]) != *UNCACHED(&r_buffer[i])) { + if (w_buffer[i] != r_buffer[i]) { display_printf( "\nMISMATCH: [0x%08X]: 0x%08X (R) != 0x%08X (W)\n", SDRAM_ADDRESS + offset, - *UNCACHED(&r_buffer[i]), - *UNCACHED(&w_buffer[i]) + r_buffer[i], + w_buffer[i] ); while (true); }