int internal_ibist( ibConf_t *conf, int ist ) { int retval; ppoll_config_ioctl_t cmd; if( conf->is_interface == 0 ) { setIberr( EARG ); return -1; } retval = query_ist( interfaceBoard( conf ) ); if( retval < 0 ) return retval; setIberr( retval ); // set iberr to old ist value cmd.config = 0; cmd.set_ist = 0; cmd.clear_ist = 0; if( ist ) cmd.set_ist = 1; else cmd.clear_ist = 1; retval = ioctl( interfaceBoard( conf )->fileno, IBPPC, &cmd ); if( retval < 0 ) { setIberr( EDVR ); setIbcnt( errno ); return -1; } return 0; }
void main(void) { /* First, copy the boot header into the "zeropage" */ copy_boot_params(); /* End of heap check */ if (boot_params.hdr.loadflags & CAN_USE_HEAP) { heap_end = (char *)(boot_params.hdr.heap_end_ptr +0x200-STACK_SIZE); } else { /* Boot protocol 2.00 only, no heap available */ puts("WARNING: Ancient bootloader, some functionality " "may be limited!\n"); } /* Make sure we have all the proper CPU support */ if (validate_cpu()) { puts("Unable to boot - please use a kernel appropriate " "for your CPU.\n"); die(); } /* Tell the BIOS what CPU mode we intend to run in. */ set_bios_mode(); /* Detect memory layout */ detect_memory(); /* Set keyboard repeat rate (why?) */ keyboard_set_repeat(); /* Set the video mode */ set_video(); /* Query MCA information */ query_mca(); /* Voyager */ #ifdef CONFIG_X86_VOYAGER query_voyager(); #endif /* Query Intel SpeedStep (IST) information */ query_ist(); /* Query APM information */ #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) query_apm_bios(); #endif /* Query EDD information */ #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) query_edd(); #endif /* Do the last things and invoke protected mode */ go_to_protected_mode(); }