Revision 22486aa0 target-s390x/op_helper.c

b/target-s390x/op_helper.c
2361 2361
int sclp_service_call(CPUState *env, uint32_t sccb, uint64_t code)
2362 2362
{
2363 2363
    int r = 0;
2364
    int shift = 0;
2364 2365

  
2365 2366
#ifdef DEBUG_HELPER
2366 2367
    printf("sclp(0x%x, 0x%" PRIx64 ")\n", sccb, code);
......
2375 2376
    switch(code) {
2376 2377
        case SCLP_CMDW_READ_SCP_INFO:
2377 2378
        case SCLP_CMDW_READ_SCP_INFO_FORCED:
2378
            stw_phys(sccb + SCP_MEM_CODE, ram_size >> 20);
2379
            stb_phys(sccb + SCP_INCREMENT, 1);
2379
            while ((ram_size >> (20 + shift)) > 65535) {
2380
                shift++;
2381
            }
2382
            stw_phys(sccb + SCP_MEM_CODE, ram_size >> (20 + shift));
2383
            stb_phys(sccb + SCP_INCREMENT, 1 << shift);
2380 2384
            stw_phys(sccb + SCP_RESPONSE_CODE, 0x10);
2381 2385

  
2382 2386
            if (kvm_enabled()) {

Also available in: Unified diff