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


Ignore:
Timestamp:
2011-04-13T14:45:41Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88634420
Parents:
cefb126 (diff), 17279ead (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

    rcefb126 r89c57b6  
    4444#include <align.h>
    4545#include <macros.h>
    46 
    4746#include <print.h>
    4847
    49 #define PHYSMEM_LIMIT32  0x07c000000ull
    50 #define PHYSMEM_LIMIT64  0x200000000ull
     48#define PHYSMEM_LIMIT32  UINT64_C(0x07c000000)
     49#define PHYSMEM_LIMIT64  UINT64_C(0x200000000)
    5150
    5251size_t hardcoded_unmapped_ktext_size = 0;
     
    131130                        if (last_frame < ALIGN_UP(new_base + new_size, FRAME_SIZE))
    132131                                last_frame = ALIGN_UP(new_base + new_size, FRAME_SIZE);
    133                 }
    134                
    135                 if (e820table[i].type == MEMMAP_MEMORY_RESERVED) {
     132                } else if ((e820table[i].type == MEMMAP_MEMORY_ACPI) ||
     133                    (e820table[i].type == MEMMAP_MEMORY_NVS)) {
     134                        /* To be safe, make the firmware zone possibly larger */
     135                        uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE);
     136                        uint64_t new_size = ALIGN_UP(size + (base - new_base),
     137                            FRAME_SIZE);
     138                       
     139                        zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,
     140                            ZONE_FIRMWARE);
     141                } else {
    136142                        /* To be safe, make the reserved zone possibly larger */
    137143                        uint64_t new_base = ALIGN_DOWN(base, FRAME_SIZE);
     
    141147                        zone_create(ADDR2PFN(new_base), SIZE2FRAMES(new_size), 0,
    142148                            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);
    153149                }
    154150        }
     
    203199#ifdef CONFIG_SMP
    204200                /* Reserve AP real mode bootstrap memory */
    205                 frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH, 
     201                frame_mark_unavailable(AP_BOOT_OFFSET >> FRAME_WIDTH,
    206202                    (hardcoded_unmapped_ktext_size +
    207203                    hardcoded_unmapped_kdata_size) >> FRAME_WIDTH);
Note: See TracChangeset for help on using the changeset viewer.