Lines 607-612
void setup_graphics(struct boot_params *boot_params)
Link Here
|
607 |
si = &boot_params->screen_info; |
607 |
si = &boot_params->screen_info; |
608 |
memset(si, 0, sizeof(*si)); |
608 |
memset(si, 0, sizeof(*si)); |
609 |
|
609 |
|
|
|
610 |
efi_printk("Setting up graphics\n"); |
610 |
size = 0; |
611 |
size = 0; |
611 |
status = efi_call_phys5(sys_table->boottime->locate_handle, |
612 |
status = efi_call_phys5(sys_table->boottime->locate_handle, |
612 |
EFI_LOCATE_BY_PROTOCOL, &graphics_proto, |
613 |
EFI_LOCATE_BY_PROTOCOL, &graphics_proto, |
Lines 890-895
struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
Link Here
|
890 |
if (sys_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) |
891 |
if (sys_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) |
891 |
return NULL; |
892 |
return NULL; |
892 |
|
893 |
|
|
|
894 |
efi_printk("Building boot params\n"); |
895 |
|
893 |
status = efi_call_phys3(sys_table->boottime->handle_protocol, |
896 |
status = efi_call_phys3(sys_table->boottime->handle_protocol, |
894 |
handle, &proto, (void *)&image); |
897 |
handle, &proto, (void *)&image); |
895 |
if (status != EFI_SUCCESS) { |
898 |
if (status != EFI_SUCCESS) { |
Lines 903-908
struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
Link Here
|
903 |
return NULL; |
906 |
return NULL; |
904 |
} |
907 |
} |
905 |
|
908 |
|
|
|
909 |
efi_printk("Allocated boot params\n"); |
906 |
memset(boot_params, 0x0, 0x4000); |
910 |
memset(boot_params, 0x0, 0x4000); |
907 |
|
911 |
|
908 |
hdr = &boot_params->hdr; |
912 |
hdr = &boot_params->hdr; |
Lines 961-966
struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
Link Here
|
961 |
|
965 |
|
962 |
hdr->cmd_line_ptr = cmdline; |
966 |
hdr->cmd_line_ptr = cmdline; |
963 |
|
967 |
|
|
|
968 |
efi_printk("Built command line\n"); |
969 |
|
964 |
hdr->ramdisk_image = 0; |
970 |
hdr->ramdisk_image = 0; |
965 |
hdr->ramdisk_size = 0; |
971 |
hdr->ramdisk_size = 0; |
966 |
|
972 |
|
Lines 970-978
struct boot_params *make_boot_params(void *handle, efi_system_table_t *_table)
Link Here
|
970 |
memset(sdt, 0, sizeof(*sdt)); |
976 |
memset(sdt, 0, sizeof(*sdt)); |
971 |
|
977 |
|
972 |
status = handle_ramdisks(image, hdr); |
978 |
status = handle_ramdisks(image, hdr); |
973 |
if (status != EFI_SUCCESS) |
979 |
if (status != EFI_SUCCESS) { |
|
|
980 |
efi_printk("Failed to handle ramdisks\n"); |
974 |
goto fail2; |
981 |
goto fail2; |
|
|
982 |
} |
975 |
|
983 |
|
|
|
984 |
efi_printk("Finished building boot params\n"); |
976 |
return boot_params; |
985 |
return boot_params; |
977 |
fail2: |
986 |
fail2: |
978 |
if (options_size) |
987 |
if (options_size) |
Lines 996-1001
static efi_status_t exit_boot(struct boot_params *boot_params,
Link Here
|
996 |
u8 nr_entries; |
1005 |
u8 nr_entries; |
997 |
int i; |
1006 |
int i; |
998 |
|
1007 |
|
|
|
1008 |
efi_printk("Exiting boot services\n"); |
1009 |
|
999 |
size = sizeof(*mem_map) * 32; |
1010 |
size = sizeof(*mem_map) * 32; |
1000 |
|
1011 |
|
1001 |
again: |
1012 |
again: |
Lines 1120-1125
static efi_status_t relocate_kernel(struct setup_header *hdr)
Link Here
|
1120 |
unsigned long start, nr_pages; |
1131 |
unsigned long start, nr_pages; |
1121 |
efi_status_t status; |
1132 |
efi_status_t status; |
1122 |
|
1133 |
|
|
|
1134 |
efi_printk("Relocating kernel\n"); |
1135 |
|
1123 |
/* |
1136 |
/* |
1124 |
* The EFI firmware loader could have placed the kernel image |
1137 |
* The EFI firmware loader could have placed the kernel image |
1125 |
* anywhere in memory, but the kernel has various restrictions |
1138 |
* anywhere in memory, but the kernel has various restrictions |
Lines 1169-1178
struct boot_params *efi_main(void *handle, efi_system_table_t *_table,
Link Here
|
1169 |
if (sys_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) |
1182 |
if (sys_table->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) |
1170 |
goto fail; |
1183 |
goto fail; |
1171 |
|
1184 |
|
|
|
1185 |
efi_printk("EFI Boot stub v3.12.7\n"); |
1172 |
setup_graphics(boot_params); |
1186 |
setup_graphics(boot_params); |
1173 |
|
1187 |
|
|
|
1188 |
efi_printk("Setting up pci\n"); |
1174 |
setup_efi_pci(boot_params); |
1189 |
setup_efi_pci(boot_params); |
1175 |
|
1190 |
|
|
|
1191 |
efi_printk("Allocating gdt\n"); |
1176 |
status = efi_call_phys3(sys_table->boottime->allocate_pool, |
1192 |
status = efi_call_phys3(sys_table->boottime->allocate_pool, |
1177 |
EFI_LOADER_DATA, sizeof(*gdt), |
1193 |
EFI_LOADER_DATA, sizeof(*gdt), |
1178 |
(void **)&gdt); |
1194 |
(void **)&gdt); |
Lines 1188-1193
struct boot_params *efi_main(void *handle, efi_system_table_t *_table,
Link Here
|
1188 |
goto fail; |
1204 |
goto fail; |
1189 |
} |
1205 |
} |
1190 |
|
1206 |
|
|
|
1207 |
efi_printk("Allocating idt\n"); |
1191 |
status = efi_call_phys3(sys_table->boottime->allocate_pool, |
1208 |
status = efi_call_phys3(sys_table->boottime->allocate_pool, |
1192 |
EFI_LOADER_DATA, sizeof(*idt), |
1209 |
EFI_LOADER_DATA, sizeof(*idt), |
1193 |
(void **)&idt); |
1210 |
(void **)&idt); |
1194 |
- |
|
|