Changeset a0d9abcd in mainline


Ignore:
Timestamp:
2016-05-05T13:21:25Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4928165
Parents:
57c2a87
Message:

Use macros for setting up the initial page tables

Location:
kernel/arch/ia32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/include/arch/mm/page.h

    r57c2a87 ra0d9abcd  
    4242#define PAGE_SIZE   FRAME_SIZE
    4343
     44#define PTE_P           (1 << 0)
     45#define PTE_RW          (1 << 1)
     46
     47#define PDE_P           (1 << 0)
     48#define PDE_RW          (1 << 1)
     49#define PDE_4M          (1 << 7)
     50
    4451#ifndef __ASM__
    4552
  • kernel/arch/ia32/src/boot/multiboot.S

    r57c2a87 ra0d9abcd  
    177177       
    178178        floop_pse:
    179                 movl $((1 << 7) | (1 << 1) | (1 << 0)), %eax
     179                movl $(PDE_4M | PDE_RW | PDE_P), %eax
    180180                orl %ebx, %eax
    181181                /* Mapping 0x00000000 + %ecx * 4M => 0x00000000 + %ecx * 4M */
     
    243243               
    244244                floop_pt:
    245                         movl $((1 << 1) | (1 << 0)), %eax
     245                        movl $(PTE_RW | PTE_P), %eax
    246246                        orl %ebx, %eax
    247247                        movl %eax, (%esi, %ecx, 4)
     
    260260               
    261261                floop:
    262                         movl $((1 << 1) | (1 << 0)), %eax
     262                        movl $(PDE_RW | PDE_P), %eax
    263263                        orl %ebx, %eax
    264264                       
Note: See TracChangeset for help on using the changeset viewer.