<commit_before>#include <efi.h>
#include <efilib.h>
#include <efidef.h>

#include "disk.h"
#include "vga.h"
#include "ELF.h"


extern void BootDisableInterrupts(void);
typedef void (*kfn)();

void
EFIAPI
efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
  // Memory Map
  UINTN mapsize               = 0;
  UINTN allocsize             = 0;
  EFI_MEMORY_DESCRIPTOR * map = NULL;
  UINTN mapkey                = 0;
  UINTN descriptorsize        = 0;
  UINT32 version              = 0;

  
  InitializeLib(ImageHandle, SystemTable);
   
  BS->SetWatchdogTimer(0, 0, 0, NULL);
   
  uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); // clear the screen
  Print(L"Firmware Vendor: %s Rev: 0x%08x\n", ST->FirmwareVendor, ST->FirmwareRevision);
   
  ELF * kernel = LoadFile(L"kernel.bin");

  PrintELFInfo(kernel);

  EFI_STATUS memret     = EFI_SUCCESS;
  EFI_STATUS bootstatus = EFI_SUCCESS;

  EFI_STATUS memst = uefi_call_wrapper(BS->GetMemoryMap, 5, &mapsize, map, &mapkey, &descriptorsize, &version);

  SetVideoMode(1024, 768, 32);

  if(memst == EFI_BUFFER_TOO_SMALL)
  {
    Print(L"MapSize read successful\n");
  }

  allocsize = mapsize + 10*4098;

  mapsize = allocsize;

  EFI_STATUS allocst = uefi_call_wrapper(BS->AllocatePool, 3, EfiLoaderData, allocsize, (void**)&map);

  if(allocst == EFI_SUCCESS)
  {
    Print(L"Allocated Space for Memory Map\n");
  }
<commit_msg>changes video mode to 1024 to 768, must think of a way to handle this better, and which information to return<commit_after>#include <efi.h>
#include <efilib.h>
#include <efidef.h>

#include "disk.h"
#include "vga.h"
#include "ELF.h"


extern void BootDisableInterrupts(void);
typedef void (*kfn)();

void
EFIAPI
efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
  // Memory Map
  UINTN mapsize               = 0;
  UINTN allocsize             = 0;
  EFI_MEMORY_DESCRIPTOR * map = NULL;
  UINTN mapkey                = 0;
  UINTN descriptorsize        = 0;
  UINT32 version              = 0;

  
  InitializeLib(ImageHandle, SystemTable);
  uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut); // clear the screen
  SetVideoMode(1024, 768, 32);

  BS->SetWatchdogTimer(0, 0, 0, NULL);
   

  Print(L"Firmware Vendor: %s Rev: 0x%08x\n", ST->FirmwareVendor, ST->FirmwareRevision);
   
  ELF * kernel = LoadFile(L"kernel.bin");

  PrintELFInfo(kernel);

  EFI_STATUS memret     = EFI_SUCCESS;
  EFI_STATUS bootstatus = EFI_SUCCESS;

  EFI_STATUS memst = uefi_call_wrapper(BS->GetMemoryMap, 5, &mapsize, map, &mapkey, &descriptorsize, &version);



  if(memst == EFI_BUFFER_TOO_SMALL)
  {
    Print(L"MapSize read successful\n");
  }

  allocsize = mapsize + 10*4098;

  mapsize = allocsize;

  EFI_STATUS allocst = uefi_call_wrapper(BS->AllocatePool, 3, EfiLoaderData, allocsize, (void**)&map);

  if(allocst == EFI_SUCCESS)
  {
    Print(L"Allocated Space for Memory Map\n");
  }

{'fraction_non_alphanumeric': 0.12323580034423408, 'fraction_numerical': 0.023752151462994836, 'mean_word_length': 3.526479750778816, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '759781', 'n_tokens_mistral': 1171, 'n_tokens_neox': 1078, 'n_words': 240}