void mainboard_romstage_entry(unsigned long bist) { int boot_mode = 0; if (bist == 0) enable_lapic(); sch_enable_lpc(); console_init(); /* Halt if there was a built in self test failure */ // report_bist_failure(bist); // outl (0x00, 0x1088); /* * Perform some early chipset initialization required * before RAM initialization can work. */ sch_early_initialization(); sdram_initialize(boot_mode); sch_shadow_CMC(); poulsbo_setup_Stage1Regs(); poulsbo_setup_Stage2Regs(); #if 0 sch_SMbase_init(); /* Perform some initialization that must run before stage2. */ #endif /* * This should probably go away. Until now it is required * and mainboard specific. */ /* Chipset Errata! */ pci_write_config16(PCI_DEV(0, 0x2, 0), GGC, 0x20); pci_write_config32(PCI_DEV(0, 0x2, 0), 0xc4, 0x00000002); pci_write_config32(PCI_DEV(0, 0x2, 0), 0xe0, 0x00008000); pci_write_config32(PCI_DEV(0, 0x2, 0), 0xf0, 0x00000005); pci_write_config16(PCI_DEV(0, 0x2, 0), 0xf7, 0x80); pci_write_config16(PCI_DEV(0, 0x2, 0), 0x4, 0x7); #if RFID_TEST sch_SMbase_init(); selectcard(); #endif }
int strategy( const int hd[], const int fd[], int cg, int tk, const int ud[], int us) { int myhd[HNUM]; int select = -1; int hdcopy[CNUM]; int udcopy[us]; int currentpoint = 0; int deck[CNUM] = { 0 }; int decknum = CNUM; int k; // 最初から高い点なら手札を変えずに終了 arr_copy( hdcopy, hd, HNUM); currentpoint = poker_point(hdcopy); if ( currentpoint >= P6 ) { return -1; } arr_copy( udcopy, ud, us ); decknum = makedeck( hdcopy, udcopy, us, deck ); select = selectcard(hdcopy, cg, tk, udcopy, us, deck, decknum ); return select; }