Exemple #1
0
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
{
/* Initialize the filter driver. */
	int r;

	r = parse_arguments(env_argc, env_argv);
	if(r != OK) {
		printf("Filter: wrong argument!\n");
		return 1;
	}

	if ((buf_array = flt_malloc(BUF_SIZE, NULL, 0)) == NULL)
		panic("no memory available");

	sum_init();

	driver_init();

	/* Subscribe to driver events for VFS drivers. */
	r = ds_subscribe("drv\\.vfs\\..*", DSF_INITIAL | DSF_OVERWRITE);
	if(r != OK) {
		panic("Filter: can't subscribe to driver events");
	}

	/* Announce we are up! */
	driver_announce();

	return(OK);
}
Exemple #2
0
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
{
/* Initialize the rtl8169 driver. */
	unsigned left;

	/* Select a buffer that can safely be used for dma transfers.  
	 * Its absolute address is 'DmaPhys', the normal address is 'DmaPtr'.
	 */
#if (CHIP == INTEL)
	DmaPtr = DmaBuffer;
	sys_umap(SELF, D, (vir_bytes)DmaBuffer, sizeof(DmaBuffer), &DmaPhys);

	if((left = dma_bytes_left(DmaPhys)) < DMA_SIZE) {
		/* First half of buffer crosses a 64K boundary, can't DMA into that */
		DmaPtr += left;
		DmaPhys += left;
	}
#else /* CHIP != INTEL */
	panic("initialization failed: CHIP != INTEL: %d", 0);
#endif /* CHIP == INTEL */

	/* Announce we are up! */
	driver_announce();

	return(OK);
}
Exemple #3
0
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
{
/* Initialize the sb16 mixer driver. */
	/* Announce we are up! */
	driver_announce();

	return(OK);
}
/*===========================================================================*
 *		            sef_cb_init_fresh                                *
 *===========================================================================*/
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
{
/* Initialize the pipe file server. */
  int i;

  /* Initialize main loop parameters. */
  exitsignaled = 0;	/* No exit request seen yet. */
  busy = 0;		/* Server is not 'busy' (i.e., inodes in use). */

  /* Init inode table */
  for (i = 0; i < NR_INODES; ++i) {
	inode[i].i_count = 0;
  }
	
  init_inode_cache();
  uds_init();

  SELF_E = getprocnr();
  buf_pool();

  driver_announce();

  return(OK);
}