Bug 155441 - [loader] [patch] Firewire support in loader is broken
Summary: [loader] [patch] Firewire support in loader is broken
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 8.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 16:10 UTC by longwitz
Modified: 2019-04-21 03:36 UTC (History)
2 users (show)

See Also:
imp: mfc-stable11+
imp: mfc-stable12+


Attachments
file.diff (1.59 KB, patch)
2011-03-10 16:10 UTC, longwitz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description longwitz 2011-03-10 16:10:11 UTC
With LOADER_FIREWIRE_SUPPORT=yes the loader includes firewire support.

In /usr/src/sys/boot/i386/libfirewire/firewire.c the call of the function
biospci_write_config is not correct (the second and third parameter must
be swapped). Some hardware complains about this, some do not.

Also only the first firewire device is supported - in my opinion
unnecessarily.

Fix: Patch attached with submission follows:
How-To-Repeat: Try to use the loader over firewire.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-03-21 03:21:12 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-bugs

reclassify.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:37 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 commit-hook freebsd_committer 2019-01-08 20:02:09 UTC
A commit references this bug:

Author: imp
Date: Tue Jan  8 20:01:57 UTC 2019
New revision: 342865
URL: https://svnweb.freebsd.org/changeset/base/342865

Log:
  biospci_write_config args were backwards

  biospci_write_config args swapped length and value to write. Some
  hardware coped just fine, while other hardware had issues.

  PR: 155441
  Submitted by: longwitz at incore dot de

Changes:
  head/stand/i386/libfirewire/firewire.c
Comment 4 Warner Losh freebsd_committer 2019-01-08 20:03:20 UTC
Ooops... need to leave open for MFC
Comment 5 longwitz 2019-02-18 15:46:13 UTC
The commit 342865 includes the first part of the original patch. Please can somebody explain whether something is wrong with the second part of the patch.
Comment 6 commit-hook freebsd_committer 2019-04-21 03:36:56 UTC
A commit references this bug:

Author: kevans
Date: Sun Apr 21 03:36:07 UTC 2019
New revision: 346476
URL: https://svnweb.freebsd.org/changeset/base/346476

Log:
  MFC r341253, r341328, r342619, r342626, r342707, r342785, r342865

  r341253:
  The libstand's panic() appends its own '\n' to the message, so that users of the API
  don't need to supply one.

  r341328:
  loader: create separate lists for fd, cd and hd, merge bioscd with biosdisk

  Create unified block IO implementation in BIOS version, like it is done in UEFI
  side. Implement fd, disk and cd device lists, this will split floppy devices
  from disks and will allow us to have consistent, predictable device naming
  (modulo BIOS issues).

  r342619:
  loader: create bio_alloc and bio_free for bios bounce buffer

  We do have 16KB buffer space defined in pxe.c, move it to bio.c and implement
  bio_alloc()/bio_free() interface to make it possible to use this space for
  other BIOS calls (notably, from biosdisk.c).

  r342626:
  Add Copyright.

  r342707:
  i386_parsedev() needs to support fd devices

  r342785:
  With buggy int13 ah=15, we can mis-identify the floppy devices.

  We have no option than trust INT13 ah=08 return code during the init phase.

  r342865:
  biospci_write_config args were backwards

  biospci_write_config args swapped length and value to write. Some
  hardware coped just fine, while other hardware had issues.

  PR: 155441, 234460

Changes:
_U  stable/11/
  stable/11/stand/common/interp_forth.c
  stable/11/stand/i386/libfirewire/firewire.c
  stable/11/stand/i386/libi386/Makefile
  stable/11/stand/i386/libi386/bio.c
  stable/11/stand/i386/libi386/bioscd.c
  stable/11/stand/i386/libi386/biosdisk.c
  stable/11/stand/i386/libi386/bootinfo32.c
  stable/11/stand/i386/libi386/devicename.c
  stable/11/stand/i386/libi386/libi386.h
  stable/11/stand/i386/libi386/pxe.c
  stable/11/stand/i386/loader/chain.c
  stable/11/stand/i386/loader/conf.c
  stable/11/stand/i386/loader/main.c
  stable/11/stand/libsa/arp.c
  stable/11/stand/libsa/assert.c
  stable/11/stand/libsa/bzipfs.c
  stable/11/stand/libsa/netif.c
  stable/11/stand/libsa/sbrk.c
  stable/11/stand/uboot/lib/copy.c
  stable/11/stand/uboot/lib/net.c