File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ Copyright (c) 2022 xCuri0 <zkqri0@gmail.com>
3+ SPDX-License-Identifier: MIT
4+ */
15#include <Uefi.h>
26#include <Library/UefiLib.h>
37#include <Library/UefiBootServicesTableLib.h>
@@ -32,13 +36,15 @@ static EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *pciRootBridgeIo;
3236
3337static EFI_PCI_HOST_BRIDGE_RESOURCE_ALLOCATION_PROTOCOL_PREPROCESS_CONTROLLER o_PreprocessController ;
3438
39+ // find last set bit and return the index of it
3540INTN fls (UINT32 x )
3641{
3742 UINT32 r ;
3843
3944 #ifdef _MSC_VER
4045 _BitScanReverse64 (& r , x );
4146 #else
47+ // taken from linux x86 bitops.h
4248 asm("bsrl %1,%0"
4349 : "=r" (r )
4450 : "rm" (x ), "0" (-1 ));
Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2+ #
3+ # Copyright (c) 2022 xCuri0 <zkqri0@gmail.com>
4+ # SPDX-License-Identifier: MIT
5+ #
26import os
37import sys
48import glob
Original file line number Diff line number Diff line change 1- #include < iostream>
1+ /*
2+ Copyright (c) 2022 xCuri0 <zkqri0@gmail.com>
3+ SPDX-License-Identifier: MIT
4+ */
5+ #include < iostream>
26#include < string>
37#include < cmath>
48
You can’t perform that action at this time.
0 commit comments