| 112 | } |
| 113 | |
| 114 | static void rmodule_copy_payload(const struct rmodule *module) |
| 115 | { |
| 116 | printk(BIOS_DEBUG, "Loading module at %p with entry %p. " |
| 117 | "filesize: 0x%x memsize: 0x%x\n", |
| 118 | module->location, rmodule_entry(module), |
| 119 | module->payload_size, rmodule_memory_size(module)); |
| 120 | |
| 121 | /* No need to copy the payload if the load location and the |
| 122 | * payload location are the same. */ |
| 123 | if (module->location == module->payload) |
| 124 | return; |
| 125 | |
| 126 | memcpy(module->location, module->payload, module->payload_size); |
| 127 | } |
| 128 | |
| 129 | static int rmodule_relocate(const struct rmodule *module) |
| 130 | { |
no test coverage detected