diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2010-09-20 18:41:19 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2010-09-20 18:46:37 +0100 |
commit | 452057e1b7fc91bfa3ee06e5a71c3d13d2711b6b (patch) | |
tree | 00e3b1212be8cda04d39bd7b4802d5d6c60cfef2 /risu.h | |
parent | 403892c49503b5939689dc7793ca413bbdd4ba37 (diff) |
Add the initial structure of SIGILL handling and CPU-specific interface.
Diffstat (limited to 'risu.h')
-rw-r--r-- | risu.h | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +/* Copyright 2010 Linaro Limited */ + +#ifndef RISU_H +#define RISU_H + +#include <stdint.h> + +/* Socket related routines */ +int master_connect(uint16_t port); +int apprentice_connect(const char *hostname, uint16_t port); +int send_data_pkt(int sock, void *pkt, int pktlen); +void recv_data_pkt(int sock, void *pkt, int pktlen); +void send_response_byte(int sock, int resp); + + + +/* Interface provided by CPU-specific code: */ + +/* Send the register information from the struct ucontext down the socket. + * Return the response code from the master. + * NB: called from a signal handler. + */ +int send_register_info(int sock, void *uc); + +/* Read register info from the socket and compare it with that from the + * ucontext. Return 0 for match, 1 for end-of-test, 2 for mismatch. + * NB: called from a signal handler. + */ +int recv_and_compare_register_info(int sock, void *uc); + +/* Print a useful report on the status of the last comparison + * done in recv_and_compare_register_info(). This is called on + * exit, so need not restrict itself to signal-safe functions. + * Should return 0 if it was a good match (ie end of test) + * and 1 for a mismatch. + */ +int report_match_status(void); + +#endif /* RISU_H */ |