[PATCH 10/19] spl: Split out bootstage ID into a function