mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-24 12:19:21 +01:00
Make NAND, crypto use dma_addr
This commit is contained in:
parent
d0956805d3
commit
b140065503
4
crypto.c
4
crypto.c
@ -113,8 +113,8 @@ void aes_decrypt(u8 *src, u8 *dst, u32 blocks, u8 keep_iv)
|
||||
if (this_blocks > 0x80)
|
||||
this_blocks = 0x80;
|
||||
|
||||
write32(AES_SRC, (u32)src);
|
||||
write32(AES_DEST, (u32)dst);
|
||||
write32(AES_SRC, dma_addr(src));
|
||||
write32(AES_DEST, dma_addr(dst));
|
||||
aes_command(AES_CMD_DECRYPT, keep_iv, this_blocks);
|
||||
|
||||
blocks -= this_blocks;
|
||||
|
4
nand.c
4
nand.c
@ -99,11 +99,11 @@ void __nand_setup_dma(u8 *data, u8 *spare) {
|
||||
NAND_debug("nand_setup_dma: %p, %p\n", data, spare);
|
||||
if (((s32)data) != -1) {
|
||||
dc_invalidaterange(data, 0x800);
|
||||
__nand_write32(NAND_DATA, (s32)data);
|
||||
__nand_write32(NAND_DATA, dma_addr(data));
|
||||
}
|
||||
if (((s32)spare) != -1) {
|
||||
dc_invalidaterange(spare, 0x50); // +0x10 for calculated syndrome?
|
||||
__nand_write32(NAND_ECC, (s32)spare);
|
||||
__nand_write32(NAND_ECC, dma_addr(spare));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user