|
@@ -218,6 +218,7 @@ static struct multiboot_module __data16_array ( mbmodules, [MAX_MODULES] );
|
218
|
218
|
* @ret rc Return status code
|
219
|
219
|
*/
|
220
|
220
|
static int multiboot_exec ( struct image *image ) {
|
|
221
|
+ physaddr_t entry = image->priv.phys;
|
221
|
222
|
|
222
|
223
|
/* Populate multiboot information structure */
|
223
|
224
|
memset ( &mbinfo, 0, sizeof ( mbinfo ) );
|
|
@@ -241,7 +242,7 @@ static int multiboot_exec ( struct image *image ) {
|
241
|
242
|
__asm__ __volatile__ ( PHYS_CODE ( "call *%%edi\n\t" )
|
242
|
243
|
: : "a" ( MULTIBOOT_BOOTLOADER_MAGIC ),
|
243
|
244
|
"b" ( virt_to_phys ( &mbinfo ) ),
|
244
|
|
- "D" ( image->entry )
|
|
245
|
+ "D" ( entry )
|
245
|
246
|
: "ecx", "edx", "esi", "ebp", "memory" );
|
246
|
247
|
|
247
|
248
|
DBGC ( image, "MULTIBOOT %p returned\n", image );
|
|
@@ -328,8 +329,8 @@ static int multiboot_load_raw ( struct image *image,
|
328
|
329
|
/* Copy image to segment */
|
329
|
330
|
memcpy_user ( buffer, 0, image->data, offset, filesz );
|
330
|
331
|
|
331
|
|
- /* Record execution entry point */
|
332
|
|
- image->entry = hdr->mb.entry_addr;
|
|
332
|
+ /* Record execution entry point in image private data field */
|
|
333
|
+ image->priv.phys = hdr->mb.entry_addr;
|
333
|
334
|
|
334
|
335
|
return 0;
|
335
|
336
|
}
|