Changeset ae318d3 in mainline for kernel/arch/sparc64


Ignore:
Timestamp:
2009-02-16T18:50:48Z (17 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
06da55b
Parents:
17f168e
Message:

overhaul pareas: use one single physical area for the physical address space not belonging to physical memory

Location:
kernel/arch/sparc64
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/mm/frame.h

    r17f168e rae318d3  
    7474
    7575extern uintptr_t last_frame;
     76extern uintptr_t end_frame;
    7677extern void frame_arch_init(void);
    7778#define physmem_print()
  • kernel/arch/sparc64/src/drivers/sgcn.c

    r17f168e rae318d3  
    162162
    163163/**
    164  * Registers the physical area of the SRAM so that the userspace SGCN
    165  * driver can map it. Moreover, it sets some sysinfo values (SRAM address
    166  * and SRAM size).
    167  */
    168 static void register_sram_parea(uintptr_t sram_begin_physical)
    169 {
    170         static parea_t sram_parea;
    171         sram_parea.pbase = sram_begin_physical;
    172         sram_parea.vbase = (uintptr_t) sram_begin;
    173         sram_parea.frames = MAPPED_AREA_SIZE / FRAME_SIZE;
    174         sram_parea.cacheable = false;
    175         ddi_parea_register(&sram_parea);
    176        
     164 * Set some sysinfo values (SRAM address and SRAM size).
     165 */
     166static void register_sram(uintptr_t sram_begin_physical)
     167{
    177168        sysinfo_set_item_val("sram.area.size", NULL, MAPPED_AREA_SIZE);
    178169        sysinfo_set_item_val("sram.address.physical", NULL,
     
    212203        sram_begin = hw_map(sram_begin_physical, MAPPED_AREA_SIZE);
    213204       
    214         register_sram_parea(sram_begin_physical);
     205        register_sram(sram_begin_physical);
    215206}
    216207
  • kernel/arch/sparc64/src/mm/frame.c

    r17f168e rae318d3  
    4242
    4343uintptr_t last_frame = NULL;
     44uintptr_t end_frame = NULL;
    4445
    4546/** Create memory zones according to information stored in bootinfo.
     
    8182        }
    8283       
     84        end_frame = last_frame;
    8385}
    8486
  • kernel/arch/sparc64/src/mm/page.c

    r17f168e rae318d3  
    148148                    sizemap[order].pagesize_code, true, false);
    149149       
    150 #ifdef CONFIG_SMP       
     150#ifdef CONFIG_SMP
    151151                /*
    152152                 * Second, save the information about the mapping for APs.
     
    165165}
    166166
     167void hw_area(uintptr_t *physaddr, pfn_t *frames)
     168{
     169        *physaddr = end_frame;
     170        *frames = ADDR2PFN(0x7ffffffffff - end_frame);
     171}
     172
    167173/** @}
    168174 */
    169 
Note: See TracChangeset for help on using the changeset viewer.