Changeset 15819e37 in mainline
- Timestamp:
- 2007-02-04T21:04:36Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7d307e7
- Parents:
- 5573942
- Location:
- kernel/arch/ia64
- Files:
-
- 4 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia64/Makefile.inc
r5573942 r15819e37 90 90 91 91 ifeq ($(MACHINE),i460GX) 92 ARCH_SOURCES += arch/$(ARCH)/src/ simics/ega.c92 ARCH_SOURCES += arch/$(ARCH)/src/drivers/ega.c 93 93 DEFS += -DI460GX 94 94 endif -
kernel/arch/ia64/include/drivers/ega.h
r5573942 r15819e37 34 34 */ 35 35 36 #ifndef simics_ega_h37 #define simics_ega_h36 #ifndef KERN_ia64_EGA_H 37 #define KERN_ia64_EGA_H 38 38 39 39 #define VIDEORAM (0xE0000000000B8000LL) … … 49 49 /** @} 50 50 */ 51 -
kernel/arch/ia64/src/cpu/cpu.c
r5573942 r15819e37 52 52 { 53 53 char *family_str; 54 char vendor[2 *sizeof(uint64_t)+1];54 char vendor[2 * sizeof(uint64_t) + 1]; 55 55 56 *((uint64_t *) &vendor[0 *sizeof(uint64_t)]) = CPU->arch.cpuid0;57 *((uint64_t *) &vendor[1 *sizeof(uint64_t)]) = CPU->arch.cpuid1;58 vendor[sizeof(vendor) -1] = '\0';56 *((uint64_t *) &vendor[0 * sizeof(uint64_t)]) = CPU->arch.cpuid0; 57 *((uint64_t *) &vendor[1 * sizeof(uint64_t)]) = CPU->arch.cpuid1; 58 vendor[sizeof(vendor) - 1] = '\0'; 59 59 60 60 switch(m->arch.cpuid3.family) { 61 62 61 case FAMILY_ITANIUM: 62 family_str = "Itanium"; 63 63 break; 64 65 64 case FAMILY_ITANIUM2: 65 family_str = "Itanium 2"; 66 66 break; 67 68 67 default: 68 family_str = "Unknown"; 69 69 break; 70 70 } 71 71 72 printf("cpu%d: %s (%s), archrev=%d, model=%d, revision=%d\n", CPU->id, family_str, vendor, CPU->arch.cpuid3.archrev, CPU->arch.cpuid3.model, CPU->arch.cpuid3.revision); 72 printf("cpu%d: %s (%s), archrev=%d, model=%d, revision=%d\n", CPU->id, 73 family_str, vendor, CPU->arch.cpuid3.archrev, CPU->arch.cpuid3.model, 74 CPU->arch.cpuid3.revision); 73 75 } 74 76 -
kernel/arch/ia64/src/drivers/ega.c
r5573942 r15819e37 46 46 #include <console/console.h> 47 47 #include <sysinfo/sysinfo.h> 48 #include <arch/ simics/ega.h>48 #include <arch/drivers/ega.h> 49 49 50 50 /* … … 67 67 void ega_init(void) 68 68 { 69 70 69 videoram = (uint8_t *) (VIDEORAM); 70 71 /* 72 * Clear the screen. 73 */ 74 _memsetw((uintptr_t) videoram, SCREEN, 0x0720); 71 75 72 76 chardev_initialize("ega_out", &ega_console, &ega_ops); … … 87 91 { 88 92 videoram[ega_cursor * 2] = ch; 89 videoram[ega_cursor * 2 +1] = 7;93 videoram[ega_cursor * 2 + 1] = 7; 90 94 } 91 95 … … 95 99 static void ega_check_cursor(void) 96 100 { 97 int i;98 101 if (ega_cursor < SCREEN) 99 102 return; 100 103 101 104 memcpy((void *) videoram, (void *) (videoram + ROW * 2), (SCREEN - ROW) * 2); 102 for(i=0;i<ROW*2;i+=2) 103 { 104 videoram[(SCREEN-ROW)*2+i+0]=0x20; 105 videoram[(SCREEN-ROW)*2+i+1]=0x07; 106 } 105 _memsetw((uintptr_t) (videoram + (SCREEN - ROW) * 2), ROW, 0x0720); 107 106 ega_cursor = ega_cursor - ROW; 108 107 } … … 137 136 } 138 137 139 140 138 /** @} 141 139 */ -
kernel/arch/ia64/src/ia64.c
r5573942 r15819e37 51 51 #include <syscall/syscall.h> 52 52 #include <ddi/irq.h> 53 #include <arch/ simics/ega.h>53 #include <arch/drivers/ega.h> 54 54 55 55 void arch_pre_main(void) -
kernel/arch/ia64/src/start.S
r5573942 r15819e37 49 49 # Fill TR.i and TR.d using Region Register #VRN_KERNEL 50 50 51 movl r8 =(VRN_KERNEL<<VRN_SHIFT)52 mov r9 =rr[r8]53 movl r10 =(RR_MASK)54 and r9 =r10,r955 movl r10 =((RID_KERNEL<<RID_SHIFT)|(KERNEL_PAGE_WIDTH<<PS_SHIFT))56 or r9 =r10,r957 mov rr[r8] =r951 movl r8 = (VRN_KERNEL << VRN_SHIFT) 52 mov r9 = rr[r8] 53 movl r10 = (RR_MASK) 54 and r9 = r10, r9 55 movl r10 = ((RID_KERNEL << RID_SHIFT) | (KERNEL_PAGE_WIDTH << PS_SHIFT)) 56 or r9 = r10, r9 57 mov rr[r8] = r9 58 58 59 movl r8 =(VRN_KERNEL<<VRN_SHIFT)60 mov cr.ifa =r861 movl r10 =(KERNEL_PAGE_WIDTH<<PS_SHIFT)62 mov cr.itir =r1063 movl r10 =(KERNEL_TRANSLATION_I)64 itr.i itr[r0] =r1065 movl r10 =(KERNEL_TRANSLATION_D)66 itr.d dtr[r0] =r1059 movl r8 = (VRN_KERNEL << VRN_SHIFT) 60 mov cr.ifa = r8 61 movl r10 = (KERNEL_PAGE_WIDTH << PS_SHIFT) 62 mov cr.itir = r10 63 movl r10 = (KERNEL_TRANSLATION_I) 64 itr.i itr[r0] = r10 65 movl r10 = (KERNEL_TRANSLATION_D) 66 itr.d dtr[r0] = r10 67 67 68 68 # initialize PSR … … 70 70 srlz.i 71 71 srlz.d 72 movl r10 =(PSR_DT_MASK|PSR_RT_MASK|PSR_IT_MASK|PSR_IC_MASK) /* Enable paging */73 mov r9 =psr74 or r10 =r10,r975 mov cr.ipsr =r1076 mov cr.ifs =r077 movl r8 =paging_start78 mov cr.iip =r872 movl r10 = (PSR_DT_MASK | PSR_RT_MASK | PSR_IT_MASK | PSR_IC_MASK) /* Enable paging */ 73 mov r9 = psr 74 or r10 = r10, r9 75 mov cr.ipsr = r10 76 mov cr.ifs = r0 77 movl r8 = paging_start 78 mov cr.iip = r8 79 79 srlz.d 80 80 srlz.i … … 98 98 # initialize register stack 99 99 mov ar.rsc = r0 100 movl r8 =(VRN_KERNEL<<VRN_SHIFT) ;;100 movl r8 = (VRN_KERNEL << VRN_SHIFT) ;; 101 101 mov ar.bspstore = r8 102 102 loadrs 103 103 104 104 # initialize memory stack to some sane value 105 movl r12 = stack0 ;;105 movl r12 = stack0 ;; 106 106 107 add r12 = - 107 add r12 = -16, r12 /* allocate a scratch area on the stack */ 108 108 109 109 # initialize gp (Global Pointer) register … … 124 124 st8 [r19] = r16 125 125 126 ssm (1 <<19);; /* Disable f32 - f127 */127 srlz.i ;128 srlz.d ;;126 ssm (1 << 19) ;; /* Disable f32 - f127 */ 127 srlz.i 128 srlz.d ;; 129 129 130 130 br.call.sptk.many b0 = arch_pre_main 131 131 132 movl r18 =main_bsp ;;133 mov b1 =r18 ;;134 br.call.sptk.many b0 =b1132 movl r18 = main_bsp ;; 133 mov b1 = r18 ;; 134 br.call.sptk.many b0 = b1 135 135 136 136
Note:
See TracChangeset
for help on using the changeset viewer.