Revision 82663ee2 hw/pc.c

b/hw/pc.c
549 549
    *p++ = 0x1f;		/* pop ds */
550 550
    *p++ = 0x58;		/* pop ax */
551 551
    *p++ = 0xcb;		/* lret */
552
    
552

  
553 553
    /* Actual code */
554 554
    *reloc = (p - rom);
555 555

  
......
738 738
            if ((next_space = strchr(initrd_filename, ' ')))
739 739
                *next_space = '\0';
740 740
#ifdef DEBUG_MULTIBOOT
741
	     printf("multiboot loading module: %s\n", initrd_filename);
741
            printf("multiboot loading module: %s\n", initrd_filename);
742 742
#endif
743 743
            f = fopen(initrd_filename, "rb");
744 744
            if (f) {
......
858 858
	   treating it like a Linux kernel. */
859 859
	if (load_multiboot(fw_cfg, f, kernel_filename,
860 860
                           initrd_filename, kernel_cmdline, header))
861
	   return;
861
            return;
862 862
	protocol = 0;
863 863
    }
864 864

  
......
1058 1058
static int load_option_rom(const char *oprom, target_phys_addr_t start,
1059 1059
                           target_phys_addr_t end)
1060 1060
{
1061
        int size;
1062
        char *filename;
1063

  
1064
        filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, oprom);
1065
        if (filename) {
1066
            size = get_image_size(filename);
1067
            if (size > 0 && start + size > end) {
1068
                fprintf(stderr, "Not enough space to load option rom '%s'\n",
1069
                        oprom);
1070
                exit(1);
1071
            }
1072
            size = load_image_targphys(filename, start, end - start);
1073
            qemu_free(filename);
1074
        } else {
1075
            size = -1;
1076
        }
1077
        if (size < 0) {
1078
            fprintf(stderr, "Could not load option rom '%s'\n", oprom);
1061
    int size;
1062
    char *filename;
1063

  
1064
    filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, oprom);
1065
    if (filename) {
1066
        size = get_image_size(filename);
1067
        if (size > 0 && start + size > end) {
1068
            fprintf(stderr, "Not enough space to load option rom '%s'\n",
1069
                    oprom);
1079 1070
            exit(1);
1080 1071
        }
1081
        /* Round up optiom rom size to the next 2k boundary */
1082
        size = (size + 2047) & ~2047;
1083
        option_rom_setup_reset(start, size);
1084
        return size;
1072
        size = load_image_targphys(filename, start, end - start);
1073
        qemu_free(filename);
1074
    } else {
1075
        size = -1;
1076
    }
1077
    if (size < 0) {
1078
        fprintf(stderr, "Could not load option rom '%s'\n", oprom);
1079
        exit(1);
1080
    }
1081
    /* Round up optiom rom size to the next 2k boundary */
1082
    size = (size + 2047) & ~2047;
1083
    option_rom_setup_reset(start, size);
1084
    return size;
1085 1085
}
1086 1086

  
1087 1087
int cpu_is_bsp(CPUState *env)
1088 1088
{
1089
	return env->cpuid_apic_id == 0;
1089
    return env->cpuid_apic_id == 0;
1090 1090
}
1091 1091

  
1092 1092
static CPUState *pc_new_cpu(const char *cpu_model)

Also available in: Unified diff