18#define P2_ALIGNMENT 64
19#define P2_MAKE_PTR_NORMAL(PTR) ((u32)(PTR)&0x0FFFFFFF)
43 if ((packet2->base = memalign(P2_ALIGNMENT, byte_size)) == NULL)
49 packet2->base = packet2->
next = (qword_t *)((u32)packet2->base | packet2->
type);
51 memset(packet2->base, 0, byte_size);
83 if (packet2->base != NULL)
84 free((qword_t *)P2_MAKE_PTR_NORMAL(packet2->base));
90 packet2->
next = packet2->base;
104 memcpy(a->
next, b->base, (u32)b->
next - (u32)b->base);
111 qw_count = ((u32)packet2->
next - (u32)packet2->base) >> 4;
112 printf(
"\n============================\n");
113 printf(
"Packet2: Dumping %d words...\n", ((u32)packet2->
next - (u32)packet2->base) >> 2);
116 for (nextWord = (u32 *)packet2->base; nextWord != (u32 *)packet2->
next; nextWord++, i++)
119 printf(
"\n0x%08x: ", (u32)nextWord);
120 printf(
"0x%08x ", *nextWord);
121 if (i / 4 == qw_count)
124 printf(
"\n============================\n");
vif_code_t * vif_code_opened_at
dma_tag_t * tag_opened_at
void packet2_print(packet2_t *packet2, u32 qw_count)
void packet2_free(packet2_t *packet2)
void packet2_print_qw_count(packet2_t *packet2)
void packet2_reset(packet2_t *packet2, u8 clear_mem)
static u32 packet2_get_qw_count(packet2_t *packet2)
packet2_t * packet2_create_from(qword_t *base, qword_t *next, u16 qwords, enum Packet2Type type, enum Packet2Mode mode, u8 tte)
void packet2_add(packet2_t *a, packet2_t *b)
packet2_t * packet2_create(u16 qwords, enum Packet2Type type, enum Packet2Mode mode, u8 tte)