| 32 | static uint8_t* mei_mmap; |
| 33 | |
| 34 | static void mei_dump(void *ptr, int dword, int offset, const char *type) |
| 35 | { |
| 36 | /* struct mei_csr *csr; */ |
| 37 | |
| 38 | |
| 39 | switch (offset) { |
| 40 | case MEI_H_CSR: |
| 41 | case MEI_ME_CSR_HA: |
| 42 | /* |
| 43 | csr = ptr; |
| 44 | if (!csr) { |
| 45 | printf("%-9s[%02x] : ", type, offset); |
| 46 | printf("ERROR: 0x%08x\n", dword); |
| 47 | break; |
| 48 | } |
| 49 | printf("%-9s[%02x] : ", type, offset); |
| 50 | printf("depth=%u read=%02u write=%02u ready=%u " |
| 51 | "reset=%u intgen=%u intstatus=%u intenable=%u\n", |
| 52 | csr->buffer_depth, csr->buffer_read_ptr, |
| 53 | csr->buffer_write_ptr, csr->ready, csr->reset, |
| 54 | csr->interrupt_generate, csr->interrupt_status, |
| 55 | csr->interrupt_enable); |
| 56 | */ |
| 57 | break; |
| 58 | case MEI_ME_CB_RW: |
| 59 | case MEI_H_CB_WW: |
| 60 | printf("%-9s[%02x] : ", type, offset); |
| 61 | printf("CB: 0x%08x\n", dword); |
| 62 | break; |
| 63 | default: |
| 64 | printf("%-9s[%02x] : ", type, offset); |
| 65 | printf("0x%08x\n", offset); |
| 66 | break; |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | /* |
| 71 | * ME/MEI access helpers using memcpy to avoid aliasing. |
no test coverage detected