comparison cp/guest/reset.c @ 618:535aec703236

cp: define a FIXME macro that leaves a sclp message There are far too many fixmes in the code. Sadly, the compiler simply discards them. This usually isn't an issue until one accidentally hits a "weird" bug which just turns out to be an unhandled (but documented) case in another part of the code. Using a macro instead of a comment will let the compiler string-ify the text, and then at runtime use SCLP to print it out. This will immediatelly point at problem areas. So, keep an eye on SCLP from now on :) Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Tue, 13 Dec 2011 22:20:50 -0500
parents 4510b22eea5a
children
comparison
equal deleted inserted replaced
617:a2bf150177bd 618:535aec703236
74 { 74 {
75 struct virt_cpu *cpu = sys->cpu; 75 struct virt_cpu *cpu = sys->cpu;
76 76
77 if (flags & RESET_CPU) { 77 if (flags & RESET_CPU) {
78 if (flags & SET_ESA390) { 78 if (flags & SET_ESA390) {
79 /* FIXME: set the arch mode to ESA/390 */ 79 FIXME("set the arch mode to ESA/390");
80 } 80 }
81 81
82 FIXME("clear interruptions (PROG, SVC, local EXT, MCHECK)");
82 /* 83 /*
83 * FIXME: clear interruptions: 84 * FIXME: clear interruptions:
84 * - PROG 85 * - PROG
85 * - SVC 86 * - SVC
86 * - local EXT (floating EXT are NOT cleared) 87 * - local EXT (floating EXT are NOT cleared)
95 96
96 if (flags & RESET_PREFIX) 97 if (flags & RESET_PREFIX)
97 cpu->sie_cb.prefix = 0; 98 cpu->sie_cb.prefix = 0;
98 99
99 if (flags & RESET_CPU_TIMER) { 100 if (flags & RESET_CPU_TIMER) {
100 /* FIXME */ 101 FIXME("");
101 } 102 }
102 103
103 if (flags & RESET_CLK_COMP) { 104 if (flags & RESET_CLK_COMP) {
104 /* FIXME */ 105 FIXME("");
105 } 106 }
106 107
107 if (flags & RESET_TOD_PROG_REG) { 108 if (flags & RESET_TOD_PROG_REG) {
108 /* FIXME */ 109 FIXME("");
109 } 110 }
110 111
111 if (flags & RESET_CR) { 112 if (flags & RESET_CR) {
112 memset(cpu->sie_cb.gcr, 0, 16*sizeof(u64)); 113 memset(cpu->sie_cb.gcr, 0, 16*sizeof(u64));
113 cpu->sie_cb.gcr[0] = 0xE0UL; 114 cpu->sie_cb.gcr[0] = 0xE0UL;
114 cpu->sie_cb.gcr[14] = 0xC2000000UL; 115 cpu->sie_cb.gcr[14] = 0xC2000000UL;
115 } 116 }
116 117
117 if (flags & RESET_BREAK_EV_ADDR) { 118 if (flags & RESET_BREAK_EV_ADDR) {
118 /* FIXME: initialize to 0x1 */ 119 FIXME("initialize to 0x1");
119 } 120 }
120 121
121 if (flags & RESET_FPCR) 122 if (flags & RESET_FPCR)
122 cpu->regs.fpcr = 0; 123 cpu->regs.fpcr = 0;
123 124
151 152
152 if (flags & RESET_TOD_STEER) { 153 if (flags & RESET_TOD_STEER) {
153 } 154 }
154 155
155 if (flags & RESET_PLO_LOCKS) { 156 if (flags & RESET_PLO_LOCKS) {
157 FIXME("if RESET_PLO_LOCKS_PRESERVE is set, don't reset locks...");
156 /* 158 /*
157 * TODO: if RESET_PLO_LOCKS_PRESERVE is set, don't reset 159 * TODO: if RESET_PLO_LOCKS_PRESERVE is set, don't reset
158 * locks held by powered on CPUS 160 * locks held by powered on CPUS
159 */ 161 */
160 } 162 }
168 if (flags & RESET_FLOATING_INTERRUPTIONS) { 170 if (flags & RESET_FLOATING_INTERRUPTIONS) {
169 } 171 }
170 172
171 if (flags & RESET_IO) { 173 if (flags & RESET_IO) {
172 for_each_vdev(sys, vdev) { 174 for_each_vdev(sys, vdev) {
173 /* FIXME: wait for I/O to complete? */ 175 FIXME("wait for I/O to complete?");
174 mutex_lock(&vdev->lock); 176 mutex_lock(&vdev->lock);
175 177
176 /* set to zero */ 178 /* set to zero */
177 vdev->pmcw.interrupt_param = 0; 179 vdev->pmcw.interrupt_param = 0;
178 vdev->pmcw.isc = 0; 180 vdev->pmcw.isc = 0;