[PATCH v2.5 1/3] firmware: Factor out the paged buffer handling code