But if sleep is a function of the OS and not the bios, then why do I have to go into the bios to enable s1, s3 or s4?
My description was meant to be very brief and to the point. As I'm sure you're aware, in practice it's a lot more complex.
Both sleep and hibernate require the cooperation of the OS and the BIOS. However when it comes down to it the OS is in charge of sleeping, while the BIOS is in charge of hibernation.
In the case of sleep the idea is that the OS continues to manage the system, and that its primary role is to direct other devices when and how to go in and out if their own sleep states. This is very fast (because the devices don't need reinitialized as the BIOS level), but it requires that the OS have an in-depth knowledge of each device (though its driver) to know how to bring it in and our of sleep.
The BIOS factors into all of this as it serves two important roles. First and foremost, it's the watchdog for the OS. When the OS goes to sleep its the BIOS's job to watch for wakeup timers and wakeup events, and in turn pass those on to the OS. The second role of course is that the BIOS needs to know to shut down the CPU while keeping the RAM powered up, and what the right order of operations is to wake the OS back up.
Hibernation on the other hand is simpler in many ways. The RAM gets written out to the hibernation file, and then most system components are cleanly shut down. The BIOS is in turn left with the task of monitoring for wakeup events, and knows that its in hibernation mode and can skip POST events when it wakes up. Once the system does wake up, it quickly reinitializes every device and begins loading the contents of RAM from disk.
Hibernation in practice is far closer to a special case of booting a computer, where you get to skip a bunch of stuff. But the important part is that everything is fully shut down when going into hibernation, which saves the most power but is also why most devices require full reinitialization.
Really, the most important thing to understand about sleep and hibernation is the difference in their design philosophies.
Sleep: How much stuff can we power down without requiring reinitialization, and how do we do it? The emphasis is on speed over power savings, leading to devices being left in a low power state (as opposed to powered down) so that they can be resumed quickly. The OS is responsible for goggy devices.
Hibernation: What shortcuts can we take to bring a system back to a usable state after a complete power down and reinitialization? The emphasis is on power savings ahead of speed, in the sense that we're trying to resume the system as quickly as possible
without surrendering any of the power savings of a complete power down. The BIOS is responsible for groggy devices.
Think of it like herding school children. Hibernation is the equivalent of parents (BIOS) waking their kids up and preparing them for school (the OS), while Sleep is the equivalent of parents pulling their kids out of bed and dropping them off at school as-is. Sleep is faster for the parents, but it's hell on the school.
