[boot][kernel] Split programs into sections
To enable setting sections as NX or read-only, the boot program loader now loads programs as lists of sections, and the kernel args are updated accordingly. The kernel's loader now just takes a program pointer to iterate the sections. Also enable NX in IA32_EFER in the bootloader.
This commit is contained in:
@@ -131,10 +131,13 @@ operator ! (E rhs)
|
||||
}
|
||||
|
||||
template <typename E>
|
||||
constexpr typename std::enable_if<is_enum_bitfield<E>::value,bool>::type
|
||||
constexpr bool
|
||||
bitfield_has(E set, E flag)
|
||||
{
|
||||
return (set & flag) == flag;
|
||||
return
|
||||
(static_cast<typename std::underlying_type<E>::type>(set) &
|
||||
static_cast<typename std::underlying_type<E>::type>(flag)) ==
|
||||
static_cast<typename std::underlying_type<E>::type>(flag);
|
||||
}
|
||||
|
||||
// Overload the logical-and operator to be 'bitwise-and, bool-cast'
|
||||
|
||||
Reference in New Issue
Block a user