Serial receive/transmit rework (uses the new fifo.c API) and a small GDB stub fix.

This commit is contained in:
OBattler
2023-08-18 05:57:32 +02:00
parent 5baf1a5ef4
commit 565421a252
9 changed files with 870 additions and 224 deletions

View File

@@ -2695,6 +2695,7 @@ mem_reset(void)
}
memset(ram, 0x00, ram_size);
ram2_size = m - (1 << 30);
/* Allocate 16 extra bytes of RAM to mitigate some dynarec recompiler memory access quirks. */
ram2 = (uint8_t *) plat_mmap(ram2_size + 16, 0); /* allocate and clear the RAM block above 1 GB */
if (ram2 == NULL) {
if (config_changed == 2)
@@ -2703,17 +2704,18 @@ mem_reset(void)
fatal("Failed to allocate secondary RAM block. Make sure you have enough RAM available.\n");
return;
}
memset(ram2, 0x00, ram2_size);
memset(ram2, 0x00, ram2_size + 16);
} else
#endif
{
ram_size = m;
/* Allocate 16 extra bytes of RAM to mitigate some dynarec recompiler memory access quirks. */
ram = (uint8_t *) plat_mmap(ram_size + 16, 0); /* allocate and clear the RAM block */
if (ram == NULL) {
fatal("Failed to allocate RAM block. Make sure you have enough RAM available.\n");
return;
}
memset(ram, 0x00, ram_size);
memset(ram, 0x00, ram_size + 16);
if (mem_size > 1048576)
ram2 = &(ram[1 << 30]);
}