[SeaBIOS] [PATCH] Add pvevent device driver
pvevent device is used to notify host(qemu) when guest panic happens. ref: http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02293.html Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/acpi-dsdt-isa.dsl | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..d083245 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -99,4 +99,34 @@ Scope(\_SB.PCI0.ISA) { IRQNoFlags() { 3 } }) } + +Device(PEVT) { +Name(_HID, MSFT0001) +OperationRegion(PEOR, SystemIO, 0x0505, 0x01) +Field(PEOR, ByteAcc, NoLock, Preserve) { +PEPT, 8, +} + +Method(_STA, 0, NotSerialized) { +Store(PEPT, Local0) +If (LEqual(Local0, Zero)) { +Return (0x00) +} Else { +Return (0x0F) +} +} + +Method(RDPT, 0, NotSerialized) { +Store(PEPT, Local0) +Return (Local0) +} + +Method(WRPT, 1, NotSerialized) { +Store(Arg0, PEPT) +} + +Name(_CRS, ResourceTemplate() { +IO(Decode16, 0x0505, 0x0505, 0x01, 0x01) +}) +} } -- 1.8.1.4 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add pvevent device driver
On Thu, Mar 14, 2013 at 10:57:18AM +0200, Gleb Natapov wrote: On Thu, Mar 14, 2013 at 04:48:47PM +0800, Hu Tao wrote: pvevent device is used to notify host(qemu) when guest panic happens. ref: http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02293.html Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/acpi-dsdt-isa.dsl | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..d083245 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -99,4 +99,34 @@ Scope(\_SB.PCI0.ISA) { IRQNoFlags() { 3 } }) } + +Device(PEVT) { +Name(_HID, MSFT0001) We cannot use MSFT! OK, I see now, we have to use QEMU0001 or like. More question: if I request ACPI ID: QEMU from pn...@microsoft.com, who should be CCed, Anthony, qemu-list or any others? +OperationRegion(PEOR, SystemIO, 0x0505, 0x01) IO port should be received form QEMU by fw_cfg and patched here at run time. If I'm right, io port can be passed to seabios through fw_cfg file interface, but I'm still figuring out how to patch DSDT here and below at run time. Maybe build_ssdt() is close to this. +Field(PEOR, ByteAcc, NoLock, Preserve) { +PEPT, 8, +} + +Method(_STA, 0, NotSerialized) { +Store(PEPT, Local0) +If (LEqual(Local0, Zero)) { +Return (0x00) +} Else { +Return (0x0F) +} +} No probing. If QEMU does not provide IO port function should be patched to return zero. + +Method(RDPT, 0, NotSerialized) { +Store(PEPT, Local0) +Return (Local0) +} + +Method(WRPT, 1, NotSerialized) { +Store(Arg0, PEPT) +} + +Name(_CRS, ResourceTemplate() { +IO(Decode16, 0x0505, 0x0505, 0x01, 0x01) +}) +} } -- 1.8.1.4 -- Gleb. ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add pvevent device driver
On Thu, Mar 14, 2013 at 05:33:19PM +0800, Hu Tao wrote: On Thu, Mar 14, 2013 at 10:57:18AM +0200, Gleb Natapov wrote: On Thu, Mar 14, 2013 at 04:48:47PM +0800, Hu Tao wrote: pvevent device is used to notify host(qemu) when guest panic happens. ref: http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02293.html Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- src/acpi-dsdt-isa.dsl | 30 ++ 1 file changed, 30 insertions(+) diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..d083245 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -99,4 +99,34 @@ Scope(\_SB.PCI0.ISA) { IRQNoFlags() { 3 } }) } + +Device(PEVT) { +Name(_HID, MSFT0001) We cannot use MSFT! OK, I see now, we have to use QEMU0001 or like. More question: if I request ACPI ID: QEMU from pn...@microsoft.com, who should be CCed, Anthony, qemu-list or any others? Cannot really answer that. I do not think mailing list should be included. My be Anthony should request the ID on behalf of QEMU project. +OperationRegion(PEOR, SystemIO, 0x0505, 0x01) IO port should be received form QEMU by fw_cfg and patched here at run time. If I'm right, io port can be passed to seabios through fw_cfg file interface, but I'm still figuring out how to patch DSDT here and below at run time. Maybe build_ssdt() is close to this. Yes, we already are doing similar things in build_ssdt(). -- Gleb. ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add pvevent device driver
On Thu, Mar 14, 2013 at 10:08:09AM +, David Woodhouse wrote: On Thu, 2013-03-14 at 10:57 +0200, Gleb Natapov wrote: +OperationRegion(PEOR, SystemIO, 0x0505, 0x01) IO port should be received form QEMU by fw_cfg and patched here at run time. Pfft. ACPI table should be received from QEMU. :) That's the feature that, as far as I understand, everyone agreed upon, but since we want to apply these patches before that feature is here we will have to do it old fashioned way for now. -- Gleb. ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] Minimal config for booting GRUB2 from SATA drive
Dear SeaBIOS folks, I am using coreboot on the ASRock E350M1 [1] with a SATA hard drive, I want to boot from using the GRUB2 bootloader. For now I’d like to use SeaBIOS 1.7.2.1 for jumping to the hard drive and execute(?) GRUB2. Using the default config file created by `make menuconfig` and selecting a coreboot build and serial debug, everything works fine. As I am using Debian GNU/Linux I do not need any BIOS calls provided by SeaBIOS and want to disable as much as possible too. So I disabled most stuff, but could not boot from the hard drive. # # Automatically generated make config: don't edit # SeaBIOS Configuration # Thu Mar 14 12:14:21 2013 # # # General Features # CONFIG_COREBOOT=y # CONFIG_QEMU is not set CONFIG_THREADS=y # CONFIG_THREAD_OPTIONROMS is not set CONFIG_RELOCATE_INIT=y CONFIG_BOOTMENU=y CONFIG_BOOTSPLASH=y CONFIG_BOOTORDER=y CONFIG_COREBOOT_FLASH=y CONFIG_LZMA=y # CONFIG_FLASH_FLOPPY is not set # # Hardware support # CONFIG_ATA=y # CONFIG_ATA_DMA is not set # CONFIG_ATA_PIO32 is not set CONFIG_AHCI=y # CONFIG_MEGASAS is not set # CONFIG_FLOPPY is not set CONFIG_USB=y CONFIG_USB_UHCI=y CONFIG_USB_OHCI=y CONFIG_USB_EHCI=y CONFIG_USB_MSC=y # CONFIG_USB_UAS is not set CONFIG_USB_HUB=y CONFIG_SERIAL=y # CONFIG_LPT is not set # # BIOS interfaces # CONFIG_DRIVES=y CONFIG_CDROM_BOOT=y CONFIG_CDROM_EMU=y # CONFIG_PCIBIOS is not set # CONFIG_APMBIOS is not set # CONFIG_PNPBIOS is not set CONFIG_OPTIONROMS=y # CONFIG_OPTIONROMS_DEPLOYED is not set # CONFIG_PMM is not set CONFIG_BOOT=y # CONFIG_KEYBOARD is not set # CONFIG_MOUSE is not set CONFIG_S3_RESUME=y # CONFIG_VGAHOOKS is not set # CONFIG_DISABLE_A20 is not set # # VGA ROM # CONFIG_NO_VGABIOS=y # CONFIG_VGA_GEODEGX2 is not set # CONFIG_VGA_GEODELX is not set # CONFIG_BUILD_VGABIOS is not set # # Debugging # CONFIG_DEBUG_LEVEL=2 CONFIG_DEBUG_SERIAL=y CONFIG_DEBUG_SERIAL_PORT=0x3f8 But SeaBIOS hangs at `Scan for option roms`. (`readserial.py` was used for capturing the log.) 01.081: Got a payload 01.081: Loading segment from rom address 0xffc9cc78 01.081: code (compression=0) 01.081: New segment dstaddr 0xec220 memsize 0x13de0 srcaddr 0xffc9ccb0 filesize 0x13de0 01.081: (cleaned up) New segment addr 0xec220 size 0x13de0 offset 0xffc9ccb0 filesize 0x13de0 01.081: Loading segment from rom address 0xffc9cc94 01.081: Entry Point 0x 01.081: Loading Segment: addr: 0x000ec220 memsz: 0x00013de0 filesz: 0x00013de0 01.081: lb: [0x0020, 0x0036) 01.081: Post relocation: addr: 0x000ec220 memsz: 0x00013de0 filesz: 0x00013de0 01.081: it's not compressed! 01.104: [ 0x000ec220, 0010, 0x0010) - ffc9ccb0 01.104: dest 000ec220, end 0010, bouncebuffer c7d2 01.104: Loaded segments 01.104: Jumping to boot code at fcdef 01.104: entry= 0x000fcdef 01.104: lb_start = 0x0020 01.104: lb_size = 0x0016 01.104: adjust = 0xc7c8 01.104: buffer = 0xc7d2 01.104: elf_boot_notes = 0x0026f008 01.105: adjusted_boot_notes = 0xc7eef008 01.107: Start bios (version rel-1.7.2.1-2-g0c4a0cf-20130314_121519-mye350m1) 01.107: Found mainboard ASROCK E350M1 01.107: Ram Size=0xc7fe (0x00011efffc00 high) 01.107: Relocating low data from 0x000ec9c0 to 0x000ef7a0 (size 2137) 01.107: Relocating init from 0x000ed219 to 0xc7fc7720 (size 34739) 01.107: Found CBFS header at 0xfbf0 01.109: CPU Mhz=1601 01.109: Found 23 PCI devices (max PCI bus is 01) 01.119: Found 2 cpu(s) max supported 2 cpu(s) 01.119: Copying PIR from 0xc7fe0400 to 0x000fe020 01.119: Copying MPTABLE from 0xc7fe1400/c7fe1410 to 0x000fdf10 01.120: Copying ACPI RSDP from 0xc7fe2400 to 0x000fdef0 01.120: Copying SMBIOS entry point from 0xc7fed800 to 0x000fded0 01.120: Scan for VGA option rom 01.139: Running option rom at c000:0003 01.193: Turning on vga text mode console 01.252: SeaBIOS (version rel-1.7.2.1-2-g0c4a0cf-20130314_121519-mye350m1) 01.252: EHCI init on dev 00:12.2 (regs=0xf004b420) 01.252: /c7fc5000\ Start thread 01.252: /c7fc4000\ Start thread 01.252: /c7fc3000\ Start thread 01.252: /c7fc2000\ Start thread 01.252: /c7fc1000\ Start thread 01.252: /c7fc\ Start thread 01.252: EHCI init on dev 00:13.2 (regs=0xf004b520) 01.253: /c7fbf000\ Start thread 01.252: /c7fbe000\ Start thread 01.253: /c7fbd000\ Start thread 01.253: /c7fbc000\ Start thread 01.253: /c7fbb000\ Start thread 01.253: /c7fba000\ Start thread 01.253: OHCI init on dev 00:14.5 (regs=0xf004a000) 01.253: /c7fb9000\ Start
Re: [SeaBIOS] Minimal config for booting GRUB2 from SATA drive
On Thu, Mar 14, 2013 at 03:57:00PM +0100, Paul Menzel wrote: Dear SeaBIOS folks, I am using coreboot on the ASRock E350M1 [1] with a SATA hard drive, I want to boot from using the GRUB2 bootloader. For now I’d like to use SeaBIOS 1.7.2.1 for jumping to the hard drive and execute(?) GRUB2. Using the default config file created by `make menuconfig` and selecting a coreboot build and serial debug, everything works fine. As I am using Debian GNU/Linux I do not need any BIOS calls provided by SeaBIOS and want to disable as much as possible too. So I disabled most stuff, but could not boot from the hard drive. Can you up the debug level to 8 on the failed boot case and report the results? -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH 0/2][RFC] Remove BDAT from ACPI interface
On Fri, Mar 08, 2013 at 11:11:42AM +0100, Gerd Hoffmann wrote: On 03/07/13 04:04, Kevin O'Connor wrote: This patch changes SeaBIOS to pass the PCI regions via a dynamically updated SSDT instead of via the BDAT memory reference system. This change will likely make it easier to port the ACPI tables to QEMU. This patch has only been lightly tested. Looks good to me survived my testing. Thanks. I pushed this series. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
[SeaBIOS] [PATCH 1/2] virtio-scsi: Set _DRIVER_OK flag before scsi target scanning
Before we start scsi target scanning, we need to set the VIRTIO_CONFIG_S_DRIVER_OK flag so the device can do setup properly. This fix a bug when booting tcm_vhost with seabios. Signed-off-by: Asias He as...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com --- src/virtio-scsi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/virtio-scsi.c b/src/virtio-scsi.c index 879ddfb..4de1255 100644 --- a/src/virtio-scsi.c +++ b/src/virtio-scsi.c @@ -147,6 +147,9 @@ init_virtio_scsi(struct pci_device *pci) goto fail; } +vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE | + VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK); + int i, tot; for (tot = 0, i = 0; i 256; i++) tot += virtio_scsi_scan_target(pci, ioaddr, vq, i); @@ -154,8 +157,6 @@ init_virtio_scsi(struct pci_device *pci) if (!tot) goto fail; -vp_set_status(ioaddr, VIRTIO_CONFIG_S_ACKNOWLEDGE | - VIRTIO_CONFIG_S_DRIVER | VIRTIO_CONFIG_S_DRIVER_OK); return; fail: -- 1.8.1.4 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios