On Tue, Dec 24, 2013 at 02:09:17AM +0100, Idwer Vollering wrote:
> 2013/12/24 Kevin O'Connor <kevin(a)koconnor.net>:
> > On Sun, Dec 22, 2013 at 09:54:02PM -0500, Kevin O'Connor wrote:
> > FYI, it seems my USB3 controller really wants to see 64bit writes to
> > pci registers. With the change below (on top of the other changes) I
> > can now boot my e350m1 from a USB3 flash drive.
> >
> > I'm still seeing failures on my keyboard/mouse though:
[...]
> This is captured on my f2a85-m, with CONFIG_DEBUG_LEVEL=7:
Hi Idwer,
>From IRC, I understand that after you applied my last "status
direction" patch you were able to get your high speed flash device to
work on the xhci controller, but not your keyboard.
Can you also try the patch below? I still can't get any high/low
speed devices to work (though my super speed flash device does work).
Maybe you'll have more luck with this patch though.
-Kevin
commit 5779c75cbea304d182a0291efd1f9422922200ce
Author: Kevin O'Connor <kevin(a)koconnor.net>
Date: Fri Dec 27 13:37:11 2013 -0500
xhci: Set the interval parameter on interrupt pipes.
Be sure to set the interval parameter when creating an interrupt based
pipe.
Signed-off-by: Kevin O'Connor <kevin(a)koconnor.net>
diff --git a/src/hw/usb-xhci.c b/src/hw/usb-xhci.c
index d0df6ee..9d5449c 100644
--- a/src/hw/usb-xhci.c
+++ b/src/hw/usb-xhci.c
@@ -895,6 +895,8 @@ xhci_alloc_pipe(struct usbdevice_s *usbdev
in->slot.ctx[0] |= (31 << 27); // context entries
int e = pipe->epid-1;
+ if (eptype == USB_ENDPOINT_XFER_INT)
+ in->ep[e].ctx[0] = (usb_getFrameExp(usbdev, epdesc) + 3) << 16;
in->ep[e].ctx[1] |= (eptype << 3);
if (epdesc->bEndpointAddress & USB_DIR_IN)
in->ep[e].ctx[1] |= (1 << 5);
The total number of blocks transferred is part of the return status of
the BIOS API. This is normally the total number of blocks requested.
However, in an error it is possible for this count to be less. Add a
global check to ensure that on an error event the block count is
updated - if it hasn't been updated, assume that no blocks have been
transferred successfully (the common case).
Signed-off-by: Kevin O'Connor <kevin(a)koconnor.net>
---
src/block.c | 40 +++++++++++++++++++++++++++-------------
1 file changed, 27 insertions(+), 13 deletions(-)
diff --git a/src/block.c b/src/block.c
index 7493a5d..4fbf058 100644
--- a/src/block.c
+++ b/src/block.c
@@ -350,28 +350,37 @@ int
process_op(struct disk_op_s *op)
{
ASSERT16();
+ int ret, origcount = op->count;
u8 type = GET_GLOBALFLAT(op->drive_gf->type);
switch (type) {
case DTYPE_FLOPPY:
- return process_floppy_op(op);
+ ret = process_floppy_op(op);
+ break;
case DTYPE_ATA:
- return process_ata_op(op);
+ ret = process_ata_op(op);
+ break;
case DTYPE_RAMDISK:
- return process_ramdisk_op(op);
+ ret = process_ramdisk_op(op);
+ break;
case DTYPE_CDEMU:
- return process_cdemu_op(op);
+ ret = process_cdemu_op(op);
+ break;
case DTYPE_VIRTIO_BLK:
- return process_virtio_blk_op(op);
+ ret = process_virtio_blk_op(op);
+ break;
case DTYPE_AHCI: ;
extern void _cfunc32flat_process_ahci_op(void);
- return call32(_cfunc32flat_process_ahci_op
- , (u32)MAKE_FLATPTR(GET_SEG(SS), op), DISK_RET_EPARAM);
+ ret = call32(_cfunc32flat_process_ahci_op
+ , (u32)MAKE_FLATPTR(GET_SEG(SS), op), DISK_RET_EPARAM);
+ break;
case DTYPE_ATA_ATAPI:
- return process_atapi_op(op);
+ ret = process_atapi_op(op);
+ break;
case DTYPE_AHCI_ATAPI: ;
extern void _cfunc32flat_process_atapi_op(void);
- return call32(_cfunc32flat_process_atapi_op
- , (u32)MAKE_FLATPTR(GET_SEG(SS), op), DISK_RET_EPARAM);
+ ret = call32(_cfunc32flat_process_atapi_op
+ , (u32)MAKE_FLATPTR(GET_SEG(SS), op), DISK_RET_EPARAM);
+ break;
case DTYPE_USB:
case DTYPE_UAS:
case DTYPE_VIRTIO_SCSI:
@@ -379,11 +388,16 @@ process_op(struct disk_op_s *op)
case DTYPE_ESP_SCSI:
case DTYPE_MEGASAS:
case DTYPE_PVSCSI:
- return process_scsi_op(op);
+ ret = process_scsi_op(op);
+ break;
default:
- op->count = 0;
- return DISK_RET_EPARAM;
+ ret = DISK_RET_EPARAM;
+ break;
}
+ if (ret && op->count == origcount)
+ // If the count hasn't changed on error, assume no data transferred.
+ op->count = 0;
+ return ret;
}
// Execute a "disk_op_s" request - this runs on the extra stack.
--
1.8.3.1
I make more test with floppy BOOT-PROM3 and floppy image over PXE server and grub4dos from USB stick. With vendor bios floppy or floppy image boot OK from all: FDD, image over PXE and image over grub4dos from USB stick.
With coreboot + SeaBIOS is very interesting situation: boot OK only image over PXE server with gPXE
Not boot from real FDD or image from USB with grub4dos. While boot from USB have this info:
=========================================================
Autodetect number-of-heads failed. Use default value 2
Autodetect sectors-per-track failed. Use default value 18
=========================================================
and after some seconds, menu appears and next is same problem like from real FDD
BOOT-PROM3 floppy image is non standard and while try open it e.g. in WinHex have warning http://savepic.net/4142258.htm that sectors count is less than in boot sector but why this image or floppy working only with vendor BIOS or from PXE server? Why not boot over grub4dos from USB and real FDD only from coreboot bios?
Link for BOOT-PROM3 floppy image: http://www49.zippyshare.com/v/75868779/file.html
Please test this image with PXE, grub4dos from USB and real floppy in QEMU.
Revision 5325e91e introduced a change to force the rebuild of the
.config file when the src/Kconfig (or vgasrc/Kconfig) file changes.
However, this was causing a complete rebuild of the user's .config
file which would throw away the user's current settings.
On a rebuild, use the kbuild olddefconfig rule instead of defconfig to
attempt to keep the user's current settings.
Signed-off-by: Kevin O'Connor <kevin(a)koconnor.net>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index cb15217..aba8a62 100644
--- a/Makefile
+++ b/Makefile
@@ -260,7 +260,7 @@ $(Q)$(MAKE) -C $(OUT) -f $(CURDIR)/scripts/kconfig/Makefile srctree=$(CURDIR) sr
endef
$(OUT)autoconf.h : $(KCONFIG_CONFIG) ; $(call do-kconfig, silentoldconfig)
-$(KCONFIG_CONFIG): src/Kconfig vgasrc/Kconfig ; $(call do-kconfig, defconfig)
+$(KCONFIG_CONFIG): src/Kconfig vgasrc/Kconfig ; $(call do-kconfig, olddefconfig)
%onfig: ; $(call do-kconfig, $@)
help: ; $(call do-kconfig, $@)
--
1.8.3.1