mirror of
https://github.com/drasko/codezero.git
synced 2026-03-04 03:23:16 +01:00
Undefined instruction handling/ipc revised, tests added, cleaned up.
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
#include <shpage.h>
|
||||
#include <libposix.h>
|
||||
|
||||
#if 0
|
||||
|
||||
/*
|
||||
* Shared page initialisation of posix-like tasks.
|
||||
*
|
||||
@@ -95,3 +97,4 @@ int shared_page_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -79,6 +79,11 @@ void handle_requests(void)
|
||||
/* This has no receive phase */
|
||||
return;
|
||||
|
||||
case L4_IPC_TAG_UNDEF_FAULT:
|
||||
/* Undefined instruction fault. Ignore. */
|
||||
// printf("Undefined instruction fault caught.\n");
|
||||
ret = 0;
|
||||
break;
|
||||
case L4_IPC_TAG_PFAULT: {
|
||||
struct page *p;
|
||||
|
||||
|
||||
@@ -40,8 +40,7 @@ int main(int argc, char *argv[])
|
||||
wait_pager(pagerid);
|
||||
|
||||
printf("\n%s: Running POSIX API tests.\n", __TASKNAME__);
|
||||
|
||||
undeftest();
|
||||
|
||||
|
||||
small_io_test();
|
||||
|
||||
@@ -57,6 +56,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
clonetest();
|
||||
|
||||
undeftest();
|
||||
|
||||
if (parent_of_all == getpid()) {
|
||||
ipc_full_test();
|
||||
ipc_extended_test();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* undeftest.c:
|
||||
* Tests to see if kernel gracefully handles the undef exception
|
||||
*/
|
||||
@@ -13,17 +13,16 @@
|
||||
#include <errno.h>
|
||||
#include INC_GLUE(memory.h)
|
||||
|
||||
|
||||
int undeftest(void)
|
||||
{
|
||||
test_printf("UNDEF: Start\n");
|
||||
|
||||
|
||||
/* need a way to report FAIL case */
|
||||
__asm__ __volatile__(".word 0xf1f0feed\n\t"); /* Some pattern for easy recongition */
|
||||
|
||||
|
||||
/* If code reaches here its passed */
|
||||
printf("UNDEF TEST -- PASSED --\n");
|
||||
test_printf("UNDEF: Passed\n");
|
||||
if (getpid() == parent_of_all)
|
||||
printf("UNDEF TEST -- PASSED --\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user