Bar Sizing
Get the BAR sizing from Telescan
The ¹BARs
( Base Address Registers
) has a specified size assigned to them from the donor device, to make our DMA firmware look like the real donor card we will also copy the sizing
-
Click on
BAR0
-
To the right, we can see
Base Address Register 0
-
To get the
sizing
, we need to fill the bits in the white field with1
s
(Before)
(After) -
Right click on the white section in
Base Address Register 0
:Write
Dword at offset 010h
(Doing this will deactivate the device, it's normal)
Now we can see the sizing:
(Write this down)
If a bar ends in:
01
= IO
04
= 64-bit
0C
= 64-bit, prefetchable
The bar after a 64-bit bar (ending in 04
and 0C
) is always FFFFFFFF
Example:
BAR0: FFFFE004
BAR1: FFFFFFFF
If you want to insert your BAR0 data into pcileech_bar_zero4k.coe
, it won't work if you set BAR0 to 01
(IO)
Repeat this with all BARs, write down what each bar has in sizing
When the firmware is finished and flashed to our DMA, the address will not be the same as the real donor device. This address is assigned by the donor device and it's driver.
¹There is no way to get same address as the donor device to my knowledge, so the sizing
will have to do for now