A table of 32 slot-number entries that have:
1. # of slots to use
2. # of scatter-gather entries to use
3. size of PRD-table
4. # of physical pages required
Code: Select all
prd_slot_table STRUC
prd_slots DW ?
prd_entries DW ?
prd_size DW ?
prd_pages DW ?
prd_slot_table ENDS
p1 prd_slot_table <1, 1F8h, 2000h, 2>
p2 prd_slot_table <2, 0F8h, 1000h, 2>
p3 prd_slot_table <3, 0A0h, 0A80h, 2>
p4 prd_slot_table <4, 78h, 800h, 2>
p5 prd_slot_table <5, 90h, 980h, 3>
p6 prd_slot_table <6, 78h, 800h, 3>
p7 prd_slot_table <7, 88h, 900h, 4>
p8 prd_slot_table <8, 78h, 800h, 4>
p9 prd_slot_table <9, 68h, 700h, 4>
p10 prd_slot_table <10, 58h, 600h, 4>
p11 prd_slot_table <11, 50h, 580h, 4>
p12 prd_slot_table <12, 48h, 500h, 4>
p13 prd_slot_table <12, 48h, 500h, 4>
p14 prd_slot_table <14, 40h, 480h, 4>
p15 prd_slot_table <14, 40h, 480h, 4>
p16 prd_slot_table <16, 38h, 400h, 4>
p17 prd_slot_table <16, 38h, 400h, 4>
p18 prd_slot_table <18, 30h, 380h, 4>
p19 prd_slot_table <18, 30h, 380h, 4>
p20 prd_slot_table <18, 30h, 380h, 4>
p21 prd_slot_table <21, 28h, 300h, 4>
p22 prd_slot_table <21, 28h, 300h, 4>
p23 prd_slot_table <21, 28h, 300h, 4>
p24 prd_slot_table <21, 28h, 300h, 4>
p25 prd_slot_table <25, 20h, 280h, 4>
p26 prd_slot_table <25, 20h, 280h, 4>
p27 prd_slot_table <25, 20h, 280h, 4>
p28 prd_slot_table <25, 20h, 280h, 4>
p29 prd_slot_table <25, 20h, 280h, 4>
p30 prd_slot_table <25, 20h, 280h, 4>
p31 prd_slot_table <25, 20h, 280h, 4>
p32 prd_slot_table <32, 20h, 280h, 5>
Makes this a snap. I require at least 32 scatter-gather entries at the high-end side, and decrease number of physical pages when more than 128 scatter-gather entries could be fitted down to 2 physical pages.
With this table, 32 slots will use 32 scatter-gather entries, and use 5 physical pages. Between 5 and 31 slots will use 4 physical pages. If only one slot is available, it would use 2 physical pages, and support 504 scatter-gather entries. One additional physical page is used for misc. port data. If FIS based switching is used, this requires another physical page.
Status update: All the tables are initialized. The devices are RESETED, and the power-up logic seems to work up to starting both the FIS receiver and the command engine. Next is to try to read-out the drive configuration.