Changeset f14291b in mainline for kernel/arch/ia32/src/mm/frame.c


Ignore:
Timestamp:
2010-10-19T20:55:53Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a93d79a
Parents:
1882525 (diff), a7a85d16 (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r1882525 rf14291b  
    131131                        if (last_frame < ALIGN_UP(new_base + new_size, FRAME_SIZE))
    132132                                last_frame = ALIGN_UP(new_base + new_size, FRAME_SIZE);
    133                 }
    134                
    135                 if (e820table[i].type == MEMMAP_MEMORY_RESERVED) {
     133                } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) ||
     134                    (e820table[i].type == MEMMAP_MEMORY_NVS)) {
     135                        /* To be safe, make the firmware zone possibly larger */
     136                        uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE);
     137                        uint64_t new_size = ALIGN_UP(size + (base - new_base),
     138                            FRAME_SIZE);
     139                       
     140                        zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,
     141                            ZONE_FIRMWARE);
     142                } else {
    136143                        /* To be safe, make the reserved zone possibly larger */
    137144                        uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE);
     
    141148                        zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,
    142149                            ZONE_RESERVED);
    143                 }
    144                
    145                 if (e820table[i].type == MEMMAP_MEMORY_ACPI) {
    146                         /* To be safe, make the firmware zone possibly larger */
    147                         uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE);
    148                         uint64_t new_size = ALIGN_UP(size + (base - new_base),
    149                             FRAME_SIZE);
    150                        
    151                         zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,
    152                             ZONE_FIRMWARE);
    153150                }
    154151        }
     
    203200#ifdef CONFIG_SMP
    204201                /* Reserve AP real mode bootstrap memory */
    205                 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 
     202                frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH,
    206203                    (hardcoded_unmapped_ktext_size +
    207204                    hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
Note: See TracChangeset for help on using the changeset viewer.