Skip to content

Commit

Permalink
add license header
Browse files Browse the repository at this point in the history
  • Loading branch information
xCuri0 committed Nov 21, 2022
1 parent 520ee8f commit 08c796d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ReBarDxe/ReBar.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/*
Copyright (c) 2022 xCuri0 <zkqri0@gmail.com>
SPDX-License-Identifier: MIT
*/
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
Expand Down Expand Up @@ -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));
Expand Down
4 changes: 4 additions & 0 deletions ReBarDxe/buildffs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env python3
#
# Copyright (c) 2022 xCuri0 <zkqri0@gmail.com>
# SPDX-License-Identifier: MIT
#
import os
import sys
import glob
Expand Down
6 changes: 5 additions & 1 deletion ReBarState/ReBarState.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#include <iostream>
/*
Copyright (c) 2022 xCuri0 <zkqri0@gmail.com>
SPDX-License-Identifier: MIT
*/
#include <iostream>
#include <string>
#include <cmath>

Expand Down

0 comments on commit 08c796d

Please sign in to comment.