Changeset 8565a42 in mainline for kernel/arch/ia32/src/mm


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

Location:
kernel/arch/ia32/src/mm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/mm/frame.c

    r3061bc1 r8565a42  
    5454{
    5555        unsigned int i;
    56        
     56
    5757        for (i = 0; i < e820counter; i++) {
    5858                uint64_t base64 = e820table[i].base_address;
    5959                uint64_t size64 = e820table[i].size;
    60                
     60
    6161#ifdef KARCH_ia32
    6262                /*
     
    6565                if (base64 >= PHYSMEM_LIMIT32)
    6666                        continue;
    67                
     67
    6868                if (base64 + size64 > PHYSMEM_LIMIT32)
    6969                        size64 = PHYSMEM_LIMIT32 - base64;
    7070#endif
    71                
     71
    7272                uintptr_t base = (uintptr_t) base64;
    7373                size_t size = (size_t) size64;
    74                
     74
    7575                if (!frame_adjust_zone_bounds(low, &base, &size))
    7676                        continue;
    77                
     77
    7878                if (e820table[i].type == MEMMAP_MEMORY_AVAILABLE) {
    7979                        /* To be safe, make the available zone possibly smaller */
     
    8181                        uint64_t new_size = ALIGN_DOWN(size - (new_base - base),
    8282                            FRAME_SIZE);
    83                        
     83
    8484                        size_t count = SIZE2FRAMES(new_size);
    8585                        pfn_t pfn = ADDR2PFN(new_base);
    8686                        pfn_t conf;
    87                        
     87
    8888                        if (low) {
    8989                                if ((minconf < pfn) || (minconf >= pfn + count))
     
    105105                        uint64_t new_size = ALIGN_UP(size + (base - new_base),
    106106                            FRAME_SIZE);
    107                        
     107
    108108                        zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,
    109109                            ZONE_FIRMWARE);
     
    113113                        uint64_t new_size = ALIGN_UP(size + (base - new_base),
    114114                            FRAME_SIZE);
    115                        
     115
    116116                        zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,
    117117                            ZONE_RESERVED);
     
    133133        unsigned int i;
    134134        printf("[base            ] [size            ] [name   ]\n");
    135        
     135
    136136        for (i = 0; i < e820counter; i++) {
    137137                const char *name;
    138                
     138
    139139                if (e820table[i].type <= MEMMAP_MEMORY_UNUSABLE)
    140140                        name = e820names[e820table[i].type];
    141141                else
    142142                        name = "invalid";
    143                
     143
    144144                printf("%#018" PRIx64 " %#018" PRIx64" %s\n", e820table[i].base_address,
    145145                    e820table[i].size, name);
     
    150150{
    151151        pfn_t minconf;
    152        
     152
    153153        if (config.cpu_active == 1) {
    154154                minconf = 1;
    155                
     155
    156156#ifdef CONFIG_SMP
    157157                minconf = max(minconf,
     
    159159                    hardcoded_unmapped_kdata_size));
    160160#endif
    161                
     161
    162162                init_e820_memory(minconf, true);
    163                
     163
    164164                /* Reserve frame 0 (BIOS data) */
    165165                frame_mark_unavailable(0, 1);
    166                
     166
    167167#ifdef CONFIG_SMP
    168168                /* Reserve AP real mode bootstrap memory */
  • kernel/arch/ia32/src/mm/page.c

    r3061bc1 r8565a42  
    5454        uintptr_t cur;
    5555        int flags;
    56        
     56
    5757        if (config.cpu_active > 1) {
    5858                /* Fast path for non-boot CPUs */
     
    6363
    6464        page_mapping_operations = &pt_mapping_operations;
    65        
     65
    6666        /*
    6767         * PA2KA(identity) mapping for all low-memory frames.
     
    7474        }
    7575        page_table_unlock(AS_KERNEL, true);
    76                
     76
    7777        exc_register(VECTOR_PF, "page_fault", true, (iroutine_t) page_fault);
    7878        write_cr3((uintptr_t) AS_KERNEL->genarch.page_table);
    79        
     79
    8080        paging_on();
    8181}
     
    8585        uintptr_t badvaddr;
    8686        pf_access_t access;
    87        
     87
    8888        badvaddr = read_cr2();
    89                
     89
    9090        if (istate->error_word & PFERR_CODE_RSVD)
    9191                panic("Reserved bit set in page directory.");
    92        
     92
    9393        if (istate->error_word & PFERR_CODE_RW)
    9494                access = PF_ACCESS_WRITE;
    9595        else
    9696                access = PF_ACCESS_READ;
    97        
     97
    9898        (void) as_page_fault(badvaddr, access, istate);
    9999}
Note: See TracChangeset for help on using the changeset viewer.