cx18-firmware.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. /*
  2. * cx18 firmware functions
  3. *
  4. * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl>
  5. * Copyright (C) 2008 Andy Walls <awalls@radix.net>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  20. * 02111-1307 USA
  21. */
  22. #include "cx18-driver.h"
  23. #include "cx18-io.h"
  24. #include "cx18-scb.h"
  25. #include "cx18-irq.h"
  26. #include "cx18-firmware.h"
  27. #include "cx18-cards.h"
  28. #include "cx18-av-core.h"
  29. #include <linux/firmware.h>
  30. #define CX18_PROC_SOFT_RESET 0xc70010
  31. #define CX18_DDR_SOFT_RESET 0xc70014
  32. #define CX18_CLOCK_SELECT1 0xc71000
  33. #define CX18_CLOCK_SELECT2 0xc71004
  34. #define CX18_HALF_CLOCK_SELECT1 0xc71008
  35. #define CX18_HALF_CLOCK_SELECT2 0xc7100C
  36. #define CX18_CLOCK_POLARITY1 0xc71010
  37. #define CX18_CLOCK_POLARITY2 0xc71014
  38. #define CX18_ADD_DELAY_ENABLE1 0xc71018
  39. #define CX18_ADD_DELAY_ENABLE2 0xc7101C
  40. #define CX18_CLOCK_ENABLE1 0xc71020
  41. #define CX18_CLOCK_ENABLE2 0xc71024
  42. #define CX18_REG_BUS_TIMEOUT_EN 0xc72024
  43. #define CX18_FAST_CLOCK_PLL_INT 0xc78000
  44. #define CX18_FAST_CLOCK_PLL_FRAC 0xc78004
  45. #define CX18_FAST_CLOCK_PLL_POST 0xc78008
  46. #define CX18_FAST_CLOCK_PLL_PRESCALE 0xc7800C
  47. #define CX18_FAST_CLOCK_PLL_ADJUST_BANDWIDTH 0xc78010
  48. #define CX18_SLOW_CLOCK_PLL_INT 0xc78014
  49. #define CX18_SLOW_CLOCK_PLL_FRAC 0xc78018
  50. #define CX18_SLOW_CLOCK_PLL_POST 0xc7801C
  51. #define CX18_MPEG_CLOCK_PLL_INT 0xc78040
  52. #define CX18_MPEG_CLOCK_PLL_FRAC 0xc78044
  53. #define CX18_MPEG_CLOCK_PLL_POST 0xc78048
  54. #define CX18_PLL_POWER_DOWN 0xc78088
  55. #define CX18_SW1_INT_STATUS 0xc73104
  56. #define CX18_SW1_INT_ENABLE_PCI 0xc7311C
  57. #define CX18_SW2_INT_SET 0xc73140
  58. #define CX18_SW2_INT_STATUS 0xc73144
  59. #define CX18_ADEC_CONTROL 0xc78120
  60. #define CX18_DDR_REQUEST_ENABLE 0xc80000
  61. #define CX18_DDR_CHIP_CONFIG 0xc80004
  62. #define CX18_DDR_REFRESH 0xc80008
  63. #define CX18_DDR_TIMING1 0xc8000C
  64. #define CX18_DDR_TIMING2 0xc80010
  65. #define CX18_DDR_POWER_REG 0xc8001C
  66. #define CX18_DDR_TUNE_LANE 0xc80048
  67. #define CX18_DDR_INITIAL_EMRS 0xc80054
  68. #define CX18_DDR_MB_PER_ROW_7 0xc8009C
  69. #define CX18_DDR_BASE_63_ADDR 0xc804FC
  70. #define CX18_WMB_CLIENT02 0xc90108
  71. #define CX18_WMB_CLIENT05 0xc90114
  72. #define CX18_WMB_CLIENT06 0xc90118
  73. #define CX18_WMB_CLIENT07 0xc9011C
  74. #define CX18_WMB_CLIENT08 0xc90120
  75. #define CX18_WMB_CLIENT09 0xc90124
  76. #define CX18_WMB_CLIENT10 0xc90128
  77. #define CX18_WMB_CLIENT11 0xc9012C
  78. #define CX18_WMB_CLIENT12 0xc90130
  79. #define CX18_WMB_CLIENT13 0xc90134
  80. #define CX18_WMB_CLIENT14 0xc90138
  81. #define CX18_DSP0_INTERRUPT_MASK 0xd0004C
  82. #define APU_ROM_SYNC1 0x6D676553 /* "mgeS" */
  83. #define APU_ROM_SYNC2 0x72646548 /* "rdeH" */
  84. struct cx18_apu_rom_seghdr {
  85. u32 sync1;
  86. u32 sync2;
  87. u32 addr;
  88. u32 size;
  89. };
  90. static int load_cpu_fw_direct(const char *fn, u8 __iomem *mem, struct cx18 *cx)
  91. {
  92. const struct firmware *fw = NULL;
  93. int i, j;
  94. unsigned size;
  95. u32 __iomem *dst = (u32 __iomem *)mem;
  96. const u32 *src;
  97. if (request_firmware(&fw, fn, &cx->pci_dev->dev)) {
  98. CX18_ERR("Unable to open firmware %s\n", fn);
  99. CX18_ERR("Did you put the firmware in the hotplug firmware directory?\n");
  100. return -ENOMEM;
  101. }
  102. src = (const u32 *)fw->data;
  103. for (i = 0; i < fw->size; i += 4096) {
  104. cx18_setup_page(cx, i);
  105. for (j = i; j < fw->size && j < i + 4096; j += 4) {
  106. /* no need for endianness conversion on the ppc */
  107. cx18_raw_writel(cx, *src, dst);
  108. if (cx18_raw_readl(cx, dst) != *src) {
  109. CX18_ERR("Mismatch at offset %x\n", i);
  110. release_firmware(fw);
  111. cx18_setup_page(cx, 0);
  112. return -EIO;
  113. }
  114. dst++;
  115. src++;
  116. }
  117. }
  118. if (!test_bit(CX18_F_I_LOADED_FW, &cx->i_flags))
  119. CX18_INFO("loaded %s firmware (%zd bytes)\n", fn, fw->size);
  120. size = fw->size;
  121. release_firmware(fw);
  122. cx18_setup_page(cx, SCB_OFFSET);
  123. return size;
  124. }
  125. static int load_apu_fw_direct(const char *fn, u8 __iomem *dst, struct cx18 *cx,
  126. u32 *entry_addr)
  127. {
  128. const struct firmware *fw = NULL;
  129. int i, j;
  130. unsigned size;
  131. const u32 *src;
  132. struct cx18_apu_rom_seghdr seghdr;
  133. const u8 *vers;
  134. u32 offset = 0;
  135. u32 apu_version = 0;
  136. int sz;
  137. if (request_firmware(&fw, fn, &cx->pci_dev->dev)) {
  138. CX18_ERR("unable to open firmware %s\n", fn);
  139. CX18_ERR("did you put the firmware in the hotplug firmware directory?\n");
  140. cx18_setup_page(cx, 0);
  141. return -ENOMEM;
  142. }
  143. *entry_addr = 0;
  144. src = (const u32 *)fw->data;
  145. vers = fw->data + sizeof(seghdr);
  146. sz = fw->size;
  147. apu_version = (vers[0] << 24) | (vers[4] << 16) | vers[32];
  148. while (offset + sizeof(seghdr) < fw->size) {
  149. /* TODO: byteswapping */
  150. memcpy(&seghdr, src + offset / 4, sizeof(seghdr));
  151. offset += sizeof(seghdr);
  152. if (seghdr.sync1 != APU_ROM_SYNC1 ||
  153. seghdr.sync2 != APU_ROM_SYNC2) {
  154. offset += seghdr.size;
  155. continue;
  156. }
  157. CX18_DEBUG_INFO("load segment %x-%x\n", seghdr.addr,
  158. seghdr.addr + seghdr.size - 1);
  159. if (*entry_addr == 0)
  160. *entry_addr = seghdr.addr;
  161. if (offset + seghdr.size > sz)
  162. break;
  163. for (i = 0; i < seghdr.size; i += 4096) {
  164. cx18_setup_page(cx, seghdr.addr + i);
  165. for (j = i; j < seghdr.size && j < i + 4096; j += 4) {
  166. /* no need for endianness conversion on the ppc */
  167. cx18_raw_writel(cx, src[(offset + j) / 4],
  168. dst + seghdr.addr + j);
  169. if (cx18_raw_readl(cx, dst + seghdr.addr + j)
  170. != src[(offset + j) / 4]) {
  171. CX18_ERR("Mismatch at offset %x\n",
  172. offset + j);
  173. release_firmware(fw);
  174. cx18_setup_page(cx, 0);
  175. return -EIO;
  176. }
  177. }
  178. }
  179. offset += seghdr.size;
  180. }
  181. if (!test_bit(CX18_F_I_LOADED_FW, &cx->i_flags))
  182. CX18_INFO("loaded %s firmware V%08x (%zd bytes)\n",
  183. fn, apu_version, fw->size);
  184. size = fw->size;
  185. release_firmware(fw);
  186. cx18_setup_page(cx, 0);
  187. return size;
  188. }
  189. void cx18_halt_firmware(struct cx18 *cx)
  190. {
  191. CX18_DEBUG_INFO("Preparing for firmware halt.\n");
  192. cx18_write_reg_expect(cx, 0x000F000F, CX18_PROC_SOFT_RESET,
  193. 0x0000000F, 0x000F000F);
  194. cx18_write_reg_expect(cx, 0x00020002, CX18_ADEC_CONTROL,
  195. 0x00000002, 0x00020002);
  196. }
  197. void cx18_init_power(struct cx18 *cx, int lowpwr)
  198. {
  199. /* power-down Spare and AOM PLLs */
  200. /* power-up fast, slow and mpeg PLLs */
  201. cx18_write_reg(cx, 0x00000008, CX18_PLL_POWER_DOWN);
  202. /* ADEC out of sleep */
  203. cx18_write_reg_expect(cx, 0x00020000, CX18_ADEC_CONTROL,
  204. 0x00000000, 0x00020002);
  205. /*
  206. * The PLL parameters are based on the external crystal frequency that
  207. * would ideally be:
  208. *
  209. * NTSC Color subcarrier freq * 8 =
  210. * 4.5 MHz/286 * 455/2 * 8 = 28.63636363... MHz
  211. *
  212. * The accidents of history and rationale that explain from where this
  213. * combination of magic numbers originate can be found in:
  214. *
  215. * [1] Abrahams, I. C., "Choice of Chrominance Subcarrier Frequency in
  216. * the NTSC Standards", Proceedings of the I-R-E, January 1954, pp 79-80
  217. *
  218. * [2] Abrahams, I. C., "The 'Frequency Interleaving' Principle in the
  219. * NTSC Standards", Proceedings of the I-R-E, January 1954, pp 81-83
  220. *
  221. * As Mike Bradley has rightly pointed out, it's not the exact crystal
  222. * frequency that matters, only that all parts of the driver and
  223. * firmware are using the same value (close to the ideal value).
  224. *
  225. * Since I have a strong suspicion that, if the firmware ever assumes a
  226. * crystal value at all, it will assume 28.636360 MHz, the crystal
  227. * freq used in calculations in this driver will be:
  228. *
  229. * xtal_freq = 28.636360 MHz
  230. *
  231. * an error of less than 0.13 ppm which is way, way better than any off
  232. * the shelf crystal will have for accuracy anyway.
  233. *
  234. * Below I aim to run the PLLs' VCOs near 400 MHz to minimze errors.
  235. *
  236. * Many thanks to Jeff Campbell and Mike Bradley for their extensive
  237. * investigation, experimentation, testing, and suggested solutions of
  238. * of audio/video sync problems with SVideo and CVBS captures.
  239. */
  240. /* the fast clock is at 200/245 MHz */
  241. /* 1 * xtal_freq * 0x0d.f7df9b8 / 2 = 200 MHz: 400 MHz pre post-divide*/
  242. /* 1 * xtal_freq * 0x11.1c71eb8 / 2 = 245 MHz: 490 MHz pre post-divide*/
  243. cx18_write_reg(cx, lowpwr ? 0xD : 0x11, CX18_FAST_CLOCK_PLL_INT);
  244. cx18_write_reg(cx, lowpwr ? 0x1EFBF37 : 0x038E3D7,
  245. CX18_FAST_CLOCK_PLL_FRAC);
  246. cx18_write_reg(cx, 2, CX18_FAST_CLOCK_PLL_POST);
  247. cx18_write_reg(cx, 1, CX18_FAST_CLOCK_PLL_PRESCALE);
  248. cx18_write_reg(cx, 4, CX18_FAST_CLOCK_PLL_ADJUST_BANDWIDTH);
  249. /* set slow clock to 125/120 MHz */
  250. /* xtal_freq * 0x0d.1861a20 / 3 = 125 MHz: 375 MHz before post-divide */
  251. /* xtal_freq * 0x0c.92493f8 / 3 = 120 MHz: 360 MHz before post-divide */
  252. cx18_write_reg(cx, lowpwr ? 0xD : 0xC, CX18_SLOW_CLOCK_PLL_INT);
  253. cx18_write_reg(cx, lowpwr ? 0x30C344 : 0x124927F,
  254. CX18_SLOW_CLOCK_PLL_FRAC);
  255. cx18_write_reg(cx, 3, CX18_SLOW_CLOCK_PLL_POST);
  256. /* mpeg clock pll 54MHz */
  257. /* xtal_freq * 0xf.15f17f0 / 8 = 54 MHz: 432 MHz before post-divide */
  258. cx18_write_reg(cx, 0xF, CX18_MPEG_CLOCK_PLL_INT);
  259. cx18_write_reg(cx, 0x2BE2FE, CX18_MPEG_CLOCK_PLL_FRAC);
  260. cx18_write_reg(cx, 8, CX18_MPEG_CLOCK_PLL_POST);
  261. /*
  262. * VDCLK Integer = 0x0f, Post Divider = 0x04
  263. * AIMCLK Integer = 0x0e, Post Divider = 0x16
  264. */
  265. cx18_av_write4(cx, CXADEC_PLL_CTRL1, 0x160e040f);
  266. /* VDCLK Fraction = 0x2be2fe */
  267. /* xtal * 0xf.15f17f0/4 = 108 MHz: 432 MHz before post divide */
  268. cx18_av_write4(cx, CXADEC_VID_PLL_FRAC, 0x002be2fe);
  269. /* AIMCLK Fraction = 0x05227ad */
  270. /* xtal * 0xe.2913d68/0x16 = 48000 * 384: 406 MHz before post-divide */
  271. cx18_av_write4(cx, CXADEC_AUX_PLL_FRAC, 0x005227ad);
  272. /* SA_MCLK_SEL=1, SA_MCLK_DIV=0x16 */
  273. cx18_av_write(cx, CXADEC_I2S_MCLK, 0x56);
  274. /* Defaults */
  275. /* APU = SC or SC/2 = 125/62.5 */
  276. /* EPU = SC = 125 */
  277. /* DDR = FC = 180 */
  278. /* ENC = SC = 125 */
  279. /* AI1 = SC = 125 */
  280. /* VIM2 = disabled */
  281. /* PCI = FC/2 = 90 */
  282. /* AI2 = disabled */
  283. /* DEMUX = disabled */
  284. /* AO = SC/2 = 62.5 */
  285. /* SER = 54MHz */
  286. /* VFC = disabled */
  287. /* USB = disabled */
  288. if (lowpwr) {
  289. cx18_write_reg_expect(cx, 0xFFFF0020, CX18_CLOCK_SELECT1,
  290. 0x00000020, 0xFFFFFFFF);
  291. cx18_write_reg_expect(cx, 0xFFFF0004, CX18_CLOCK_SELECT2,
  292. 0x00000004, 0xFFFFFFFF);
  293. } else {
  294. /* This doesn't explicitly set every clock select */
  295. cx18_write_reg_expect(cx, 0x00060004, CX18_CLOCK_SELECT1,
  296. 0x00000004, 0x00060006);
  297. cx18_write_reg_expect(cx, 0x00060006, CX18_CLOCK_SELECT2,
  298. 0x00000006, 0x00060006);
  299. }
  300. cx18_write_reg_expect(cx, 0xFFFF0002, CX18_HALF_CLOCK_SELECT1,
  301. 0x00000002, 0xFFFFFFFF);
  302. cx18_write_reg_expect(cx, 0xFFFF0104, CX18_HALF_CLOCK_SELECT2,
  303. 0x00000104, 0xFFFFFFFF);
  304. cx18_write_reg_expect(cx, 0xFFFF9026, CX18_CLOCK_ENABLE1,
  305. 0x00009026, 0xFFFFFFFF);
  306. cx18_write_reg_expect(cx, 0xFFFF3105, CX18_CLOCK_ENABLE2,
  307. 0x00003105, 0xFFFFFFFF);
  308. }
  309. void cx18_init_memory(struct cx18 *cx)
  310. {
  311. cx18_msleep_timeout(10, 0);
  312. cx18_write_reg_expect(cx, 0x00010000, CX18_DDR_SOFT_RESET,
  313. 0x00000000, 0x00010001);
  314. cx18_msleep_timeout(10, 0);
  315. cx18_write_reg(cx, cx->card->ddr.chip_config, CX18_DDR_CHIP_CONFIG);
  316. cx18_msleep_timeout(10, 0);
  317. cx18_write_reg(cx, cx->card->ddr.refresh, CX18_DDR_REFRESH);
  318. cx18_write_reg(cx, cx->card->ddr.timing1, CX18_DDR_TIMING1);
  319. cx18_write_reg(cx, cx->card->ddr.timing2, CX18_DDR_TIMING2);
  320. cx18_msleep_timeout(10, 0);
  321. /* Initialize DQS pad time */
  322. cx18_write_reg(cx, cx->card->ddr.tune_lane, CX18_DDR_TUNE_LANE);
  323. cx18_write_reg(cx, cx->card->ddr.initial_emrs, CX18_DDR_INITIAL_EMRS);
  324. cx18_msleep_timeout(10, 0);
  325. cx18_write_reg_expect(cx, 0x00020000, CX18_DDR_SOFT_RESET,
  326. 0x00000000, 0x00020002);
  327. cx18_msleep_timeout(10, 0);
  328. /* use power-down mode when idle */
  329. cx18_write_reg(cx, 0x00000010, CX18_DDR_POWER_REG);
  330. cx18_write_reg_expect(cx, 0x00010001, CX18_REG_BUS_TIMEOUT_EN,
  331. 0x00000001, 0x00010001);
  332. cx18_write_reg(cx, 0x48, CX18_DDR_MB_PER_ROW_7);
  333. cx18_write_reg(cx, 0xE0000, CX18_DDR_BASE_63_ADDR);
  334. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT02); /* AO */
  335. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT09); /* AI2 */
  336. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT05); /* VIM1 */
  337. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT06); /* AI1 */
  338. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT07); /* 3D comb */
  339. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT10); /* ME */
  340. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT12); /* ENC */
  341. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT13); /* PK */
  342. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT11); /* RC */
  343. cx18_write_reg(cx, 0x00000101, CX18_WMB_CLIENT14); /* AVO */
  344. }
  345. int cx18_firmware_init(struct cx18 *cx)
  346. {
  347. u32 fw_entry_addr;
  348. int sz, retries;
  349. u32 api_args[MAX_MB_ARGUMENTS];
  350. /* Allow chip to control CLKRUN */
  351. cx18_write_reg(cx, 0x5, CX18_DSP0_INTERRUPT_MASK);
  352. /* Stop the firmware */
  353. cx18_write_reg_expect(cx, 0x000F000F, CX18_PROC_SOFT_RESET,
  354. 0x0000000F, 0x000F000F);
  355. cx18_msleep_timeout(1, 0);
  356. /* If the CPU is still running */
  357. if ((cx18_read_reg(cx, CX18_PROC_SOFT_RESET) & 8) == 0) {
  358. CX18_ERR("%s: couldn't stop CPU to load firmware\n", __func__);
  359. return -EIO;
  360. }
  361. cx18_sw1_irq_enable(cx, IRQ_CPU_TO_EPU | IRQ_APU_TO_EPU);
  362. cx18_sw2_irq_enable(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
  363. sz = load_cpu_fw_direct("v4l-cx23418-cpu.fw", cx->enc_mem, cx);
  364. if (sz <= 0)
  365. return sz;
  366. /* The SCB & IPC area *must* be correct before starting the firmwares */
  367. cx18_init_scb(cx);
  368. fw_entry_addr = 0;
  369. sz = load_apu_fw_direct("v4l-cx23418-apu.fw", cx->enc_mem, cx,
  370. &fw_entry_addr);
  371. if (sz <= 0)
  372. return sz;
  373. /* Start the CPU. The CPU will take care of the APU for us. */
  374. cx18_write_reg_expect(cx, 0x00080000, CX18_PROC_SOFT_RESET,
  375. 0x00000000, 0x00080008);
  376. /* Wait up to 500 ms for the APU to come out of reset */
  377. for (retries = 0;
  378. retries < 50 && (cx18_read_reg(cx, CX18_PROC_SOFT_RESET) & 1) == 1;
  379. retries++)
  380. cx18_msleep_timeout(10, 0);
  381. cx18_msleep_timeout(200, 0);
  382. if (retries == 50 &&
  383. (cx18_read_reg(cx, CX18_PROC_SOFT_RESET) & 1) == 1) {
  384. CX18_ERR("Could not start the CPU\n");
  385. return -EIO;
  386. }
  387. /*
  388. * The CPU had once before set up to receive an interrupt for it's
  389. * outgoing IRQ_CPU_TO_EPU_ACK to us. If it ever does this, we get an
  390. * interrupt when it sends us an ack, but by the time we process it,
  391. * that flag in the SW2 status register has been cleared by the CPU
  392. * firmware. We'll prevent that not so useful condition from happening
  393. * by clearing the CPU's interrupt enables for Ack IRQ's we want to
  394. * process.
  395. */
  396. cx18_sw2_irq_disable_cpu(cx, IRQ_CPU_TO_EPU_ACK | IRQ_APU_TO_EPU_ACK);
  397. /* Try a benign command to see if the CPU is alive and well */
  398. sz = cx18_vapi_result(cx, api_args, CX18_CPU_DEBUG_PEEK32, 1, 0);
  399. if (sz < 0)
  400. return sz;
  401. /* initialize GPIO */
  402. cx18_write_reg_expect(cx, 0x14001400, 0xc78110, 0x00001400, 0x14001400);
  403. return 0;
  404. }