-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
/* | ||
Copyright (c) 2022 xCuri0 <[email protected]> | ||
SPDX-License-Identifier: MIT | ||
*/ | ||
#include <Uefi.h> | ||
#include <Library/UefiLib.h> | ||
#include <Library/UefiBootServicesTableLib.h> | ||
|
@@ -32,13 +36,15 @@ static EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *pciRootBridgeIo; | |
|
||
static EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_PREPROCESS_CONTROLLER o_PreprocessController; | ||
|
||
// find last set bit and return the index of it | ||
INTN fls(UINT32 x) | ||
{ | ||
UINT32 r; | ||
|
||
#ifdef _MSC_VER | ||
_BitScanReverse64(&r, x); | ||
#else | ||
// taken from linux x86 bitops.h | ||
asm("bsrl %1,%0" | ||
: "=r" (r) | ||
: "rm" (x), "0" (-1)); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright (c) 2022 xCuri0 <[email protected]> | ||
# SPDX-License-Identifier: MIT | ||
# | ||
import os | ||
import sys | ||
import glob | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#include <iostream> | ||
/* | ||
Copyright (c) 2022 xCuri0 <[email protected]> | ||
SPDX-License-Identifier: MIT | ||
*/ | ||
#include <iostream> | ||
#include <string> | ||
#include <cmath> | ||
|
||
|