Changeset b76e51d in mainline
- Timestamp:
- 2009-03-12T18:06:43Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1410f35
- Parents:
- 99495b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/mips32/src/mm/frame.c
r99495b6 rb76e51d 41 41 #include <config.h> 42 42 #include <arch/drivers/msim.h> 43 #include <arch/drivers/serial.h>44 43 #include <print.h> 45 44 46 #define ZERO_PAGE_MASK TLB_PAGE_MASK_256K 47 #define ZERO_FRAMES 2048 48 #define ZERO_PAGE_WIDTH 18 /* 256K */ 49 #define ZERO_PAGE_SIZE (1 << ZERO_PAGE_WIDTH) 50 #define ZERO_PAGE_ASID ASID_INVALID 51 #define ZERO_PAGE_TLBI 0 52 #define ZERO_PAGE_ADDR 0 53 #define ZERO_PAGE_OFFSET (ZERO_PAGE_SIZE / sizeof(uint32_t) - 1) 54 #define ZERO_PAGE_VALUE (((volatile uint32_t *) ZERO_PAGE_ADDR)[ZERO_PAGE_OFFSET]) 55 56 #define ZERO_PAGE_VALUE_KSEG1(frame) (((volatile uint32_t *) (0xa0000000 + (frame << ZERO_PAGE_WIDTH)))[ZERO_PAGE_OFFSET]) 57 58 #define MAX_REGIONS 32 45 #define ZERO_PAGE_MASK TLB_PAGE_MASK_256K 46 #define ZERO_FRAMES 2048 47 #define ZERO_PAGE_WIDTH 18 /* 256K */ 48 #define ZERO_PAGE_SIZE (1 << ZERO_PAGE_WIDTH) 49 #define ZERO_PAGE_ASID ASID_INVALID 50 #define ZERO_PAGE_TLBI 0 51 #define ZERO_PAGE_ADDR 0 52 #define ZERO_PAGE_OFFSET (ZERO_PAGE_SIZE / sizeof(uint32_t) - 1) 53 #define ZERO_PAGE_VALUE (((volatile uint32_t *) ZERO_PAGE_ADDR)[ZERO_PAGE_OFFSET]) 54 55 #define ZERO_PAGE_VALUE_KSEG1(frame) \ 56 (((volatile uint32_t *) (0xa0000000 + (frame << ZERO_PAGE_WIDTH)))[ZERO_PAGE_OFFSET]) 57 58 #define MAX_REGIONS 32 59 59 60 60 typedef struct { … … 66 66 static phys_region_t phys_regions[MAX_REGIONS]; 67 67 68 69 68 /** Check whether frame is available 70 69 * … … 85 84 return false; 86 85 #endif 87 88 #ifdef MACHINE_simics 89 /* Simics device (serial line) */ 90 if (frame == (KA2PA(SERIAL_ADDRESS) >> ZERO_PAGE_WIDTH)) 91 return false; 92 #endif 93 86 94 87 #if defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul) 95 88 /* gxemul devices */
Note:
See TracChangeset
for help on using the changeset viewer.