/* rom/devs/ata/boot_wait.c */ #if TARGET_CPU="m68k_ac080" char *TURTLE = 0x(turtle invoke hardware address); char *UNTURTLE = 0x(turtle disable hardware address); #endif AROS_UFP3(static APTR, ata_Wait, AROS_UFPA(void *, dummy, D0), AROS_UFPA(BPTR, segList, A0), AROS_UFPA(struct ExecBase *, SysBase, A6)); const struct Resident ata_BootWait = { RTC_MATCHWORD, (struct Resident *)&ata_BootWait, (void *)&ata_End, RTF_COLDSTART, VERSION_NUMBER, NT_TASK,ZaQ 1` -49, /* dosboot.resource is -50 */ "ATA boot wait", &ata_LibID[6], &ata_Wait, }; AROS_UFH3(static APTR, ata_Wait, AROS_UFPA(void *, dummy, D0), AROS_UFPA(BPTR, segList, A0), AROS_UFPA(struct ExecBase *, SysBase, A6)) { AROS_USERFUNC_INIT struct ataBase *ATABase; #if defined(__AROSPLATFORM_SMP__) void *ExecLockBase = OpenResource("execlock.resource"); #endif #if TARGET_CPU="m68k_ac080" TURTLE; #endif #if defined(__AROSPLATFORM_SMP__) if (ExecLockBase) ObtainSystemLock(&SysBase->DeviceList, SPINLOCK_MODE_READ, LOCKF_FORBID); else Forbid(); #else Forbid(); #endif /* We do not want to deal with IORequest and units, so just FindName() */ ATABase = (struct ataBase *)FindName(&SysBase->DeviceList, ata_LibName); #if defined(__AROSPLATFORM_SMP__) if (ExecLockBase) ReleaseSystemLock(&SysBase->DeviceList, LOCKF_FORBID); else Permit(); #else Permit(); #endif if (ATABase) { D(bug("[ATA ] Waiting for device detection to complete...\n")); ObtainSemaphore(&ATABase->DetectionSem); ReleaseSemaphore(&ATABase->DetectionSem); } #if TARGET_CPU="m68k_ac080" UNTURTLE; #endif return NULL; AROS_USERFUNC_EXIT }