From db2a32154f6ae29477812692a286481e059e92cb Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Wed, 7 Aug 2024 21:45:24 +0100 Subject: drv: Add ccb buffer and pds data Data still needs to be patched at runtime to point to the correct addresses. --- src/ccb.h | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/ccb.h (limited to 'src/ccb.h') diff --git a/src/ccb.h b/src/ccb.h new file mode 100644 index 0000000..36c69f8 --- /dev/null +++ b/src/ccb.h @@ -0,0 +1,61 @@ +#ifndef CCB_H +#define CCB_H + +#include + +typedef struct __attribute__((__packed__)) Register { + unsigned int addr; + unsigned int val; +} Register; + +//XXX: this is probably wrong +typedef struct __attribute__((__packed__)) CCBEntry +{ + uint32_t length; + uint32_t unk0; + IMG_DEV_VIRTADDR pds_pixel_code_data_0; // Indirect points to 0x67 PDSPixelCodeData with 0xdcxxxx0 + uint32_t unk2; + IMG_DEV_VIRTADDR pds_pixel_code_data_0_4; // Indirect points to 0x67 PDSPixelCodeData with 0xdcxxxx0 offset by 4 + uint32_t unk4; + uint32_t unk5; + uint32_t unk6; + uint32_t frame_number; + IMG_DEV_VIRTADDR dev_addr_0; + uint32_t unk7; + uint32_t unk8; + uint32_t unk9; + uint32_t unk10; + uint32_t unk11; + uint32_t unk12; + uint32_t unk13; + IMG_DEV_VIRTADDR dev_addr_1; + uint32_t unk14; + IMG_DEV_VIRTADDR dev_addr_2; + IMG_DEV_VIRTADDR dev_addr_3; + IMG_DEV_VIRTADDR dev_addr_4; + IMG_DEV_VIRTADDR dev_addr_5; + IMG_DEV_VIRTADDR dev_addr_6; + uint32_t num_regs; + SGXMKIF_CMDTA_SHARED shared_data; + uint32_t unk15; + uint32_t unk16; + uint32_t unk17; + uint32_t unk18; + uint32_t unk19; + uint32_t unk20; + uint32_t vdm_command_stream; + uint32_t unk21; + IMG_DEV_VIRTADDR dev_addr_ta_0; // points to 0x95 TAData buffer, size is 0xc00 and all zeros + IMG_DEV_VIRTADDR dev_addr_ta_1; // points to 0x8d TAData buffer, size is 0x400 and not all zeros + uint32_t unk24; + uint32_t unk25; + uint32_t unk26; + uint32_t unk27; + uint32_t unk28; + IMG_DEV_VIRTADDR dev_addr_per3d_0; // points to 0x12 PerContext3DParameters, size is 0x3dd000 and all zeros + uint32_t unk30; + //this is probably variable length + Register r[1]; +} CCBEntry; + +#endif -- cgit