kernel: don't use typedef for enums or non-opaque structs
This commit is contained in:
@@ -19,37 +19,37 @@ extern "C" {
|
||||
typedef phys_addr_t pml4t_ptr_t;
|
||||
typedef uint64_t pte_t;
|
||||
|
||||
typedef struct pml4t {
|
||||
struct pml4t {
|
||||
phys_addr_t p_entries[512];
|
||||
} __packed pml4t_t;
|
||||
} __packed;
|
||||
|
||||
typedef struct pdpt {
|
||||
struct pdpt {
|
||||
union {
|
||||
/* 4KiB and 2MiB pages */
|
||||
phys_addr_t p_entries[512];
|
||||
/* 1GiB pages */
|
||||
pte_t p_pages[512];
|
||||
};
|
||||
} __packed pdpt_t;
|
||||
} __packed;
|
||||
|
||||
typedef struct pdir {
|
||||
struct pdir {
|
||||
union {
|
||||
/* 4KiB pages */
|
||||
phys_addr_t p_entries[512];
|
||||
/* 2MiB pages */
|
||||
pte_t p_pages[512];
|
||||
};
|
||||
} __packed pdir_t;
|
||||
} __packed;
|
||||
|
||||
typedef struct ptab {
|
||||
struct ptab {
|
||||
pte_t p_pages[512];
|
||||
} __packed ptab_t;
|
||||
} __packed;
|
||||
|
||||
typedef enum page_size {
|
||||
enum page_size {
|
||||
PS_4K,
|
||||
PS_2M,
|
||||
PS_1G,
|
||||
} page_size_t;
|
||||
};
|
||||
|
||||
/* returns 1 if gigabyte pages are supported by the CPU, 0 otherwise.
|
||||
defined in pmap_ctrl.S */
|
||||
|
||||
Reference in New Issue
Block a user