The code originates from the report_rom server. This patch makes the code easy to reuse in other components.