1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright(c) 2013-2016 Intel Corporation.
6 * Adrian Burns (adrian.burns@intel.com)
7 * Thomas Faust (thomas.faust@intel.com)
8 * Ivan De Cesaris (ivan.de.cesaris@intel.com)
9 * Julien Carreno (julien.carreno@intel.com)
10 * Jeffrey Maxwell (jeffrey.r.maxwell@intel.com)
12 * Contact Information:
18 * Debugger for Intel Quark SoC X1000
19 * Intel Quark X10xx is the first product in the Quark family of SoCs.
20 * It is an IA-32 (Pentium x86 ISA) compatible SoC. The core CPU in the
21 * X10xx is codenamed Lakemont. Lakemont version 1 (LMT1) is used in X10xx.
22 * The CPU TAP (Lakemont TAP) is used for software debug and the CLTAP is
23 * used for SoC level operations.
24 * Useful docs are here: https://communities.intel.com/community/makers/documentation
25 * Intel Quark SoC X1000 OpenOCD/GDB/Eclipse App Note (web search for doc num 330015)
26 * Intel Quark SoC X1000 Debug Operations User Guide (web search for doc num 329866)
27 * Intel Quark SoC X1000 Datasheet (web search for doc num 329676)
29 * This file implements any Quark SoC specific features such as resetbreak (TODO)
36 #include <helper/log.h>
39 #include "target_type.h"
41 #include "x86_32_common.h"
43 static int quark_x10xx_target_create(struct target *t, Jim_Interp *interp)
45 struct x86_32_common *x86_32 = calloc(1, sizeof(*x86_32));
50 x86_32_common_init_arch_info(t, x86_32);
51 lakemont_init_arch_info(t, x86_32);
52 x86_32->core_type = LMT1;
57 struct target_type quark_x10xx_target = {
58 .name = "quark_x10xx",
61 .target_create = quark_x10xx_target_create,
63 /* lakemont probemode specific code */
64 .arch_state = lakemont_arch_state,
65 .assert_reset = lakemont_reset_assert,
66 .deassert_reset = lakemont_reset_deassert,
67 .halt = lakemont_halt,
68 .init_target = lakemont_init_target,
69 .poll = lakemont_poll,
70 .resume = lakemont_resume,
71 .step = lakemont_step,
74 .add_breakpoint = x86_32_common_add_breakpoint,
75 .add_watchpoint = x86_32_common_add_watchpoint,
76 .commands = x86_32_command_handlers,
77 .get_gdb_reg_list = x86_32_get_gdb_reg_list,
78 .mmu = x86_32_common_mmu,
79 .read_memory = x86_32_common_read_memory,
80 .read_phys_memory = x86_32_common_read_phys_mem,
81 .remove_breakpoint = x86_32_common_remove_breakpoint,
82 .remove_watchpoint = x86_32_common_remove_watchpoint,
83 .virt2phys = x86_32_common_virt2phys,
84 .write_memory = x86_32_common_write_memory,
85 .write_phys_memory = x86_32_common_write_phys_mem,