Stale changes
This commit is contained in:
parent
23d29ae2f8
commit
ec9c755745
3 changed files with 20 additions and 13 deletions
2
x86_64-efi/.gitignore
vendored
2
x86_64-efi/.gitignore
vendored
|
|
@ -3,3 +3,5 @@
|
|||
bootnetboot.efi
|
||||
bootnetboot.rom
|
||||
efirom
|
||||
disk.img
|
||||
netboot/boot.efi
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@
|
|||
#include <efigpt.h>
|
||||
#include "efiip.h"
|
||||
#include "efitcp.h"
|
||||
#include "efihttp.h"
|
||||
#include "tinf.h"
|
||||
// get BOOTBOOT specific stuff
|
||||
#include <bootboot.h>
|
||||
|
|
@ -962,6 +961,7 @@ EFI_STATUS
|
|||
report(EFI_STATUS Status,CHAR16 *Msg)
|
||||
{
|
||||
Print(L"BOOTBOOT-PANIC: %s (EFI %r)\n",Msg,Status);
|
||||
for (;;) {} // To make debugging easier.
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
@ -1455,9 +1455,9 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
|
|||
EFI_LOADED_IMAGE *loaded_image = NULL;
|
||||
EFI_STATUS status=EFI_SUCCESS;
|
||||
EFI_MEMORY_DESCRIPTOR *memory_map = NULL, *mement;
|
||||
EFI_GUID http_binding_guid = EFI_HTTP_SERVICE_BINDING_PROTOCOL_GUID;
|
||||
EFI_SERVICE_BINDING *http_binding;
|
||||
EFI_HANDLE http_handle;
|
||||
EFI_GUID tcp4_binding_guid = EFI_TCP4_SERVICE_BINDING_PROTOCOL;
|
||||
EFI_SERVICE_BINDING *tcp4_binding;
|
||||
EFI_HANDLE tcp4_handle;
|
||||
#if USE_MP_SERVICES
|
||||
EFI_EVENT Event;
|
||||
EFI_GUID mpspGuid = EFI_MP_SERVICES_PROTOCOL_GUID;
|
||||
|
|
@ -1510,16 +1510,19 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
|
|||
Print(L"LINE %d\n", (int)__LINE__ );
|
||||
ZeroMem((void*)bootboot,PAGESIZE);
|
||||
Print(L"LINE %d\n", (int)__LINE__ );
|
||||
CopyMem(bootboot->magic,BOOTBOOT_MAGIC,4);
|
||||
//TODO!
|
||||
//CopyMem(bootboot->magic,BOOTBOOT_MAGIC,4);
|
||||
Print(L"LINE %d\n", (int)__LINE__ );
|
||||
// unlike BIOS+MultiBoot bootboot, no need to check if we have
|
||||
// PAE + MSR + LME, as we're already in long mode.
|
||||
/*
|
||||
__asm__ __volatile__ (
|
||||
"mov $1, %%eax;"
|
||||
"cpuid;"
|
||||
"shrl $24, %%ebx;"
|
||||
"mov %%bx,%0"
|
||||
: "=r"(bootboot->bspid) : : "eax", "ebx", "ecx", "edx", "cc");
|
||||
*/
|
||||
Print(L"LINE %d\n", (int)__LINE__ );
|
||||
#endif
|
||||
|
||||
|
|
@ -1558,26 +1561,25 @@ efi_main (EFI_HANDLE image, EFI_SYSTEM_TABLE *systab)
|
|||
#endif
|
||||
Print(L"LINE %d\n", (int)__LINE__ );
|
||||
|
||||
// Try to locate HTTP service binding protocol
|
||||
DBG(L" * Locating HTTP service binding protocol%s\n", L"");
|
||||
status = uefi_call_wrapper(BS->LocateProtocol, 3, &http_binding_guid, NULL, (void **)&http_binding);
|
||||
// Try to locate TCPv4 service binding protocol
|
||||
DBG(L" * Locating TCP4 service binding protocol%s\n", L"");
|
||||
status = uefi_call_wrapper(BS->LocateProtocol, 3, &tcp4_binding_guid, NULL, (void **)&tcp4_binding);
|
||||
if (EFI_ERROR(status)) {
|
||||
return report(status, L"LocateProtocol");
|
||||
}
|
||||
Print(L"LINE %d\n", (int)__LINE__ );
|
||||
|
||||
// Create a HTTP protocol handle
|
||||
DBG(L" * Creating HTTP protocol handle%s\n", L"");
|
||||
http_handle=NULL;
|
||||
status = uefi_call_wrapper(http_binding->CreateChild, 2, http_binding, &http_handle);
|
||||
DBG(L" * Creating TCP4 protocol handle%s\n", L"");
|
||||
tcp4_handle=NULL;
|
||||
status = uefi_call_wrapper(tcp4_binding->CreateChild, 2, tcp4_binding, &tcp4_handle);
|
||||
if (EFI_ERROR(status)) {
|
||||
return report(status, L"CreateChild");
|
||||
}
|
||||
Print(L"LINE %d\n", (int)__LINE__ );
|
||||
|
||||
status=EFI_LOAD_ERROR;
|
||||
|
||||
// Retrieve InitRD from external HTTP server
|
||||
status=EFI_LOAD_ERROR;
|
||||
{
|
||||
for (;;) {}
|
||||
}
|
||||
|
|
|
|||
3
x86_64-efi/run-efi.sh
Executable file
3
x86_64-efi/run-efi.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
#qemu-system-x86_64 --bios /usr/share/OVMF/x64/OVMF.fd -netdev user,id=n1,net=10.0.0.5/24 -device virtio-net-pci,netdev=n1 -device virtio-rng-pci
|
||||
qemu-system-x86_64 --bios /usr/share/OVMF/x64/OVMF.fd -netdev user,id=n1,net=10.0.0.5/24,tftp=netboot,bootfile=/boot.efi -device virtio-net-pci,netdev=n1 -device virtio-rng-pci
|
||||
Loading…
Add table
Reference in a new issue