ahci: rework init workflow & fix timeout handling

Rework init workflow to match suggestions in the ahci specs better,
especially remove the shortcut which tries to detect drives without
enabling FIS receiving.  This makes memory allocation a bit complicated
as we are using malloc_tmp() allocated memory now to probe the devices
so we can free it when no drive is present.  In case we detect a drive
we have to free and realloc the memory with malloc_low() so it is
available after POST when the boot loader wants read stuff via int13.

Also use TSC to calculate timeout instead of delays and loop counts.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
1 file changed
tree: 4d6f3406ec1e44759cf7bea43957f11a8db04892
  1. src/
  2. tools/
  3. vgasrc/
  4. .gitignore
  7. Makefile
  9. TODO