1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00
This commit is contained in:
Jens Breitbart 2016-03-13 14:07:20 +01:00
parent c988aa073a
commit 8ca290671e
2 changed files with 8 additions and 8 deletions

View file

@ -43,7 +43,7 @@ static uint8_t stack_table[MAX_CORES*KERNEL_STACK_SIZE*3];
extern const void boot_stack;
/*
/*
* This is defined in entry.asm. We use this to properly reload
* the new segment registers
*/
@ -80,12 +80,12 @@ void configure_gdt_entry(gdt_entry_t *dest_entry, unsigned long base, unsigned l
dest_entry->access = access;
}
/*
/*
* This will setup the special GDT
* pointer, set up the entries in our GDT, and then
* finally call gdt_flush() in our assembler file in order
* to tell the processor where the new GDT is and update the
* new segment registers
* new segment registers
*/
void gdt_install(void)
{
@ -100,7 +100,7 @@ void gdt_install(void)
/* Our NULL descriptor */
gdt_set_gate(num++, 0, 0, 0, 0);
/*
/*
* The second entry is our Code Segment. The base address
* is 0, the limit is 4 GByte, it uses 4KByte granularity,
* and is a Code Segment descriptor.
@ -108,10 +108,10 @@ void gdt_install(void)
gdt_set_gate(num++, 0, 0,
GDT_FLAG_RING0 | GDT_FLAG_SEGMENT | GDT_FLAG_CODESEG | GDT_FLAG_PRESENT, GDT_FLAG_64_BIT);
/*
/*
* The third entry is our Data Segment. It's EXACTLY the
* same as our code segment, but the descriptor type in
* this entry's access byte says it's a Data Segment
* this entry's access byte says it's a Data Segment
*/
gdt_set_gate(num++, 0, 0,
GDT_FLAG_RING0 | GDT_FLAG_SEGMENT | GDT_FLAG_DATASEG | GDT_FLAG_PRESENT, 0);

View file

@ -30,7 +30,7 @@
* This is a 32/64 bit portable paging implementation for the x86 architecture
* using self-referenced page tables i.
* See http://www.noteblok.net/2014/06/14/bachelor/ for a detailed description.
*
*
* @author Steffen Vogel <steffen.vogel@rwth-aachen.de>
*/
@ -136,7 +136,7 @@ int page_map(size_t viraddr, size_t phyaddr, size_t npages, size_t bits)
size_t phyaddr = get_pages(1);
if (BUILTIN_EXPECT(!phyaddr, 0))
goto out;
if (bits & PG_USER)
atomic_int64_inc(curr_task->user_usage);