BS
tpl = BS->RaiseTPL(TPL_NOTIFY);
BS->RestoreTPL(tpl);
if ((status = BS->LoadImage(TRUE, IH, efi_devpath_last_node(dev->devpath),
if ((status = BS->StartImage(loaderhandle, NULL, NULL)) !=
BS = ST->BootServices;
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
BS->Exit(IH, status, 0, NULL);
status = BS->LocateProtocol(&ConsoleControlGUID, NULL,
BS->LocateHandle(ByProtocol, &BlockIoProtocolGUID, NULL,
status = BS->LocateHandle(ByProtocol, &BlockIoProtocolGUID,
BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize));
BS->Exit(IH, s, 0, NULL);
#define DSTALL(d) BS->Stall(d)
BS->Exit(IH, EFI_OUT_OF_RESOURCES, 0, NULL);
extern EFI_BOOT_SERVICES *BS;
status = BS->ExitBootServices(IH, key);
BS->Stall(usecs);
status = BS->AllocatePool(EfiLoaderData, len, (void **)&out);
status = BS->LocateProtocol(&DevicePathToTextGUID, NULL,
BS->FreePool(text);
status = BS->LocateProtocol(&DevicePathFromTextGUID, NULL,
BS->FreePool(devpath);
status = BS->LocateDevicePath(&DevicePathGUID, &devpath, &h);
status = BS->CloseProtocol(handle, &DevicePathGUID, IH, NULL);
status = BS->CheckEvent(coninex->WaitForKeyEx);
status = BS->CheckEvent(conin->WaitForKey);
status = BS->OpenProtocol(ST->ConsoleInHandle,
status = BS->LocateHandle(ByProtocol, filter, NULL,
status = BS->LocateHandle(ByProtocol, filter, NULL,
BS->ConnectController(handles[i], NULL, NULL, true);
status = BS->InstallMultipleProtocolInterfaces(
status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles);
status = BS->LocateHandle(ByProtocol, &serial, NULL, &bufsz, handles);
status = BS->LocateDevicePath(&serial, &node, &handle);
status = BS->OpenProtocol(handle, &serial,
status = BS->OpenProtocol(handle, &serial,
status = BS->OpenProtocol(handle, &ip4config2_guid,
status = BS->LocateDevicePath(&httpsb_guid, &imgpath, &handle);
status = BS->LocateDevicePath(&httpsb_guid, &devpath, &handle);
status = BS->OpenProtocol(handle, &httpsb_guid, (void **)&sb, IH, NULL,
status = BS->OpenProtocol(oh->http_handle, &http_guid,
status = BS->OpenProtocol(oh->dev_handle, &httpsb_guid, (void **)&sb,
status = BS->CreateEvent(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, notify,
BS->CloseEvent(token.Event);
BS->CloseEvent(token.Event);
status = BS->CreateEvent(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, notify,
BS->CloseEvent(token.Event);
BS->CloseEvent(token.Event);
BS->FreePool(message.Headers);
BS->FreePool(message.Headers);
status = BS->CreateEvent(EVT_NOTIFY_SIGNAL, TPL_CALLBACK, notify,
BS->CloseEvent(token.Event);
BS->CloseEvent(token.Event);
status = BS->OpenProtocol(h, &sn_guid, (void **)&net,
status = BS->LocateHandle(ByProtocol, &sn_guid, NULL, &sz, NULL);
status = BS->LocateHandle(ByProtocol, &sn_guid, NULL, &sz,
status = BS->LocateDevicePath(&blkio_guid, &devp, &h);
status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin);
status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz,
EFI_BOOT_SERVICES *BS;
return (BS->OpenProtocol(handle, protocol, interface, IH, NULL,
BS->CreateEvent(EVT_TIMER | EVT_NOTIFY_SIGNAL, TPL_CALLBACK,
BS->SetTimer(time_event, TimerPeriodic, 10000000);
BS->SetTimer(time_event, TimerCancel, 0);
BS->CloseEvent(time_event);
err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 1,
err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 3,
BS->FreePages(trampcode, 1);
err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 9,
BS->FreePages(trampcode, 9);
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
BS->FreePages(addr, EFI_SIZE_TO_PAGES(PAGE_SIZE));
BS->FreePages(stack, EFI_SIZE_TO_PAGES(128 * 1024));
BS->FreePages(lidt_pa, EFI_SIZE_TO_PAGES(fw_idt.rd_limit));
BS->FreePages(exc_stack_pa, 1);
BS->FreePages(tss_pa, EFI_SIZE_TO_PAGES(sizeof(struct
BS->FreePages(loader_gdt_pa, loader_gdt_pa_size);
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, 1,
status = BS->AllocatePages(AllocateAnyPages,
err = BS->AllocatePages(type, EfiLoaderCode,
err = BS->AllocatePages(type, EfiLoaderData,
BS->FreePages((uintptr_t)trampoline, 1);
err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData,
BS->FreePages((uintptr_t)trampoline, 1);
BS->FreePages((uintptr_t)gdt, 1);
err = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
BS->FreePages((uintptr_t)trampoline, 1);
BS->FreePages((uintptr_t)gdt, 1);
status = BS->LocateProtocol(&riscvboot, NULL, (void **)&proto);
status = BS->GetMemoryMap(&sz, mm, &efi_mapkey, &dsz, &mmver);
BS->FreePages(addr, pages);
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
BS->FreePages(addr, pages);
status = BS->GetMemoryMap(&sz, map, &key, &dsz, &dver);
BS->FreePages(staging_base, (staging_end - staging_base) /
status = BS->AllocatePages(EFI_ALLOC_METHOD, EfiLoaderCode,
status = BS->AllocatePages(AllocateAddress, EfiLoaderCode, nr_pages,
status = BS->AllocatePages(AllocateAddress, EfiLoaderCode, nr_pages,
status = BS->AllocatePages(EFI_ALLOC_METHOD, EfiLoaderCode,
BS->FreePages(staging_base, (staging_end - staging_base) /
BS->Exit(IH, status, 0, NULL);
BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize));
BS->Exit(IH, exit_code, 0, NULL);
BS = ST->BootServices;
status = BS->LocateProtocol(&console_control_protocol, NULL,
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
status = BS->LocateHandle(ByProtocol, &uga_guid, NULL, &bufsz, NULL);
status = BS->LocateHandle(ByProtocol, &uga_guid, NULL, &bufsz, buf);
BS->FreePool(resattr);
status = BS->OpenProtocol(h, guid, (void **)&edid, IH, NULL,
status = BS->OpenProtocol(h, guid, (void **)&edid, IH, NULL,
status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize, hlist);
status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize, hlist);
status = BS->LocateHandle(ByProtocol, &gop_guid, NULL, &hsize,
status = BS->LocateProtocol(&uga_guid, NULL, (VOID **)&uga);
BS->FreePages((uintptr_t)gfx_state->tg_shadow_fb,
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
BS->SetWatchdogTimer(0, 0, 0, NULL);
status = BS->LocateProtocol(&rng_guid, NULL, (VOID **)&rng);
status = BS->GetMemoryMap(&sz, 0, &key, &dsz, &dver);
status = BS->GetMemoryMap(&sz, map, &key, &dsz, &dver);
status = BS->LocateHandle(ByProtocol, &inputid, 0, &sz, 0);
status = BS->LocateHandle(ByProtocol, &inputid, 0, &sz,
status = BS->LocateHandle(AllHandles, NULL, NULL, &bufsz, buffer);
status = BS->LocateHandle(AllHandles, NULL, NULL, &bufsz, buffer);
status = BS->ProtocolsPerHandle(handle, &protocols, &nproto);
BS->FreePool(protocols);
status = BS->AllocatePool(EfiLoaderCode, (UINTN)st.st_size, &buf);
(void)BS->FreePool(buf);
status = BS->LoadImage(FALSE, IH, NULL, buf, st.st_size, &loaderhandle);
(void)BS->FreePool(buf);
status = BS->StartImage(loaderhandle, &ExitDataSize, &ExitData);
BS->FreePool(ExitData);
status = BS->UnloadImage(loaded_image);
err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 1,
err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 3,
BS->FreePages(trampcode, 1);
err = BS->AllocatePages(AllocateMaxAddress, EfiLoaderData, 9,
BS->FreePages(trampcode, 9);
case BS: /* can't go back further */