Well, the internet is pretty much full of this subject, even so I spent 2 hours to solve this. Because information is a bit outdated. So here is my very brief version:
1. Download AHCI drivers from Intel
I needed XP professional, english so got: http://downloadmirror.intel.com/18859
/eng/iata96enu.exe If you need something else or link is no longer available try to find your drivers at: http://downloadcenter.intel.com
2. THIS TOOK ME MUCH TO FIND-OUT HOW: extract the drivers from the iata96enu.exe like this (in the command prompt line):
c:\> iata96enu.exe -a -p c:\drivers
3. Follow the excellent instructions (even with pictures!) from http://www.docstoc.com/docs/29315686/How-To-Slipstream-Windows-XP-With-AMD-SATA-AHCI-Driver but adapt them to your Intel drivers already extracted in our step 2.
It worked for me this way. And, it wasn't a matter of installing windows in IDE compatible mode (from BIOS) and then changing it to ahci after installing Windows and the drivers from Intel.
The stupid laptop I had to install wasn't running at all in IDE mode! Not even booting the CD. It just freezed...
Btw, it's a Emachines E525.