hw_init.c 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  1. /* This file is part of the program psim.
  2. Copyright 1994, 1997, 2003, 2004 Andrew Cagney
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef _HW_INIT_C_
  15. #define _HW_INIT_C_
  16. #include "device_table.h"
  17. #include "bfd.h"
  18. #include "psim.h"
  19. /* DMA a file into memory */
  20. static int
  21. dma_file(device *me,
  22. const char *file_name,
  23. unsigned_word addr)
  24. {
  25. int count;
  26. int inc;
  27. FILE *image;
  28. char buf[1024];
  29. /* get it open */
  30. image = fopen(file_name, "r");
  31. if (image == NULL)
  32. return -1;
  33. /* read it in slowly */
  34. count = 0;
  35. while (1) {
  36. inc = fread(buf, 1, sizeof(buf), image);
  37. if (inc <= 0)
  38. break;
  39. if (device_dma_write_buffer(device_parent(me),
  40. buf,
  41. 0 /*address-space*/,
  42. addr+count,
  43. inc /*nr-bytes*/,
  44. 1 /*violate ro*/) != inc) {
  45. fclose(image);
  46. return -1;
  47. }
  48. count += inc;
  49. }
  50. /* close down again */
  51. fclose(image);
  52. return count;
  53. }
  54. /* DEVICE
  55. file - load a file into memory
  56. DESCRIPTION
  57. Loads the entire contents of <file-name> into memory at starting at
  58. <<real-address>>. Assumes that memory exists for the load.
  59. PROPERTIES
  60. file-name = <string>
  61. Name of the file to be loaded into memory
  62. real-address = <integer>
  63. Real address at which the file is to be loaded */
  64. static void
  65. hw_file_init_data_callback(device *me)
  66. {
  67. int count;
  68. const char *file_name = device_find_string_property(me, "file-name");
  69. unsigned_word addr = device_find_integer_property(me, "real-address");
  70. /* load the file */
  71. count = dma_file(me, file_name, addr);
  72. if (count < 0)
  73. device_error(me, "Problem loading file %s\n", file_name);
  74. }
  75. static device_callbacks const hw_file_callbacks = {
  76. { NULL, hw_file_init_data_callback, },
  77. { NULL, }, /* address */
  78. { NULL, }, /* IO */
  79. { NULL, }, /* DMA */
  80. { NULL, }, /* interrupt */
  81. { NULL, }, /* unit */
  82. };
  83. /* DEVICE
  84. data - initialize a memory location with specified data
  85. DESCRIPTION
  86. The pseudo device <<data>> provides a mechanism specifying the
  87. initialization of a small section of memory.
  88. Normally, the data would be written using a dma operation.
  89. However, for some addresses this will not result in the desired
  90. result. For instance, to initialize an address in an eeprom,
  91. instead of a simple dma of the data, a sequence of writes (and then
  92. real delays) that program the eeprom would be required.
  93. For dma write initialization, the data device will write the
  94. specified <<data>> to <<real-address>> using a normal dma.
  95. For instance write initialization, the specified <<instance>> is
  96. opened. Then a seek to the <<real-address>> is performed followed
  97. by a write of the data.
  98. Integer properties are stored using the target's endian mode.
  99. PROPERTIES
  100. data = <any-valid-property> (required)
  101. Data to be loaded into memory. The property type determines how it
  102. is loaded.
  103. real-address = <integer> (required)
  104. Start address at which the data is to be stored.
  105. instance = <string> (optional)
  106. Instance specification of the device that is to be opened so that
  107. the specified data can be written to it.
  108. EXAMPLES
  109. The examples below illustrate the two alternative mechanisms that
  110. can be used to store the value 0x12345678 at address 0xfff00c00,
  111. which is normally part of the 512k system eeprom.
  112. If the eeprom is being modeled by ram (<<memory>> device) then the
  113. standard dma initialization can be used. By convention: the data
  114. devices are uniquely identified by argumenting them with the
  115. destinations real address; and all data devices are put under the
  116. node <</openprom/init>>.
  117. | /openprom/memory@0xfff00000/reg 0xfff00000 0x80000
  118. | /openprom/init/data@0x1000/data 0x12345678
  119. | /openprom/init/data@0x1000/real-address 0x1000
  120. If instead a real eeprom was being used the instance write method
  121. would instead need to be used (storing just a single byte in an
  122. eeprom requires a complex sequence of accesses). The
  123. <<real-address>> is specified as <<0x0c00>> which is the offset
  124. into the eeprom. For brevity, most of the eeprom properties have
  125. been omited.
  126. | /iobus/eeprom@0xfff00000/reg 0xfff00000 0x80000
  127. | /openprom/init/data@0xfff00c00/real-address 0x0c00
  128. | /openprom/init/data@0xfff00c00/data 0x12345667
  129. | /openprom/init/data@0xfff00c00/instance /iobus/eeprom@0xfff00000/reg
  130. BUGS
  131. At present, only <<integer>> properties can be specified for an
  132. initial data value.
  133. */
  134. static void
  135. hw_data_init_data_callback(device *me)
  136. {
  137. unsigned_word addr = device_find_integer_property(me, "real-address");
  138. const device_property *data = device_find_property(me, "data");
  139. const char *instance_spec = (device_find_property(me, "instance") != NULL
  140. ? device_find_string_property(me, "instance")
  141. : NULL);
  142. device_instance *instance = NULL;
  143. if (data == NULL)
  144. device_error(me, "missing property <data>\n");
  145. if (instance_spec != NULL)
  146. instance = tree_instance(me, instance_spec);
  147. switch (data->type) {
  148. case integer_property:
  149. {
  150. unsigned_cell buf = device_find_integer_property(me, "data");
  151. H2T(buf);
  152. if (instance == NULL) {
  153. if (device_dma_write_buffer(device_parent(me),
  154. &buf,
  155. 0 /*address-space*/,
  156. addr,
  157. sizeof(buf), /*nr-bytes*/
  158. 1 /*violate ro*/) != sizeof(buf))
  159. device_error(me, "Problem storing integer 0x%x at 0x%lx\n",
  160. (unsigned)buf, (unsigned long)addr);
  161. }
  162. else {
  163. if (device_instance_seek(instance, 0, addr) < 0
  164. || device_instance_write(instance, &buf, sizeof(buf)) != sizeof(buf))
  165. device_error(me, "Problem storing integer 0x%x at 0x%lx of instance %s\n",
  166. (unsigned)buf, (unsigned long)addr, instance_spec);
  167. }
  168. }
  169. break;
  170. default:
  171. device_error(me, "Write of this data is not yet implemented\n");
  172. break;
  173. }
  174. if (instance != NULL)
  175. device_instance_delete(instance);
  176. }
  177. static device_callbacks const hw_data_callbacks = {
  178. { NULL, hw_data_init_data_callback, },
  179. { NULL, }, /* address */
  180. { NULL, }, /* IO */
  181. { NULL, }, /* DMA */
  182. { NULL, }, /* interrupt */
  183. { NULL, }, /* unit */
  184. };
  185. /* DEVICE
  186. load-binary - load binary segments into memory
  187. DESCRIPTION
  188. Each loadable segment of the specified binary is loaded into memory
  189. at its required address. It is assumed that the memory at those
  190. addresses already exists.
  191. This device is normally used to load an executable into memory as
  192. part of real mode simulation.
  193. PROPERTIES
  194. file-name = <string>
  195. Name of the binary to be loaded.
  196. claim = <anything> (optional)
  197. If this property is present, the real memory that is to be used by
  198. the image being loaded will be claimed from the memory node
  199. (specified by the ihandle <</chosen/memory>>).
  200. BUGS
  201. When loading the binary the bfd virtual-address is used. It should
  202. be using the bfd load-address.
  203. */
  204. /* DEVICE
  205. map-binary - map the binary into the users address space
  206. DESCRIPTION
  207. Similar to load-binary except that memory for each segment is
  208. created before the corresponding data for the segment is loaded.
  209. This device is normally used to load an executable into a user mode
  210. simulation.
  211. PROPERTIES
  212. file-name = <string>
  213. Name of the binary to be loaded.
  214. */
  215. static void
  216. update_for_binary_section(bfd *abfd,
  217. asection *the_section,
  218. PTR obj)
  219. {
  220. unsigned_word section_vma;
  221. unsigned_word section_size;
  222. access_type access;
  223. device *me = (device*)obj;
  224. /* skip the section if no memory to allocate */
  225. if (! (bfd_section_flags (the_section) & SEC_ALLOC))
  226. return;
  227. /* check/ignore any sections of size zero */
  228. section_size = bfd_section_size (the_section);
  229. if (section_size == 0)
  230. return;
  231. /* find where it is to go */
  232. section_vma = bfd_section_vma (the_section);
  233. DTRACE(binary,
  234. ("name=%-7s, vma=0x%.8lx, size=%6ld, flags=%3lx(%s%s%s%s%s )\n",
  235. bfd_section_name (the_section),
  236. (long)section_vma,
  237. (long)section_size,
  238. (long)bfd_section_flags (the_section),
  239. bfd_section_flags (the_section) & SEC_LOAD ? " LOAD" : "",
  240. bfd_section_flags (the_section) & SEC_CODE ? " CODE" : "",
  241. bfd_section_flags (the_section) & SEC_DATA ? " DATA" : "",
  242. bfd_section_flags (the_section) & SEC_ALLOC ? " ALLOC" : "",
  243. bfd_section_flags (the_section) & SEC_READONLY ? " READONLY" : ""
  244. ));
  245. /* If there is an .interp section, it means it needs a shared library interpreter. */
  246. if (strcmp(".interp", bfd_section_name (the_section)) == 0)
  247. error("Shared libraries are not yet supported.\n");
  248. /* determine the devices access */
  249. access = access_read;
  250. if (bfd_section_flags (the_section) & SEC_CODE)
  251. access |= access_exec;
  252. if (!(bfd_section_flags (the_section) & SEC_READONLY))
  253. access |= access_write;
  254. /* if claim specified, allocate region from the memory device */
  255. if (device_find_property(me, "claim") != NULL) {
  256. device_instance *memory = tree_find_ihandle_property(me, "/chosen/memory");
  257. unsigned_cell mem_in[3];
  258. unsigned_cell mem_out[1];
  259. mem_in[0] = 0; /*alignment - top-of-stack*/
  260. mem_in[1] = section_size;
  261. mem_in[2] = section_vma;
  262. if (device_instance_call_method(memory, "claim", 3, mem_in, 1, mem_out) < 0)
  263. device_error(me, "failed to claim memory for section at 0x%lx (0x%lx",
  264. (unsigned long)section_vma,
  265. (unsigned long)section_size);
  266. if (mem_out[0] != section_vma)
  267. device_error(me, "section address not as requested");
  268. }
  269. /* if a map, pass up a request to create the memory in core */
  270. if (strncmp(device_name(me), "map-binary", strlen("map-binary")) == 0)
  271. device_attach_address(device_parent(me),
  272. attach_raw_memory,
  273. 0 /*address space*/,
  274. section_vma,
  275. section_size,
  276. access,
  277. me);
  278. /* if a load dma in the required data */
  279. if (bfd_section_flags (the_section) & SEC_LOAD) {
  280. void *section_init = zalloc(section_size);
  281. if (!bfd_get_section_contents(abfd,
  282. the_section,
  283. section_init, 0,
  284. section_size)) {
  285. bfd_perror("binary");
  286. device_error(me, "load of data failed");
  287. return;
  288. }
  289. if (device_dma_write_buffer(device_parent(me),
  290. section_init,
  291. 0 /*space*/,
  292. section_vma,
  293. section_size,
  294. 1 /*violate_read_only*/)
  295. != section_size)
  296. device_error(me, "broken transfer\n");
  297. free(section_init); /* only free if load */
  298. }
  299. }
  300. static void
  301. hw_binary_init_data_callback(device *me)
  302. {
  303. /* get the file name */
  304. const char *file_name = device_find_string_property(me, "file-name");
  305. bfd *image;
  306. /* open the file */
  307. image = bfd_openr(file_name, NULL);
  308. if (image == NULL) {
  309. bfd_perror("binary");
  310. device_error(me, "Failed to open file %s\n", file_name);
  311. }
  312. /* check it is valid */
  313. if (!bfd_check_format(image, bfd_object)) {
  314. bfd_close(image);
  315. device_error(me, "The file %s has an invalid binary format\n", file_name);
  316. }
  317. /* and the data sections */
  318. bfd_map_over_sections(image,
  319. update_for_binary_section,
  320. (PTR)me);
  321. bfd_close(image);
  322. }
  323. static device_callbacks const hw_binary_callbacks = {
  324. { NULL, hw_binary_init_data_callback, },
  325. { NULL, }, /* address */
  326. { NULL, }, /* IO */
  327. { NULL, }, /* DMA */
  328. { NULL, }, /* interrupt */
  329. { NULL, }, /* unit */
  330. };
  331. /* DEVICE
  332. stack - create an initial stack frame in memory
  333. DESCRIPTION
  334. Creates a stack frame of the specified type in memory.
  335. Due to the startup sequence gdb uses when commencing a simulation,
  336. it is not possible for the data to be placed on the stack to be
  337. specified as part of the device tree. Instead the arguments to be
  338. pushed onto the stack are specified using an IOCTL call.
  339. The IOCTL takes the additional arguments:
  340. | unsigned_word stack_end -- where the stack should come down from
  341. | char **argv -- ...
  342. | char **envp -- ...
  343. PROPERTIES
  344. stack-type = <string>
  345. The form of the stack frame that is to be created.
  346. */
  347. static int
  348. sizeof_argument_strings(char **arg)
  349. {
  350. int sizeof_strings = 0;
  351. /* robust */
  352. if (arg == NULL)
  353. return 0;
  354. /* add up all the string sizes (padding as we go) */
  355. for (; *arg != NULL; arg++) {
  356. int len = strlen(*arg) + 1;
  357. sizeof_strings += ALIGN_8(len);
  358. }
  359. return sizeof_strings;
  360. }
  361. static int
  362. number_of_arguments(char **arg)
  363. {
  364. int nr;
  365. if (arg == NULL)
  366. return 0;
  367. for (nr = 0; *arg != NULL; arg++, nr++);
  368. return nr;
  369. }
  370. static int
  371. sizeof_arguments(char **arg)
  372. {
  373. return ALIGN_8((number_of_arguments(arg) + 1) * sizeof(unsigned_word));
  374. }
  375. static void
  376. write_stack_arguments(device *me,
  377. char **arg,
  378. unsigned_word start_block,
  379. unsigned_word end_block,
  380. unsigned_word start_arg,
  381. unsigned_word end_arg)
  382. {
  383. DTRACE(stack,
  384. ("write_stack_arguments(device=%s, arg=%p, start_block=0x%lx, end_block=0x%lx, start_arg=0x%lx, end_arg=0x%lx)\n",
  385. device_name(me), arg, (long)start_block, (long)end_block, (long)start_arg, (long)end_arg));
  386. if (arg == NULL)
  387. device_error(me, "Attempt to write a null array onto the stack\n");
  388. /* only copy in arguments, memory is already zero */
  389. for (; *arg != NULL; arg++) {
  390. int len = strlen(*arg)+1;
  391. unsigned_word target_start_block;
  392. DTRACE(stack,
  393. ("write_stack_arguments() write %s=%s at %s=0x%lx %s=0x%lx %s=0x%lx\n",
  394. "**arg", *arg, "start_block", (long)start_block,
  395. "len", (long)len, "start_arg", (long)start_arg));
  396. if (psim_write_memory(device_system(me), 0, *arg,
  397. start_block, len,
  398. 0/*violate_readonly*/) != len)
  399. device_error(me, "Write of **arg (%s) at 0x%lx of stack failed\n",
  400. *arg, (unsigned long)start_block);
  401. target_start_block = H2T_word(start_block);
  402. if (psim_write_memory(device_system(me), 0, &target_start_block,
  403. start_arg, sizeof(target_start_block),
  404. 0) != sizeof(target_start_block))
  405. device_error(me, "Write of *arg onto stack failed\n");
  406. start_block += ALIGN_8(len);
  407. start_arg += sizeof(start_block);
  408. }
  409. start_arg += sizeof(start_block); /*the null at the end*/
  410. if (start_block != end_block
  411. || ALIGN_8(start_arg) != end_arg)
  412. device_error(me, "Probable corrpution of stack arguments\n");
  413. DTRACE(stack, ("write_stack_arguments() = void\n"));
  414. }
  415. static void
  416. create_ppc_elf_stack_frame(device *me,
  417. unsigned_word bottom_of_stack,
  418. char **argv,
  419. char **envp)
  420. {
  421. /* fixme - this is over aligned */
  422. /* information block */
  423. const unsigned sizeof_envp_block = sizeof_argument_strings(envp);
  424. const unsigned_word start_envp_block = bottom_of_stack - sizeof_envp_block;
  425. const unsigned sizeof_argv_block = sizeof_argument_strings(argv);
  426. const unsigned_word start_argv_block = start_envp_block - sizeof_argv_block;
  427. /* auxiliary vector - contains only one entry */
  428. const unsigned sizeof_aux_entry = 2*sizeof(unsigned_word); /* magic */
  429. const unsigned_word start_aux = start_argv_block - ALIGN_8(sizeof_aux_entry);
  430. /* environment points (including null sentinal) */
  431. const unsigned sizeof_envp = sizeof_arguments(envp);
  432. const unsigned_word start_envp = start_aux - sizeof_envp;
  433. /* argument pointers (including null sentinal) */
  434. const int argc = number_of_arguments(argv);
  435. const unsigned sizeof_argv = sizeof_arguments(argv);
  436. const unsigned_word start_argv = start_envp - sizeof_argv;
  437. /* link register save address - aligned to a 16byte boundary */
  438. const unsigned_word top_of_stack = ((start_argv
  439. - 2 * sizeof(unsigned_word))
  440. & ~0xf);
  441. /* install arguments on stack */
  442. write_stack_arguments(me, envp,
  443. start_envp_block, bottom_of_stack,
  444. start_envp, start_aux);
  445. write_stack_arguments(me, argv,
  446. start_argv_block, start_envp_block,
  447. start_argv, start_envp);
  448. /* set up the registers */
  449. ASSERT (psim_write_register(device_system(me), -1,
  450. &top_of_stack, "sp", cooked_transfer) > 0);
  451. ASSERT (psim_write_register(device_system(me), -1,
  452. &argc, "r3", cooked_transfer) > 0);
  453. ASSERT (psim_write_register(device_system(me), -1,
  454. &start_argv, "r4", cooked_transfer) > 0);
  455. ASSERT (psim_write_register(device_system(me), -1,
  456. &start_envp, "r5", cooked_transfer) > 0);
  457. ASSERT (psim_write_register(device_system(me), -1,
  458. &start_aux, "r6", cooked_transfer) > 0);
  459. }
  460. static void
  461. create_ppc_aix_stack_frame(device *me,
  462. unsigned_word bottom_of_stack,
  463. char **argv,
  464. char **envp)
  465. {
  466. unsigned_word core_envp;
  467. unsigned_word core_argv;
  468. unsigned_word core_argc;
  469. unsigned_word core_aux;
  470. unsigned_word top_of_stack;
  471. /* cheat - create an elf stack frame */
  472. create_ppc_elf_stack_frame(me, bottom_of_stack, argv, envp);
  473. /* extract argument addresses from registers */
  474. ASSERT (psim_read_register(device_system(me), 0,
  475. &top_of_stack, "r1", cooked_transfer) > 0);
  476. ASSERT (psim_read_register(device_system(me), 0,
  477. &core_argc, "r3", cooked_transfer) > 0);
  478. ASSERT (psim_read_register(device_system(me), 0,
  479. &core_argv, "r4", cooked_transfer) > 0);
  480. ASSERT (psim_read_register(device_system(me), 0,
  481. &core_envp, "r5", cooked_transfer) > 0);
  482. ASSERT (psim_read_register(device_system(me), 0,
  483. &core_aux, "r6", cooked_transfer) > 0);
  484. /* extract arguments from registers */
  485. device_error(me, "Unfinished procedure create_ppc_aix_stack_frame\n");
  486. }
  487. static void
  488. create_ppc_chirp_bootargs(device *me,
  489. char **argv)
  490. {
  491. /* concat the arguments */
  492. char args[1024];
  493. char **chp = argv + 1;
  494. args[0] = '\0';
  495. while (*chp != NULL) {
  496. if (strlen(args) > 0)
  497. strcat(args, " ");
  498. if (strlen(args) + strlen(*chp) >= sizeof(args))
  499. device_error(me, "buffer overflow");
  500. strcat(args, *chp);
  501. chp++;
  502. }
  503. /* set the arguments property */
  504. tree_parse(me, "/chosen/bootargs \"%s", args);
  505. }
  506. static int
  507. hw_stack_ioctl(device *me,
  508. cpu *processor,
  509. unsigned_word cia,
  510. device_ioctl_request request,
  511. va_list ap)
  512. {
  513. switch (request) {
  514. case device_ioctl_create_stack:
  515. {
  516. unsigned_word stack_pointer = va_arg(ap, unsigned_word);
  517. char **argv = va_arg(ap, char **);
  518. char **envp = va_arg(ap, char **);
  519. const char *stack_type;
  520. DTRACE(stack,
  521. ("stack_ioctl_callback(me=%p:%s processor=%p cia=0x%lx argv=%p envp=%p)\n",
  522. me, device_name(me),
  523. processor,
  524. (long)cia,
  525. argv,
  526. envp));
  527. stack_type = device_find_string_property(me, "stack-type");
  528. if (strcmp(stack_type, "ppc-elf") == 0)
  529. create_ppc_elf_stack_frame(me, stack_pointer, argv, envp);
  530. else if (strcmp(stack_type, "ppc-xcoff") == 0)
  531. create_ppc_aix_stack_frame(me, stack_pointer, argv, envp);
  532. else if (strcmp(stack_type, "chirp") == 0)
  533. create_ppc_chirp_bootargs(me, argv);
  534. else if (strcmp(stack_type, "none") != 0)
  535. device_error(me, "Unknown initial stack frame type %s", stack_type);
  536. DTRACE(stack,
  537. ("stack_ioctl_callback() = void\n"));
  538. break;
  539. }
  540. default:
  541. device_error(me, "Unsupported ioctl requested");
  542. break;
  543. }
  544. return 0;
  545. }
  546. static device_callbacks const hw_stack_callbacks = {
  547. { NULL, },
  548. { NULL, }, /* address */
  549. { NULL, }, /* IO */
  550. { NULL, }, /* DMA */
  551. { NULL, }, /* interrupt */
  552. { NULL, }, /* unit */
  553. NULL, /* instance */
  554. hw_stack_ioctl,
  555. };
  556. const device_descriptor hw_init_device_descriptor[] = {
  557. { "file", NULL, &hw_file_callbacks },
  558. { "data", NULL, &hw_data_callbacks },
  559. { "load-binary", NULL, &hw_binary_callbacks },
  560. { "map-binary", NULL, &hw_binary_callbacks },
  561. { "stack", NULL, &hw_stack_callbacks },
  562. { NULL },
  563. };
  564. #endif /* _HW_INIT_C_ */