From a13e1c0911c0627184bc38f18c7fdda64447b3ad Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 23 Mar 2025 19:13:48 +0100 Subject: meta(kernel): Reworked repository's filesystem structure. Removing useless parts of the project too. Signed-off-by: Amlal El Mahrouss --- dev/boot/BootKit/BitManip.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dev/boot/BootKit/BitManip.h (limited to 'dev/boot/BootKit/BitManip.h') diff --git a/dev/boot/BootKit/BitManip.h b/dev/boot/BootKit/BitManip.h new file mode 100644 index 00000000..475d44ed --- /dev/null +++ b/dev/boot/BootKit/BitManip.h @@ -0,0 +1,20 @@ +/* ------------------------------------------- + + Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. + +------------------------------------------- */ + +#ifndef __BITMANIP_H__ +#define __BITMANIP_H__ + +/// File: BitManip.h +/// Purpose: Bit manipulation helpers, based on coreboot-dev. + +#define bk_set_bit(X, O) X = (1 << O) | X +#define bk_clear_bit(X, O) X = ~(1 << O) & X +#define bk_toogle(X, O) X = (1 << O) ^ X +#define bk_lsb(X) X = X & -X +#define bk_msb(X) X = -(mp_lsb(X)) & X +#define bk_look_for_bit(X, O) (1 << O) | X + +#endif // ifndef __BITMANIP_H__ -- cgit v1.2.3