Changeset 3a0a4d8 in mainline for kernel/arch/ia64/src
- Timestamp:
- 2013-09-12T07:54:05Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 95027b5
- Parents:
- 47f5a77 (diff), 64f3d3b (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. - Location:
- kernel/arch/ia64/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/src/ddi/ddi.c
r47f5a77 r3a0a4d8 1 1 /* 2 2 * Copyright (c) 2006 Jakub Jermar 3 * Copyright (c) 2008 Jakub vana3 * Copyright (c) 2008 Jakub Vana 4 4 * All rights reserved. 5 5 * … … 56 56 { 57 57 if (!task->arch.iomap) { 58 uint8_t *map;59 60 58 task->arch.iomap = malloc(sizeof(bitmap_t), 0); 61 map = malloc(BITS2BYTES(IO_MEMMAP_PAGES), 0); 62 if(!map) 59 if (task->arch.iomap == NULL) 63 60 return ENOMEM; 64 bitmap_initialize(task->arch.iomap, map, IO_MEMMAP_PAGES); 61 62 void *store = malloc(bitmap_size(IO_MEMMAP_PAGES, 0), 0); 63 if (store == NULL) 64 return ENOMEM; 65 66 bitmap_initialize(task->arch.iomap, IO_MEMMAP_PAGES, 0, store); 65 67 bitmap_clear_range(task->arch.iomap, 0, IO_MEMMAP_PAGES); 66 68 } … … 69 71 size = ALIGN_UP(size + ioaddr - 4 * iopage, PORTS_PER_PAGE); 70 72 bitmap_set_range(task->arch.iomap, iopage, size / 4); 71 73 72 74 return 0; 73 75 } -
kernel/arch/ia64/src/mm/vhpt.c
r47f5a77 r3a0a4d8 42 42 uintptr_t vhpt_set_up(void) 43 43 { 44 vhpt_base = frame_alloc(VHPT_WIDTH - FRAME_WIDTH,45 FRAME_KA | FRAME_ATOMIC);46 if (!vhpt_ base)44 uintptr_t vhpt_frame = 45 frame_alloc(SIZE2FRAMES(VHPT_SIZE), FRAME_ATOMIC, 0); 46 if (!vhpt_frame) 47 47 panic("Kernel configured with VHPT but no memory for table."); 48 49 vhpt_base = (vhpt_entry_t *) PA2KA(vhpt_frame); 48 50 vhpt_invalidate_all(); 49 51 return (uintptr_t) vhpt_base; … … 82 84 void vhpt_invalidate_all() 83 85 { 84 memsetb(vhpt_base, 1 << VHPT_WIDTH, 0);86 memsetb(vhpt_base, VHPT_SIZE, 0); 85 87 } 86 88
Note:
See TracChangeset
for help on using the changeset viewer.