Changeset 4cc2ddd in mainline for kernel/arch/amd64/src


Ignore:
Timestamp:
2008-01-15T13:19:35Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
62da45a
Parents:
22e8166d
Message:

amd64: shorten kernel address space by 2 GB to support proper mapping of more than 2 GB of physical memory

Location:
kernel/arch/amd64/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/amd64.c

    r22e8166d r4cc2ddd  
    7272static void clean_IOPL_NT_flags(void)
    7373{
    74         asm
    75         (
    76                 "pushfq;"
    77                 "pop %%rax;"
    78                 "and $~(0x7000),%%rax;"
    79                 "pushq %%rax;"
    80                 "popfq;"
    81                 :
    82                 :
    83                 :"%rax"
     74        asm (
     75                "pushfq\n"
     76                "pop %%rax\n"
     77                "and $~(0x7000), %%rax\n"
     78                "pushq %%rax\n"
     79                "popfq\n"
     80                :
     81                :
     82                : "%rax"
    8483        );
    8584}
     
    9190static void clean_AM_flag(void)
    9291{
    93         asm
    94         (
    95                 "mov %%cr0,%%rax;"
    96                 "and $~(0x40000),%%rax;"
    97                 "mov %%rax,%%cr0;"
    98                 :
    99                 :
    100                 :"%rax"
     92        asm (
     93                "mov %%cr0, %%rax\n"
     94                "and $~(0x40000), %%rax\n"
     95                "mov %%rax, %%cr0\n"
     96                :
     97                :
     98                : "%rax"
    10199        );
    102100}
     
    128126}
    129127
     128
    130129void arch_post_mm_init(void)
    131130{
     
    136135                /* hard clock */
    137136                i8254_init();
    138 
     137                               
    139138#ifdef CONFIG_FB
    140139                if (vesa_present())
     
    149148                zone_merge_all();
    150149        }
     150       
    151151        /* Setup fast SYSCALL/SYSRET */
    152152        syscall_setup_cpu();
    153        
    154153}
    155154
  • kernel/arch/amd64/src/mm/page.c

    r22e8166d r4cc2ddd  
    8888        if (config.cpu_active == 1) {
    8989                page_mapping_operations = &pt_mapping_operations;
    90                
     90
    9191                /*
    9292                 * PA2KA(identity) mapping for all frames.
     
    9696                        page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, identity_flags);
    9797                }
     98               
    9899                /* Upper kernel mapping
    99100                 * - from zero to top of kernel (include bottom addresses
    100                  *   because some are needed for init )
     101                 *   because some are needed for init)
    101102                 */
    102103                for (cur = PA2KA_CODE(0); cur < config.base + config.kernel_size; cur += FRAME_SIZE)
Note: See TracChangeset for help on using the changeset viewer.