mirror of
https://github.com/ringtailsoftware/uvm32.git
synced 2026-06-05 22:43:39 +00:00
Test memory read outside of memory and extram regions.
This commit is contained in:
parent
179466eae4
commit
2037f6e575
3 changed files with 24 additions and 0 deletions
|
|
@ -47,6 +47,11 @@ void syscall_i_test(void) {
|
|||
syscall((uint32_t)SYSCALL_I, (uint32_t)p, 0);
|
||||
}
|
||||
|
||||
void syscall_j_test(void) {
|
||||
uint32_t *p = (uint32_t *)0xF0000000;
|
||||
syscall((uint32_t)SYSCALL_I, (uint32_t)p[0], 0); // try to read from beyond memory and not in MMIO region
|
||||
}
|
||||
|
||||
void main(void) {
|
||||
switch(syscall(SYSCALL_PICKTEST, 0, 0)) {
|
||||
case SYSCALL_A:
|
||||
|
|
@ -70,6 +75,9 @@ void main(void) {
|
|||
case SYSCALL_I:
|
||||
syscall_i_test();
|
||||
break;
|
||||
case SYSCALL_J:
|
||||
syscall_j_test();
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue