Changeset d43d2f7 in mainline for generic


Ignore:
Timestamp:
2005-12-06T19:42:04Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
090e7ea1
Parents:
795ff98
Message:

Cleanup and fixes.

Location:
generic
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • generic/include/mm/frame.h

    r795ff98 rd43d2f7  
    3636#include <synch/spinlock.h>
    3737#include <mm/buddy.h>
     38
     39#define ONE_FRAME       0
    3840
    3941#define FRAME_KA        1       /* skip frames conflicting with user address space */
  • generic/src/console/kconsole.c

    r795ff98 rd43d2f7  
    426426}
    427427
     428/** Print detailed description of 'describe' command. */
     429void desc_help(void)
     430{
     431        printf("Syntax: describe command_name\n");
     432}
     433
    428434/** Halt the kernel.
    429435 *
    430  * @param argv Argument vector.
    431  *
    432  * @return 0 on failure, 1 on success.
     436 * @param argv Argument vector (ignored).
     437 *
     438 * @return 0 on failure, 1 on success (never returns).
    433439 */
    434440int cmd_halt(cmd_arg_t *argv)
     
    437443        return 1;
    438444}
    439 
    440 /** Print detailed description of 'describe' command. */
    441 void desc_help(void)
    442 {
    443         printf("Syntax: describe command_name\n");
    444 }
  • generic/src/cpu/cpu.c

    r795ff98 rd43d2f7  
    6161
    6262                for (i=0; i < config.cpu_count; i++) {
    63                         cpus[i].stack = (__u8 *) frame_alloc(FRAME_KA | FRAME_PANIC,0);
     63                        cpus[i].stack = (__u8 *) frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME);
    6464                        if (!cpus[i].stack)
    6565                                panic("malloc/cpus[%d].stack\n", i);
  • generic/src/mm/page.c

    r795ff98 rd43d2f7  
    8080
    8181        if (GET_PTL1_FLAGS(ptl0, PTL0_INDEX(page)) & PAGE_NOT_PRESENT) {
    82                 newpt = frame_alloc(FRAME_KA, 0);
     82                newpt = frame_alloc(FRAME_KA, ONE_FRAME);
    8383                memsetb(newpt, PAGE_SIZE, 0);
    8484                SET_PTL1_ADDRESS(ptl0, PTL0_INDEX(page), KA2PA(newpt));
    85                 SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC);
     85                SET_PTL1_FLAGS(ptl0, PTL0_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE);
    8686        }
    8787
     
    8989
    9090        if (GET_PTL2_FLAGS(ptl1, PTL1_INDEX(page)) & PAGE_NOT_PRESENT) {
    91                 newpt = frame_alloc(FRAME_KA, 0);
     91                newpt = frame_alloc(FRAME_KA, ONE_FRAME);
    9292                memsetb(newpt, PAGE_SIZE, 0);
    9393                SET_PTL2_ADDRESS(ptl1, PTL1_INDEX(page), KA2PA(newpt));
    94                 SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC);
     94                SET_PTL2_FLAGS(ptl1, PTL1_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE);
    9595        }
    9696
     
    9898
    9999        if (GET_PTL3_FLAGS(ptl2, PTL2_INDEX(page)) & PAGE_NOT_PRESENT) {
    100                 newpt = frame_alloc(FRAME_KA, 0);
     100                newpt = frame_alloc(FRAME_KA, ONE_FRAME);
    101101                memsetb(newpt, PAGE_SIZE, 0);
    102102                SET_PTL3_ADDRESS(ptl2, PTL2_INDEX(page), KA2PA(newpt));
    103                 SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC);
     103                SET_PTL3_FLAGS(ptl2, PTL2_INDEX(page), PAGE_PRESENT | PAGE_USER | PAGE_EXEC | PAGE_CACHEABLE);
    104104        }
    105105
  • generic/src/mm/vm.c

    r795ff98 rd43d2f7  
    7070               
    7171                        src_ptl0 = (pte_t *) PA2KA((__address) GET_PTL0_ADDRESS());
    72                         dst_ptl0 = (pte_t *) frame_alloc(FRAME_KA | FRAME_PANIC, 0);
     72                        dst_ptl0 = (pte_t *) frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME);
    7373
    7474//                      memsetb((__address) dst_ptl0, PAGE_SIZE, 0);
     
    116116               
    117117                for (i=0; i<size; i++)
    118                         a->mapping[i] = frame_alloc(0,0);
     118                        a->mapping[i] = frame_alloc(0, ONE_FRAME);
    119119               
    120120                spinlock_initialize(&a->lock);
  • generic/src/proc/thread.c

    r795ff98 rd43d2f7  
    176176                spinlock_initialize(&t->lock);
    177177       
    178                 frame_ks = frame_alloc(FRAME_KA,0);
     178                frame_ks = frame_alloc(FRAME_KA, ONE_FRAME);
    179179                if (THREAD_USER_STACK & flags) {
    180                         frame_us = frame_alloc(FRAME_KA,0);
     180                        frame_us = frame_alloc(FRAME_KA, ONE_FRAME);
    181181                }
    182182
Note: See TracChangeset for help on using the changeset viewer.