Lines Matching refs:cmd
779 s->txp.cmd.subtype = subtype; in kdd_send_cmd()
879 s->txp.cmd.shake.u1 = 0x01010101; in kdd_handle_handshake()
880 s->txp.cmd.shake.status = KDD_STATUS_SUCCESS; in kdd_handle_handshake()
881 s->txp.cmd.shake.u2 = 0x02020202; in kdd_handle_handshake()
882 s->txp.cmd.shake.v_major = NT_MAJOR_VERSION; in kdd_handle_handshake()
883 s->txp.cmd.shake.v_minor = s->os.build; in kdd_handle_handshake()
884 s->txp.cmd.shake.proto = 6; in kdd_handle_handshake()
885 s->txp.cmd.shake.flags = (0x02 /* ??? */ in kdd_handle_handshake()
888 s->txp.cmd.shake.machine = s->os.w64 ? KDD_MACH_x64 : KDD_MACH_x32; in kdd_handle_handshake()
889 s->txp.cmd.shake.pkts = KDD_PKT_MAX; in kdd_handle_handshake()
890 s->txp.cmd.shake.states = 0xc; /* ??? */ in kdd_handle_handshake()
891 s->txp.cmd.shake.manips = 0x2e; /* ??? */ in kdd_handle_handshake()
892 s->txp.cmd.shake.u3[0] = 0x33; in kdd_handle_handshake()
893 s->txp.cmd.shake.u3[1] = 0x44; in kdd_handle_handshake()
894 s->txp.cmd.shake.u3[2] = 0x55; in kdd_handle_handshake()
895 s->txp.cmd.shake.kern_addr = s->os.base; in kdd_handle_handshake()
896 s->txp.cmd.shake.mods_addr = s->os.base + s->os.modules; in kdd_handle_handshake()
897 s->txp.cmd.shake.data_addr = s->os.kddl ? s->os.base + s->os.kddl : 0; in kdd_handle_handshake()
906 KDD_LOG(s, "Switch to CPU %u\n", s->rxp.cmd.setcpu.cpu); in kdd_handle_setcpu()
909 s->cpuid = s->rxp.cmd.setcpu.cpu; in kdd_handle_setcpu()
919 s->rxp.cmd.sbp.bp, s->rxp.cmd.sbp.u1, s->rxp.cmd.sbp.u2); in kdd_handle_soft_breakpoint()
922 s->txp.cmd.sbp.u1 = s->rxp.cmd.sbp.u1; in kdd_handle_soft_breakpoint()
923 s->txp.cmd.sbp.status = KDD_STATUS_SUCCESS; in kdd_handle_soft_breakpoint()
924 s->txp.cmd.sbp.u2 = s->rxp.cmd.sbp.u2; in kdd_handle_soft_breakpoint()
925 s->txp.cmd.sbp.bp = s->rxp.cmd.sbp.bp; in kdd_handle_soft_breakpoint()
931 KDD_LOG(s, "Hard breakpoint @%#"PRIx64"\n", s->rxp.cmd.hbp.address); in kdd_handle_hard_breakpoint()
935 s->txp.cmd.hbp.status = KDD_STATUS_FAILURE; in kdd_handle_hard_breakpoint()
936 s->txp.cmd.hbp.address = s->rxp.cmd.hbp.address; in kdd_handle_hard_breakpoint()
945 int cpuid = s->rxp.cmd.regs.cpu; in kdd_handle_read_regs()
950 s->txp.cmd.regs.status = KDD_STATUS_SUCCESS; in kdd_handle_read_regs()
953 s->txp.cmd.regs.status = KDD_STATUS_FAILURE; in kdd_handle_read_regs()
955 s->txp.cmd.regs.cpu = cpuid; in kdd_handle_read_regs()
964 int cpuid = s->rxp.cmd.regs.cpu; in kdd_handle_write_regs()
967 s->txp.cmd.regs.status = KDD_STATUS_FAILURE; in kdd_handle_write_regs()
971 s->txp.cmd.regs.status = KDD_STATUS_SUCCESS; in kdd_handle_write_regs()
973 s->txp.cmd.regs.cpu = cpuid; in kdd_handle_write_regs()
983 uint32_t len = s->rxp.cmd.mem.length_req; in kdd_handle_read_ctrl()
984 uint64_t val, addr = s->rxp.cmd.mem.addr; in kdd_handle_read_ctrl()
1040 s->txp.cmd.mem.addr = addr; in kdd_handle_read_ctrl()
1041 s->txp.cmd.mem.length_req = s->rxp.cmd.mem.length_req; in kdd_handle_read_ctrl()
1042 s->txp.cmd.mem.length_rsp = len; in kdd_handle_read_ctrl()
1043 s->txp.cmd.mem.status = ((len) ? KDD_STATUS_SUCCESS : KDD_STATUS_FAILURE); in kdd_handle_read_ctrl()
1050 uint32_t msr = s->rxp.cmd.msr.msr; in kdd_handle_read_msr()
1056 s->txp.cmd.msr.msr = msr; in kdd_handle_read_msr()
1057 s->txp.cmd.msr.val = val; in kdd_handle_read_msr()
1058 s->txp.cmd.msr.status = (ok ? KDD_STATUS_SUCCESS : KDD_STATUS_FAILURE); in kdd_handle_read_msr()
1064 uint32_t msr = s->rxp.cmd.msr.msr; in kdd_handle_write_msr()
1065 uint64_t val = s->rxp.cmd.msr.val; in kdd_handle_write_msr()
1070 s->txp.cmd.msr.msr = msr; in kdd_handle_write_msr()
1071 s->txp.cmd.msr.status = (ok ? KDD_STATUS_SUCCESS : KDD_STATUS_FAILURE); in kdd_handle_write_msr()
1078 uint32_t len = s->rxp.cmd.mem.length_req; in kdd_handle_memory_access()
1079 uint64_t addr = s->rxp.cmd.mem.addr; in kdd_handle_memory_access()
1084 s->rxp.cmd.subtype & 0xff, (s->rxp.cmd.subtype >>8) & 0xff, in kdd_handle_memory_access()
1085 s->rxp.cmd.subtype == KDD_CMD_READ_VA ? "read virt" : in kdd_handle_memory_access()
1086 s->rxp.cmd.subtype == KDD_CMD_WRITE_VA ? "write virt" : in kdd_handle_memory_access()
1087 s->rxp.cmd.subtype == KDD_CMD_READ_PA ? "read phys" : in kdd_handle_memory_access()
1088 s->rxp.cmd.subtype == KDD_CMD_WRITE_PA ? "write phys" : "unknown", in kdd_handle_memory_access()
1094 switch(s->rxp.cmd.subtype) { in kdd_handle_memory_access()
1114 s->txp.cmd.mem.addr = addr; in kdd_handle_memory_access()
1115 s->txp.cmd.mem.length_req = s->rxp.cmd.mem.length_req; in kdd_handle_memory_access()
1116 s->txp.cmd.mem.length_rsp = len; in kdd_handle_memory_access()
1117 s->txp.cmd.mem.status = (len) ? KDD_STATUS_SUCCESS : KDD_STATUS_FAILURE; in kdd_handle_memory_access()
1118 kdd_send_cmd(s, s->rxp.cmd.subtype, len); in kdd_handle_memory_access()
1149 switch (p->cmd.subtype) { in kdd_handle_pkt()
1152 KDD_LOG(s, "Continue: 0x%8.8"PRIx32"\n", p->cmd.cont.reason1); in kdd_handle_pkt()
1196 KDD_LOG(s, "Unhandled CMD subtype 0x%8.8x\n", p->cmd.subtype); in kdd_handle_pkt()
1201 s->txp.cmd.mem.status = KDD_STATUS_FAILURE; in kdd_handle_pkt()