Changes

995 bytes added ,  23:40, 7 November 2019
Document behavior of clearing the error interrupt across versions
Line 82: Line 82:  
  ! Version
 
  ! Version
 
  ! <abbr title="Out of bounds">OoB</abbr> [[#0x8D DVDLowUnencryptedRead|0x8D]]
 
  ! <abbr title="Out of bounds">OoB</abbr> [[#0x8D DVDLowUnencryptedRead|0x8D]]
 +
! <abbr title="Issues 0xE0 when the error interrupt is set before running another command, in addition to clearing the interrupt">0xE0 error</abbr>
 
  ! [[#0x90 DVDLowGetNoDiscOpenPartitionParams|0x90]]
 
  ! [[#0x90 DVDLowGetNoDiscOpenPartitionParams|0x90]]
 
  ! [[#0x91 DVDLowNoDiscOpenPartition|0x91]]
 
  ! [[#0x91 DVDLowNoDiscOpenPartition|0x91]]
Line 92: Line 93:  
  | [[#Oct  5 2006 17:41:21|Oct  5 2006 17:41:21]]
 
  | [[#Oct  5 2006 17:41:21|Oct  5 2006 17:41:21]]
 
  | {{No}}
 
  | {{No}}
 +
| {{Yes}}
 
  | {{No}}
 
  | {{No}}
 
  | {{No}}
 
  | {{No}}
Line 101: Line 103:  
  |-
 
  |-
 
  | [[#Jun  8 2007 18:17:09|Jun  8 2007 18:17:09]]
 
  | [[#Jun  8 2007 18:17:09|Jun  8 2007 18:17:09]]
 +
| {{Yes}}
 
  | {{Yes}}
 
  | {{Yes}}
 
  | {{Yes}}
 
  | {{Yes}}
Line 112: Line 115:  
  | [[#Jul 11 2008 14:34:27|Jul 11 2008 14:34:27]]
 
  | [[#Jul 11 2008 14:34:27|Jul 11 2008 14:34:27]]
 
  |rowspan="3" {{Yes}}
 
  |rowspan="3" {{Yes}}
 +
|rowspan="3" {{No}}
 
  |rowspan="3" {{Partial}}
 
  |rowspan="3" {{Partial}}
 
  |rowspan="3" {{Partial}}
 
  |rowspan="3" {{Partial}}
Line 125: Line 129:  
  |-
 
  |-
 
  | [[#Jul 14 2008 19:25:32|Jul 14 2008 19:25:32]]
 
  | [[#Jul 14 2008 19:25:32|Jul 14 2008 19:25:32]]
 +
|rowspan="3" {{Yes}}
 
  |rowspan="3" {{Yes}}
 
  |rowspan="3" {{Yes}}
 
  |rowspan="3" {{Partial}}
 
  |rowspan="3" {{Partial}}
Line 140: Line 145:  
  | [[#Nov 24 2008 15:39:09|Nov 24 2008 15:39:09]]
 
  | [[#Nov 24 2008 15:39:09|Nov 24 2008 15:39:09]]
 
  | {{Yes}}
 
  | {{Yes}}
 +
| {{No}}
 
  | {{Partial}}
 
  | {{Partial}}
 
  | {{Partial}}
 
  | {{Partial}}
Line 150: Line 156:  
  | [[#Jun  3 2009 07:49:09|Jun  3 2009 07:49:09]]
 
  | [[#Jun  3 2009 07:49:09|Jun  3 2009 07:49:09]]
 
  | {{Yes}}
 
  | {{Yes}}
 +
| {{No}}
 
  | {{Partial}}
 
  | {{Partial}}
 
  | {{Partial}}
 
  | {{Partial}}
Line 164: Line 171:     
In this version, [[#0x8D DVDLowUnencryptedRead|0x8D DVDLowUnencryptedRead]] only accepted the start and end being between 0 and 0x14000, and IOCtls [[#0x95 DVDLowGetStatusRegister|0x95 DVDLowGetStatusRegister]] and [[#0x96 DVDLowGetControlRegister|0x96 DVDLowGetControlRegister]] and all IOCtlVs other than [[#0x8B DVDLowOpenPartition|0x8B DVDLowOpenPartition]] did not exist.  [[#0x87|0x87]] and [[#0x7F DVDLowSetSpinupFlag|0x7F DVDLowSetSpinupFlag]] did exist as the current stubs.
 
In this version, [[#0x8D DVDLowUnencryptedRead|0x8D DVDLowUnencryptedRead]] only accepted the start and end being between 0 and 0x14000, and IOCtls [[#0x95 DVDLowGetStatusRegister|0x95 DVDLowGetStatusRegister]] and [[#0x96 DVDLowGetControlRegister|0x96 DVDLowGetControlRegister]] and all IOCtlVs other than [[#0x8B DVDLowOpenPartition|0x8B DVDLowOpenPartition]] did not exist.  [[#0x87|0x87]] and [[#0x7F DVDLowSetSpinupFlag|0x7F DVDLowSetSpinupFlag]] did exist as the current stubs.
 +
 +
This version will issues command 0xE0 to the drive if the error interrupt is set before a command runs (in addition to clearing the interrupt).  It prints a message before it issues the command, but not if the issued command fails.
    
{| class="wikitable"
 
{| class="wikitable"
Line 218: Line 227:     
This version adds [[#0x95 DVDLowGetStatusRegister|0x95 DVDLowGetStatusRegister]], but [[#0x96 DVDLowGetControlRegister|0x96 DVDLowGetControlRegister]] is still missing.  It also allows all 3 ranges in [[#0x8D DVDLowUnencryptedRead|0x8D DVDLowUnencryptedRead]].  Finally, it adds <em>all</em> of the IOCtlVs (which are also exposed as IOCtls): [[#0x90 DVDLowGetNoDiscOpenPartitionParams|0x90 DVDLowGetNoDiscOpenPartitionParams]], [[#0x91 DVDLowNoDiscOpenPartition|0x91 DVDLowNoDiscOpenPartition]], [[#0x92 DVDLowGetNoDiscBufferSizes|0x92 DVDLowGetNoDiscBufferSizes]], [[#0x93 DVDLowOpenPartitionWithTmdAndTicket|0x93 DVDLowOpenPartitionWithTmdAndTicket]], and [[#0x94 DVDLowOpenPartitionWithTmdAndTicketView|0x94 DVDLowOpenPartitionWithTmdAndTicketView]].
 
This version adds [[#0x95 DVDLowGetStatusRegister|0x95 DVDLowGetStatusRegister]], but [[#0x96 DVDLowGetControlRegister|0x96 DVDLowGetControlRegister]] is still missing.  It also allows all 3 ranges in [[#0x8D DVDLowUnencryptedRead|0x8D DVDLowUnencryptedRead]].  Finally, it adds <em>all</em> of the IOCtlVs (which are also exposed as IOCtls): [[#0x90 DVDLowGetNoDiscOpenPartitionParams|0x90 DVDLowGetNoDiscOpenPartitionParams]], [[#0x91 DVDLowNoDiscOpenPartition|0x91 DVDLowNoDiscOpenPartition]], [[#0x92 DVDLowGetNoDiscBufferSizes|0x92 DVDLowGetNoDiscBufferSizes]], [[#0x93 DVDLowOpenPartitionWithTmdAndTicket|0x93 DVDLowOpenPartitionWithTmdAndTicket]], and [[#0x94 DVDLowOpenPartitionWithTmdAndTicketView|0x94 DVDLowOpenPartitionWithTmdAndTicketView]].
 +
 +
This version will issues command 0xE0 to the drive if the error interrupt is set before a command runs, and additionally prints a asecond message if that fails in DiIoctl (which exists in all subsequent versions, even those that do not actually issue a command so it cannot ever fail).
    
{| class="wikitable"
 
{| class="wikitable"
Line 1,164: Line 1,175:  
}}
 
}}
   −
Commands will clear the error interrupt by writing bit 2 of DISR if it is set after execution.  Furthermore, the same check happens before execution, but this should generally not happen barring other code directly writing to the DI registers (a warning is logged in this case).  These checks happen in handleDiCommand, so commands implemented in DiIoctl are not affected; additionally the second check is skipped for 0x8A DVDLowReset and 0xE0 DVDLowRequestError.
+
Commands will clear the error interrupt by writing bit 2 of DISR if it is set after execution.  Furthermore, the same check happens before execution, but this should generally not happen barring other code directly writing to the DI registers (a warning is logged in this case).  These checks happen in handleDiCommand, so commands implemented in DiIoctl are not affected; additionally the second check is skipped for 0x8A DVDLowReset and 0xE0 DVDLowRequestError.  In some versions, the second check will also issue a request error command to the drive (which, as a side effect, clears the error in the drive itself, which would break a second DVDLowRequestError &mdash; that explains why it is skipped).
    
If an output buffer size check fails, DIMAR and DILENGTH will not be written, and there is code that sets the return value to 0x20.  However, the driver still attempts to start the transfer, which will fail due to not writing DILENGTH (which should have counted back down 0 after any previous successful transfer{{check}}); this will result in an eventual timeout and returning of 0x10{{check}}. <!-- This seems completely wack, but it seems to be how the code works... -->
 
If an output buffer size check fails, DIMAR and DILENGTH will not be written, and there is code that sets the return value to 0x20.  However, the driver still attempts to start the transfer, which will fail due to not writing DILENGTH (which should have counted back down 0 after any previous successful transfer{{check}}); this will result in an eventual timeout and returning of 0x10{{check}}. <!-- This seems completely wack, but it seems to be how the code works... -->
303

edits