Skip to content

Commit

Permalink
Update UART address in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
marnovandermaas authored and HU90m committed Mar 29, 2024
1 parent 664cf3e commit 2eb7179
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions sw/cpp/cheri_sanity/uart_check.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ class OpenTitanUart
[[noreturn]]
extern "C" void rom_loader_entry(void *rwRoot)
{
Capability<void> root{rwRoot};
Capability<void> root{rwRoot};

// Create a bounded capability to the UART
Capability<volatile OpenTitanUart> uart = root.cast<volatile OpenTitanUart>();
uart.address() = 0x80001000;
uart.bounds() = 0x100;
// Create a bounded capability to the UART
Capability<volatile OpenTitanUart> uart = root.cast<volatile OpenTitanUart>();
uart.address() = 0x81000000;
uart.bounds() = 0x1000;

uart->init();
uart->blocking_write('h');
uart->blocking_write('i');
while (true) {
asm("");
}
uart->init();
uart->blocking_write('h');
uart->blocking_write('i');
while (true) {
asm("");
}
}

0 comments on commit 2eb7179

Please sign in to comment.