svn commit: r321919 - head/emulators/gxemul/files

Adrian Chadd adrian at FreeBSD.org
Fri Jun 28 01:43:58 UTC 2013


Author: adrian (src committer)
Date: Fri Jun 28 01:43:57 2013
New Revision: 321919
URL: http://svnweb.freebsd.org/changeset/ports/321919

Log:
  Enable LBA in GXEMUL.
  
  FreeBSD-10's ATA code requires LBA to be used.  There's no code in the
  ATA stack to send CHS commands to the hardware these days.
  
  * Enable it by default;
  * Turn print() into debug()
  
  Tested:
  
  * MALTA kernel on gxemul.

Added:
  head/emulators/gxemul/files/
  head/emulators/gxemul/files/patch-aa   (contents, props changed)

Added: head/emulators/gxemul/files/patch-aa
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/emulators/gxemul/files/patch-aa	Fri Jun 28 01:43:57 2013	(r321919)
@@ -0,0 +1,32 @@
+--- src/devices/dev_wdc.cc.orig	2013-06-27 18:10:50.000000000 -0700
++++ src/devices/dev_wdc.cc	2013-06-27 18:11:13.000000000 -0700
+@@ -274,12 +274,12 @@
+ 	    + (int64_t)d->head * d->sectors_per_track[d->drive] +
+ 	    (int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
+ 
+-#if 0
++#if 1
+ 	/*  LBA:  */
+ 	if (d->lba)
+ 		offset = 512 * (((d->head & 0xf) << 24) + (cyl << 8)
+ 		    + d->sector);
+-	printf("WDC read from offset %lli\n", (long long)offset);
++	debug("WDC read from offset %lli\n", (long long)offset);
+ #endif
+ 
+ 	while (count > 0) {
+@@ -320,12 +320,12 @@
+ 	uint64_t offset = 512 * (d->sector - 1
+ 	    + (int64_t)d->head * d->sectors_per_track[d->drive] +
+ 	    (int64_t)d->heads[d->drive] * d->sectors_per_track[d->drive] * cyl);
+-#if 0
++#if 1
+ 	/*  LBA:  */
+ 	if (d->lba)
+ 		offset = 512 * (((d->head & 0xf) << 24) +
+ 		    (cyl << 8) + d->sector);
+-	printf("WDC write to offset %lli\n", (long long)offset);
++	debug("WDC write to offset %lli\n", (long long)offset);
+ #endif
+ 
+ 	d->write_in_progress = d->cur_command;


More information about the svn-ports-all mailing list