Ejemplo n.º 1
0
int __attribute__((weak)) main (void)
{
	OMM_machine_t *machine = machine_setup();

    while (1)
    {
    	printf("\r\nStarting Test for %s\r\n", machine->name);

    	MICRO_UNIT_RUN_SUITE(test_suite);
    	MICRO_UNIT_REPORT();

    	while(1)
    	{
    		OMM_busy_delay(500);
    	}
    }
}
Ejemplo n.º 2
0
Archivo: main.c Proyecto: AndrewD/prex
/*
 * C entry point
 */
void
loader_main(void)
{
	paddr_t kernel_entry;

	/*
	 * Initialize data.
	 */
	memset(bootinfo, 0, BOOTINFO_SIZE);

	load_base = 0;
	load_start = 0;
	nr_img = 0;

	/*
	 * Setup minimum hardware for boot (may include machine_putc()).
	 */
	machine_setup();

	DPRINTF(("Prex Boot Loader V1.00\n"));

	/*
	 * Load program image.
	 */
	setup_image();
#if defined(DEBUG) && defined(DEBUG_BOOTINFO)
	dump_bootinfo();
#endif
	/*
	 * Jump to the kernel entry point
	 * via machine-dependent code.
	 */
	kernel_entry = (paddr_t)phys_to_virt(bootinfo->kernel.entry);

	DPRINTF(("kernel_entry=%x\n", kernel_entry));
	DPRINTF(("Entering kernel...\n\n"));

	start_kernel(kernel_entry);

	/* NOTREACHED */
}
Ejemplo n.º 3
0
Archivo: ddl-main.c Proyecto: mpw/p2
void
main (int argc, char *argv[])
{
  int command_line_arg;
  int unused;

  /* Machine specific initialization. (JAT) */

  machine_setup();

  /* Error initialization. */

  program_name = "ddl";

  /* Set defaults */

  yydebug = 0;
  min_warning_priority = DRC_MIN_WARNING_PRIORITY + 2;

  /* Parse command line arguments. */

  while ((command_line_arg
          = getopt_long(argc, argv, "dhvw", long_options, &unused)) != -1) {
    switch (command_line_arg) {
    case 'd':
      yydebug = 1;
      break;
    case 'h':
      print_help_information(long_options, options_help);
      exit(EXIT_SUCCESS);
      break;
    case 'v':
      printf("p2 version %s\n", version_string);
      exit(EXIT_SUCCESS);
      break;
    case 'w':
      min_warning_priority = 1; /* Enable all warnings. */
      break;
    case '?':
      calling_error("illegal or unrecognized option");
      break;
    }
  }

  if (optind == argc) 
    calling_error("ddl takes exactly one argument");
  
  /* Parse input file name and open input file. */

  parse_input_file_name(argv[optind], file_name);

  yyin = fopen(file_name, "r");
  if (yyin == NULL)
    error("Can't open file %s\n", file_name);

  /* Parse. */

  if (yyparse() != 0)
    error("parsing failed");

  /* Exit. */

  exit(EXIT_SUCCESS);
}
Ejemplo n.º 4
0
Archivo: xp-main.c Proyecto: mpw/p2
int
main (int argc, char *argv[])
{
  int command_line_arg;
  int unused;

  /* Machine specific initialization. (JAT) */

  machine_setup();

  /* Error initialization. */

  program_name = "xp";

  /* Set defaults. */

  yydebug = 0;
  enable_hierarchy_comments = 0;
  min_warning_priority = DRC_MIN_WARNING_PRIORITY + 2;

  while ((command_line_arg
          = getopt_long(argc, argv, "cdhvw", long_options, &unused)) != -1) {
    switch (command_line_arg) {
    case 'c':
      enable_hierarchy_comments = 1;
      break;
    case 'd':
      yydebug = 1;
      break;
    case 'h':
      print_help_information(long_options, options_help);
      exit(EXIT_SUCCESS);
      break;
    case 'v':
      printf("xp version %s\n", version_string);
      exit(EXIT_SUCCESS);
      break;
    case 'w':
      min_warning_priority = 1; /* Enable all warnings. */
      break;
    case '?':
      calling_error("illegal or unrecognized option");
      break;
    }
  }

  if (optind == argc)
    calling_error("xp takes exactly one argument");

  /* Parse input file name and open input file. */

  {
    char layer_name[MAX_IDENT_LEN];
    char *s;

    strcpy(layer_name, argv[optind]);
    s = strrchr(layer_name, '.');
    if (s != NULL) {
      *s++ = '\0';
      if (strcmp(s, "xp") != 0)
        calling_error("illegal file name extension %s", s);
    }
    sprintf(file_name, "%s.nxp", layer_name);
    sprintf(cdef_name, "%s.cdef", layer_name);
    sprintf(kdef_name, "%s.kdef", layer_name);

    yyin = fopen(file_name, "r");
    if (yyin == NULL)
      error("Can't open file %s", file_name);
  }

  /* Find minimum and maximum layer operation numbers. */ 

  {
    int i;

    min_special_op = max_special_op = op_tab[0].op_num;

    for(i = 0; op_tab[i].op_num; i++)
    {
      if (min_special_op > op_tab[i].op_num)
        min_special_op = op_tab[i].op_num;
      else if (max_special_op < op_tab[i].op_num)
        max_special_op = op_tab[i].op_num;
#ifndef NDEBUG
      /* Make sure operation table initialization values are in the
         legal range. */
      if (op_tab[i].num_arg < 0 || op_tab[i].num_arg > MAX_OP_PARAM)
        error("operation %s: number of arguments %d must be in range 1...%d",
              op_tab[i].name, op_tab[i].num_arg, MAX_OP_PARAM);
      if (strlen(op_tab[i].constname) >= CONSTNAME_LEN)
        error("operation %s: length of operation number constant > %d",
              op_tab[i].name, CONSTNAME_LEN);
      if (strlen(op_tab[i].proc) > PROC_LEN)
        error("operation %s: length of operation argument list > %d",
              op_tab[i].name, PROC_LEN);
      if (strlen(op_tab[i].oparglist) > OPARGLIST_LEN)
        error("operation %s: length of operation argument list > %d",
              op_tab[i].name, OPARGLIST_LEN);
#endif      
    }
  }

  /* Initialize. */

  init_type_system();
  member_ctype = UNDEFINED_CTYPE;

  {
    int q;
    for(q = 0; q < MAX_NUM_OPS+1; q++)
      seen[q] = FALSE;
  }
  
  /* Parse. */

  if (yyparse() != 0)
    error("parsing failed");

  /* Report. */

  have_all_operations_been_seen();

  /* Generate layerdef. */

  gen_layerdef();

  /* Exit. */

  exit(EXIT_SUCCESS);
}