Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Capable of starting a multiboot kernel (albeit without the multiboot
information table yet).
  • Loading branch information
Michael Brown committed Jan 11, 2007
1 parent 9196e90 commit dc51af5
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/arch/i386/image/multiboot.c
Expand Up @@ -74,8 +74,21 @@ struct multiboot_header_info {
* @v image ELF file
* @ret rc Return status code
*/
static int multiboot_execute ( struct image *image __unused ) {
return -ENOTSUP;
static int multiboot_execute ( struct image *image ) {
struct multiboot_info mbinfo;

/* Populate multiboot information structure */
memset ( &mbinfo, 0, sizeof ( mbinfo ) );


/* Jump to OS with flat physical addressing */
__asm__ ( PHYS_CODE ( "call *%%edi\n\t" )
: : "a" ( MULTIBOOT_BOOTLOADER_MAGIC ),
"b" ( virt_to_phys ( &mbinfo ) ),
"D" ( image->entry )
: "ecx", "edx", "esi", "ebp" );

return -ECANCELED;
}

/**
Expand Down

0 comments on commit dc51af5

Please sign in to comment.