This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from random import random, randint, choice | |
from copy import deepcopy | |
from math import log | |
TAB = " " | |
### classes ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <efi.h> | |
#include <efilib.h> | |
EFI_STATUS get_memory_map(EFI_SYSTEM_TABLE *systab, EFI_MEMORY_DESCRIPTOR *map, UINTN *key) { | |
UINTN size = sizeof(EFI_MEMORY_DESCRIPTOR); | |
EFI_STATUS status = EFI_LOAD_ERROR; | |
while (status != EFI_SUCCESS) { | |
// Spec says we should give it some extra space. | |
size += sizeof(EFI_MEMORY_DESCRIPTOR) * 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 3f5e3bdbb45bc2cd9ae95972420eb11b0340f120 | |
Author: Matthew Garrett <mjg59@coreos.com> | |
Date: Mon Feb 1 13:31:00 2016 +1100 | |
Block most UEFI variable deletions | |
Some systems appear to become upset if certain UEFI non-volatile variables | |
are delted, to the point of no longer POSTing successfully. For a short-term | |
fix, let's just block deletion of most variables while we figure out a | |
better approach. |