comparison rvinterf/etmsync/memops.c @ 921:38c7078712ab

fc-dspapidump utility written, compiles
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 18 Oct 2015 21:41:01 +0000
parents f50c71442d50
children ce0ded19a769
comparison
equal deleted inserted replaced
920:7cb0b32f1997 921:38c7078712ab
53 } 53 }
54 bcopy(rvi_msg + 6, databuf, nbytes); 54 bcopy(rvi_msg + 6, databuf, nbytes);
55 return(0); 55 return(0);
56 } 56 }
57 57
58 do_memory_read_16(memaddr, databuf, nwords)
59 u32 memaddr;
60 u_char *databuf;
61 {
62 u_char cmdpkt[10];
63 int rc;
64
65 if (nwords > MAX_MEMREAD_16BIT) {
66 printf("error: # of 16-bit words to read may not exceed %d\n",
67 MAX_MEMREAD_16BIT);
68 return(ERROR_USAGE);
69 }
70 cmdpkt[1] = ETM_CORE;
71 cmdpkt[2] = TMCORE_OPC_MEM;
72 cmdpkt[3] = 0x02;
73 cmdpkt[4] = nwords;
74 cmdpkt[5] = memaddr;
75 cmdpkt[6] = memaddr >> 8;
76 cmdpkt[7] = memaddr >> 16;
77 cmdpkt[8] = memaddr >> 24;
78 rc = etm_pkt_exch(cmdpkt, 8);
79 if (rc)
80 return(rc);
81 if (rvi_msg[3]) {
82 printf("ETM error response to mem read 16 request: 0x%02X\n",
83 rvi_msg[3]);
84 return(ERROR_TARGET);
85 }
86 if (rvi_msg_len != nwords * 2 + 7) {
87 printf("error: mem read 16 response has wrong length\n");
88 return(ERROR_TARGET);
89 }
90 if (rvi_msg[4] != TMCORE_OPC_MEM || rvi_msg[5] != 0x02) {
91 printf("error: mem read 16 response has wrong opcode\n");
92 return(ERROR_TARGET);
93 }
94 bcopy(rvi_msg + 6, databuf, nwords * 2);
95 return(0);
96 }
97
58 do_dieid_read(databuf) 98 do_dieid_read(databuf)
59 u_char *databuf; 99 u_char *databuf;
60 { 100 {
61 u_char cmdpkt[4]; 101 u_char cmdpkt[4];
62 int rc; 102 int rc;