Merge remote-tracking branch 'stefanha/trivial-patches' into staging

# By Dunrong Huang (1) and others
# Via Stefan Hajnoczi
* stefanha/trivial-patches:
  hw/tcx: Remove unused 'addr' field and the property that sets it
  hw/i386/pc: format load_linux function
  configure: show debug-info option in --help output
This commit is contained in:
Anthony Liguori 2013-04-01 10:36:09 -05:00
commit c7b4c36714
4 changed files with 58 additions and 56 deletions

2
configure vendored
View file

@ -1062,6 +1062,8 @@ echo " --localstatedir=PATH install local state in PATH"
echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]" echo " --with-confsuffix=SUFFIX suffix for QEMU data inside datadir and sysconfdir [$confsuffix]"
echo " --enable-debug-tcg enable TCG debugging" echo " --enable-debug-tcg enable TCG debugging"
echo " --disable-debug-tcg disable TCG debugging (default)" echo " --disable-debug-tcg disable TCG debugging (default)"
echo " --enable-debug-info enable debugging information (default)"
echo " --disable-debug-info disable debugging information"
echo " --enable-debug enable common debug build options" echo " --enable-debug enable common debug build options"
echo " --enable-sparse enable sparse checker" echo " --enable-sparse enable sparse checker"
echo " --disable-sparse disable sparse checker (default)" echo " --disable-sparse disable sparse checker (default)"

View file

@ -675,14 +675,15 @@ static void load_linux(void *fw_cfg,
#if 0 #if 0
fprintf(stderr, "header magic: %#x\n", ldl_p(header+0x202)); fprintf(stderr, "header magic: %#x\n", ldl_p(header+0x202));
#endif #endif
if (ldl_p(header+0x202) == 0x53726448) if (ldl_p(header+0x202) == 0x53726448) {
protocol = lduw_p(header+0x206); protocol = lduw_p(header+0x206);
else { } else {
/* This looks like a multiboot kernel. If it is, let's stop /* This looks like a multiboot kernel. If it is, let's stop
treating it like a Linux kernel. */ treating it like a Linux kernel. */
if (load_multiboot(fw_cfg, f, kernel_filename, initrd_filename, if (load_multiboot(fw_cfg, f, kernel_filename, initrd_filename,
kernel_cmdline, kernel_size, header)) kernel_cmdline, kernel_size, header)) {
return; return;
}
protocol = 0; protocol = 0;
} }
@ -714,10 +715,11 @@ static void load_linux(void *fw_cfg,
#endif #endif
/* highest address for loading the initrd */ /* highest address for loading the initrd */
if (protocol >= 0x203) if (protocol >= 0x203) {
initrd_max = ldl_p(header+0x22c); initrd_max = ldl_p(header+0x22c);
else } else {
initrd_max = 0x37ffffff; initrd_max = 0x37ffffff;
}
if (initrd_max >= max_ram_size-ACPI_DATA_SIZE) if (initrd_max >= max_ram_size-ACPI_DATA_SIZE)
initrd_max = max_ram_size-ACPI_DATA_SIZE-1; initrd_max = max_ram_size-ACPI_DATA_SIZE-1;
@ -755,9 +757,9 @@ static void load_linux(void *fw_cfg,
/* High nybble = B reserved for QEMU; low nybble is revision number. /* High nybble = B reserved for QEMU; low nybble is revision number.
If this code is substantially changed, you may want to consider If this code is substantially changed, you may want to consider
incrementing the revision. */ incrementing the revision. */
if (protocol >= 0x200) if (protocol >= 0x200) {
header[0x210] = 0xB0; header[0x210] = 0xB0;
}
/* heap */ /* heap */
if (protocol >= 0x201) { if (protocol >= 0x201) {
header[0x211] |= 0x80; /* CAN_USE_HEAP */ header[0x211] |= 0x80; /* CAN_USE_HEAP */
@ -793,8 +795,9 @@ static void load_linux(void *fw_cfg,
/* load kernel and setup */ /* load kernel and setup */
setup_size = header[0x1f1]; setup_size = header[0x1f1];
if (setup_size == 0) if (setup_size == 0) {
setup_size = 4; setup_size = 4;
}
setup_size = (setup_size+1)*512; setup_size = (setup_size+1)*512;
kernel_size -= setup_size; kernel_size -= setup_size;

View file

@ -575,7 +575,6 @@ static void tcx_init(hwaddr addr, int vram_size, int width,
SysBusDevice *s; SysBusDevice *s;
dev = qdev_create(NULL, "SUNW,tcx"); dev = qdev_create(NULL, "SUNW,tcx");
qdev_prop_set_taddr(dev, "addr", addr);
qdev_prop_set_uint32(dev, "vram_size", vram_size); qdev_prop_set_uint32(dev, "vram_size", vram_size);
qdev_prop_set_uint16(dev, "width", width); qdev_prop_set_uint16(dev, "width", width);
qdev_prop_set_uint16(dev, "height", height); qdev_prop_set_uint16(dev, "height", height);

View file

@ -37,7 +37,6 @@
typedef struct TCXState { typedef struct TCXState {
SysBusDevice busdev; SysBusDevice busdev;
hwaddr addr;
QemuConsole *con; QemuConsole *con;
uint8_t *vram; uint8_t *vram;
uint32_t *vram24, *cplane; uint32_t *vram24, *cplane;
@ -707,7 +706,6 @@ write_err:
} }
static Property tcx_properties[] = { static Property tcx_properties[] = {
DEFINE_PROP_TADDR("addr", TCXState, addr, -1),
DEFINE_PROP_HEX32("vram_size", TCXState, vram_size, -1), DEFINE_PROP_HEX32("vram_size", TCXState, vram_size, -1),
DEFINE_PROP_UINT16("width", TCXState, width, -1), DEFINE_PROP_UINT16("width", TCXState, width, -1),
DEFINE_PROP_UINT16("height", TCXState, height, -1), DEFINE_PROP_UINT16("height", TCXState, height, -1),