x86: refactor mmustructs.h

The struct definitions for pdpt, pd, and pt entries has been
removed:

 - Bitfield ordering in a struct is implementation dependent,
   it can be right-to-left or left-to-right
 - The two different structures for page directory entries were
   not being used consistently, or when the type of the PDE
   was unknown
 - Anonymous structs/unions are GCC extensions

Instead these are now u64_t, with bitwise operations used to
get/set fields.

A new set of inline functions for fetcing various page table
structures has been implemented, replacing the older macros.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-10-09 12:17:34 -07:00 committed by Andrew Boie
commit 31620b90e2
8 changed files with 332 additions and 542 deletions

View file

@ -214,6 +214,9 @@ u8_t u8_to_dec(char *buf, u8_t buflen, u8_t value);
#endif
#endif
/** 64-bit unsigned integer with bit position _n set */
#define BIT64(_n) (1ULL << (_n))
/**
* @brief Macro sets or clears bit depending on boolean value
*