Bitcoin Forum
December 15, 2024, 05:30:26 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Via Padlock hardware acceleration  (Read 4554 times)
user4553 (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 12, 2011, 01:04:49 PM
Last edit: August 05, 2014, 09:31:27 AM by user4553
 #1

Hi,

just started a fork to add VIA padlock harware accelaration for the sha256 functionality.  Find the git tree at:

  [removed dead link]

This is a very clean patch currently, only adding a few lines to cryptopp/sha.cpp .  Should be much cleaner (and more generic) then the code posted before here:

  http://bitcointalk.org/index.php?topic=355.0

Note that the code by Sgtstein even had a possible corruption bug when IRQs interrupted the crypto engine.

Still verifying whether it works.  Would be grateful for comments.

cheers,

David

jgarzik
Legendary
*
qt
Offline Offline

Activity: 1596
Merit: 1100


View Profile
March 12, 2011, 06:07:01 PM
 #2

Unfortunately, you are duplicated work.  This CPU miner supports VIA padlock: https://github.com/jgarzik/cpuminer

The main client does not need any CPU mining tweaks.  In fact, we discuss from time-to-time how to hide / disable / remove CPU mining from the main bitcoin client.

Jeff Garzik, Bloq CEO, former bitcoin core dev team; opinions are my own.
Visit bloq.com / metronome.io
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
lfm
Full Member
***
Offline Offline

Activity: 196
Merit: 104



View Profile
March 15, 2011, 09:46:26 PM
 #3

Unfortunately, you are duplicated work.  This CPU miner supports VIA padlock: https://github.com/jgarzik/cpuminer

The main client does not need any CPU mining tweaks.  In fact, we discuss from time-to-time how to hide / disable / remove CPU mining from the main bitcoin client.

Ah, nice, google didn't find that.  BTW looking over the code it seems to suffer the IRQ bug I mentioned.  I think we have to loop over the xsha256 opcode, until (e)SI register is at the end of the input.  In case an interrupt happens, the instruction will finish somewhere midway through the computation and needs to be restarted with the esi/edi/ecx register value state it left.

the sha256 instruction will automaticlly restart after an interrupt much like any rep instruction. I am quite sure it is correct as is
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!