Current boot stage?

Hi.

How can a driver get the current boot stage?
(BOOT_START, SYSTEM_START, next is what…?, etc…)

I want to do something only while in BOOT_START stage.

Thank you.