Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2022 Advanced Micro Devices, Inc.
0003  *
0004  * Permission is hereby granted, free of charge, to any person obtaining a
0005  * copy of this software and associated documentation files (the "Software"),
0006  * to deal in the Software without restriction, including without limitation
0007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0008  * and/or sell copies of the Software, and to permit persons to whom the
0009  * Software is furnished to do so, subject to the following conditions:
0010  *
0011  * The above copyright notice and this permission notice shall be included in
0012  * all copies or substantial portions of the Software.
0013  *
0014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0017  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0018  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0020  * OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  */
0023 
0024 #ifndef __MES_API_DEF_H__
0025 #define __MES_API_DEF_H__
0026 
0027 #pragma pack(push, 4)
0028 
0029 #define MES_API_VERSION 1
0030 
0031 /* Driver submits one API(cmd) as a single Frame and this command size is same
0032  * for all API to ease the debugging and parsing of ring buffer.
0033  */
0034 enum { API_FRAME_SIZE_IN_DWORDS = 64 };
0035 
0036 /* To avoid command in scheduler context to be overwritten whenenver mutilple
0037  * interrupts come in, this creates another queue.
0038  */
0039 enum { API_NUMBER_OF_COMMAND_MAX = 32 };
0040 
0041 enum MES_API_TYPE {
0042     MES_API_TYPE_SCHEDULER = 1,
0043     MES_API_TYPE_MAX
0044 };
0045 
0046 enum MES_SCH_API_OPCODE {
0047     MES_SCH_API_SET_HW_RSRC         = 0,
0048     MES_SCH_API_SET_SCHEDULING_CONFIG   = 1, /* agreegated db, quantums, etc */
0049     MES_SCH_API_ADD_QUEUE           = 2,
0050     MES_SCH_API_REMOVE_QUEUE        = 3,
0051     MES_SCH_API_PERFORM_YIELD       = 4,
0052     MES_SCH_API_SET_GANG_PRIORITY_LEVEL = 5,
0053     MES_SCH_API_SUSPEND         = 6,
0054     MES_SCH_API_RESUME          = 7,
0055     MES_SCH_API_RESET           = 8,
0056     MES_SCH_API_SET_LOG_BUFFER      = 9,
0057     MES_SCH_API_CHANGE_GANG_PRORITY     = 10,
0058     MES_SCH_API_QUERY_SCHEDULER_STATUS  = 11,
0059     MES_SCH_API_PROGRAM_GDS         = 12,
0060     MES_SCH_API_SET_DEBUG_VMID      = 13,
0061     MES_SCH_API_MISC            = 14,
0062     MES_SCH_API_UPDATE_ROOT_PAGE_TABLE      = 15,
0063     MES_SCH_API_AMD_LOG                     = 16,
0064     MES_SCH_API_MAX             = 0xFF
0065 };
0066 
0067 union MES_API_HEADER {
0068     struct {
0069         uint32_t type       : 4; /* 0 - Invalid; 1 - Scheduling; 2 - TBD */
0070         uint32_t opcode     : 8;
0071         uint32_t dwsize     : 8; /* including header */
0072         uint32_t reserved   : 12;
0073     };
0074 
0075     uint32_t    u32All;
0076 };
0077 
0078 enum MES_AMD_PRIORITY_LEVEL {
0079     AMD_PRIORITY_LEVEL_LOW      = 0,
0080     AMD_PRIORITY_LEVEL_NORMAL   = 1,
0081     AMD_PRIORITY_LEVEL_MEDIUM   = 2,
0082     AMD_PRIORITY_LEVEL_HIGH     = 3,
0083     AMD_PRIORITY_LEVEL_REALTIME = 4,
0084     AMD_PRIORITY_NUM_LEVELS
0085 };
0086 
0087 enum MES_QUEUE_TYPE {
0088     MES_QUEUE_TYPE_GFX,
0089     MES_QUEUE_TYPE_COMPUTE,
0090     MES_QUEUE_TYPE_SDMA,
0091     MES_QUEUE_TYPE_MAX,
0092 };
0093 
0094 struct MES_API_STATUS {
0095     uint64_t    api_completion_fence_addr;
0096     uint64_t    api_completion_fence_value;
0097 };
0098 
0099 enum { MAX_COMPUTE_PIPES = 8 };
0100 enum { MAX_GFX_PIPES = 2 };
0101 enum { MAX_SDMA_PIPES = 2 };
0102 
0103 enum { MAX_COMPUTE_HQD_PER_PIPE = 8 };
0104 enum { MAX_GFX_HQD_PER_PIPE = 8 };
0105 enum { MAX_SDMA_HQD_PER_PIPE = 10 };
0106 enum { MAX_SDMA_HQD_PER_PIPE_11_0   = 8 };
0107 
0108 enum { MAX_QUEUES_IN_A_GANG = 8 };
0109 
0110 enum VM_HUB_TYPE {
0111     VM_HUB_TYPE_GC = 0,
0112     VM_HUB_TYPE_MM = 1,
0113     VM_HUB_TYPE_MAX,
0114 };
0115 
0116 enum { VMID_INVALID = 0xffff };
0117 
0118 enum { MAX_VMID_GCHUB = 16 };
0119 enum { MAX_VMID_MMHUB = 16 };
0120 
0121 enum SET_DEBUG_VMID_OPERATIONS {
0122     DEBUG_VMID_OP_PROGRAM = 0,
0123     DEBUG_VMID_OP_ALLOCATE = 1,
0124     DEBUG_VMID_OP_RELEASE = 2
0125 };
0126 
0127 enum MES_LOG_OPERATION {
0128     MES_LOG_OPERATION_CONTEXT_STATE_CHANGE = 0,
0129     MES_LOG_OPERATION_QUEUE_NEW_WORK = 1,
0130     MES_LOG_OPERATION_QUEUE_UNWAIT_SYNC_OBJECT = 2,
0131     MES_LOG_OPERATION_QUEUE_NO_MORE_WORK = 3,
0132     MES_LOG_OPERATION_QUEUE_WAIT_SYNC_OBJECT = 4,
0133     MES_LOG_OPERATION_QUEUE_INVALID = 0xF,
0134 };
0135 
0136 enum MES_LOG_CONTEXT_STATE {
0137     MES_LOG_CONTEXT_STATE_IDLE      = 0,
0138     MES_LOG_CONTEXT_STATE_RUNNING       = 1,
0139     MES_LOG_CONTEXT_STATE_READY     = 2,
0140     MES_LOG_CONTEXT_STATE_READY_STANDBY = 3,
0141     MES_LOG_CONTEXT_STATE_INVALID           = 0xF,
0142 };
0143 
0144 struct MES_LOG_CONTEXT_STATE_CHANGE {
0145     void                *h_context;
0146     enum MES_LOG_CONTEXT_STATE  new_context_state;
0147 };
0148 
0149 struct MES_LOG_QUEUE_NEW_WORK {
0150     uint64_t                   h_queue;
0151     uint64_t                   reserved;
0152 };
0153 
0154 struct MES_LOG_QUEUE_UNWAIT_SYNC_OBJECT {
0155     uint64_t                   h_queue;
0156     uint64_t                   h_sync_object;
0157 };
0158 
0159 struct MES_LOG_QUEUE_NO_MORE_WORK {
0160     uint64_t                   h_queue;
0161     uint64_t                   reserved;
0162 };
0163 
0164 struct MES_LOG_QUEUE_WAIT_SYNC_OBJECT {
0165     uint64_t                   h_queue;
0166     uint64_t                   h_sync_object;
0167 };
0168 
0169 struct MES_LOG_ENTRY_HEADER {
0170     uint32_t    first_free_entry_index;
0171     uint32_t    wraparound_count;
0172     uint64_t    number_of_entries;
0173     uint64_t    reserved[2];
0174 };
0175 
0176 struct MES_LOG_ENTRY_DATA {
0177     uint64_t    gpu_time_stamp;
0178     uint32_t    operation_type; /* operation_type is of MES_LOG_OPERATION type */
0179     uint32_t    reserved_operation_type_bits;
0180     union {
0181         struct MES_LOG_CONTEXT_STATE_CHANGE     context_state_change;
0182         struct MES_LOG_QUEUE_NEW_WORK           queue_new_work;
0183         struct MES_LOG_QUEUE_UNWAIT_SYNC_OBJECT queue_unwait_sync_object;
0184         struct MES_LOG_QUEUE_NO_MORE_WORK       queue_no_more_work;
0185         struct MES_LOG_QUEUE_WAIT_SYNC_OBJECT   queue_wait_sync_object;
0186         uint64_t                                all[2];
0187     };
0188 };
0189 
0190 struct MES_LOG_BUFFER {
0191     struct MES_LOG_ENTRY_HEADER header;
0192     struct MES_LOG_ENTRY_DATA   entries[1];
0193 };
0194 
0195 enum MES_SWIP_TO_HWIP_DEF {
0196     MES_MAX_HWIP_SEGMENT = 8,
0197 };
0198 
0199 union MESAPI_SET_HW_RESOURCES {
0200     struct {
0201         union MES_API_HEADER    header;
0202         uint32_t        vmid_mask_mmhub;
0203         uint32_t        vmid_mask_gfxhub;
0204         uint32_t        gds_size;
0205         uint32_t        paging_vmid;
0206         uint32_t        compute_hqd_mask[MAX_COMPUTE_PIPES];
0207         uint32_t        gfx_hqd_mask[MAX_GFX_PIPES];
0208         uint32_t        sdma_hqd_mask[MAX_SDMA_PIPES];
0209         uint32_t        aggregated_doorbells[AMD_PRIORITY_NUM_LEVELS];
0210         uint64_t        g_sch_ctx_gpu_mc_ptr;
0211         uint64_t        query_status_fence_gpu_mc_ptr;
0212         uint32_t        gc_base[MES_MAX_HWIP_SEGMENT];
0213         uint32_t        mmhub_base[MES_MAX_HWIP_SEGMENT];
0214         uint32_t        osssys_base[MES_MAX_HWIP_SEGMENT];
0215         struct MES_API_STATUS   api_status;
0216         union {
0217             struct {
0218                 uint32_t disable_reset  : 1;
0219                 uint32_t use_different_vmid_compute : 1;
0220                 uint32_t disable_mes_log   : 1;
0221                 uint32_t apply_mmhub_pgvm_invalidate_ack_loss_wa : 1;
0222                 uint32_t apply_grbm_remote_register_dummy_read_wa : 1;
0223                 uint32_t second_gfx_pipe_enabled : 1;
0224                 uint32_t enable_level_process_quantum_check : 1;
0225                 uint32_t reserved   : 25;
0226             };
0227             uint32_t    uint32_t_all;
0228         };
0229         uint32_t    oversubscription_timer;
0230         uint64_t        doorbell_info;
0231     };
0232 
0233     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0234 };
0235 
0236 union MESAPI__ADD_QUEUE {
0237     struct {
0238         union MES_API_HEADER        header;
0239         uint32_t            process_id;
0240         uint64_t            page_table_base_addr;
0241         uint64_t            process_va_start;
0242         uint64_t            process_va_end;
0243         uint64_t            process_quantum;
0244         uint64_t            process_context_addr;
0245         uint64_t            gang_quantum;
0246         uint64_t            gang_context_addr;
0247         uint32_t            inprocess_gang_priority;
0248         enum MES_AMD_PRIORITY_LEVEL gang_global_priority_level;
0249         uint32_t            doorbell_offset;
0250         uint64_t            mqd_addr;
0251         uint64_t            wptr_addr;
0252         uint64_t                        h_context;
0253         uint64_t                        h_queue;
0254         enum MES_QUEUE_TYPE     queue_type;
0255         uint32_t            gds_base;
0256         uint32_t            gds_size;
0257         uint32_t            gws_base;
0258         uint32_t            gws_size;
0259         uint32_t            oa_mask;
0260         uint64_t                        trap_handler_addr;
0261         uint32_t                        vm_context_cntl;
0262 
0263         struct {
0264             uint32_t paging         : 1;
0265             uint32_t debug_vmid     : 4;
0266             uint32_t program_gds        : 1;
0267             uint32_t is_gang_suspended  : 1;
0268             uint32_t is_tmz_queue       : 1;
0269             uint32_t map_kiq_utility_queue  : 1;
0270             uint32_t is_kfd_process     : 1;
0271             uint32_t trap_en        : 1;
0272             uint32_t is_aql_queue       : 1;
0273             uint32_t reserved       : 20;
0274         };
0275         struct MES_API_STATUS       api_status;
0276         uint64_t                        tma_addr;
0277     };
0278 
0279     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0280 };
0281 
0282 union MESAPI__REMOVE_QUEUE {
0283     struct {
0284         union MES_API_HEADER    header;
0285         uint32_t        doorbell_offset;
0286         uint64_t        gang_context_addr;
0287 
0288         struct {
0289             uint32_t unmap_legacy_gfx_queue   : 1;
0290             uint32_t unmap_kiq_utility_queue  : 1;
0291             uint32_t preempt_legacy_gfx_queue : 1;
0292             uint32_t unmap_legacy_queue       : 1;
0293             uint32_t reserved                 : 28;
0294         };
0295         struct MES_API_STATUS       api_status;
0296 
0297         uint32_t                    pipe_id;
0298         uint32_t                    queue_id;
0299 
0300         uint64_t                    tf_addr;
0301         uint32_t                    tf_data;
0302 
0303         enum MES_QUEUE_TYPE         queue_type;
0304     };
0305 
0306     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0307 };
0308 
0309 union MESAPI__SET_SCHEDULING_CONFIG {
0310     struct {
0311         union MES_API_HEADER    header;
0312         /* Grace period when preempting another priority band for this
0313          * priority band. The value for idle priority band is ignored,
0314          * as it never preempts other bands.
0315          */
0316         uint64_t        grace_period_other_levels[AMD_PRIORITY_NUM_LEVELS];
0317         /* Default quantum for scheduling across processes within
0318          * a priority band.
0319          */
0320         uint64_t        process_quantum_for_level[AMD_PRIORITY_NUM_LEVELS];
0321         /* Default grace period for processes that preempt each other
0322          * within a priority band.
0323          */
0324         uint64_t        process_grace_period_same_level[AMD_PRIORITY_NUM_LEVELS];
0325         /* For normal level this field specifies the target GPU
0326          * percentage in situations when it's starved by the high level.
0327          * Valid values are between 0 and 50, with the default being 10.
0328          */
0329         uint32_t        normal_yield_percent;
0330         struct MES_API_STATUS   api_status;
0331     };
0332 
0333     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0334 };
0335 
0336 union MESAPI__PERFORM_YIELD {
0337     struct {
0338         union MES_API_HEADER    header;
0339         uint32_t        dummy;
0340         struct MES_API_STATUS   api_status;
0341     };
0342 
0343     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0344 };
0345 
0346 union MESAPI__CHANGE_GANG_PRIORITY_LEVEL {
0347     struct {
0348         union MES_API_HEADER        header;
0349         uint32_t            inprocess_gang_priority;
0350         enum MES_AMD_PRIORITY_LEVEL gang_global_priority_level;
0351         uint64_t            gang_quantum;
0352         uint64_t            gang_context_addr;
0353         struct MES_API_STATUS       api_status;
0354     };
0355 
0356     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0357 };
0358 
0359 union MESAPI__SUSPEND {
0360     struct {
0361         union MES_API_HEADER    header;
0362         /* false - suspend all gangs; true - specific gang */
0363         struct {
0364             uint32_t suspend_all_gangs  : 1;
0365             uint32_t reserved       : 31;
0366         };
0367         /* gang_context_addr is valid only if suspend_all = false */
0368         uint64_t        gang_context_addr;
0369 
0370         uint64_t        suspend_fence_addr;
0371         uint32_t        suspend_fence_value;
0372 
0373         struct MES_API_STATUS   api_status;
0374     };
0375 
0376     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0377 };
0378 
0379 union MESAPI__RESUME {
0380     struct {
0381         union MES_API_HEADER    header;
0382         /* false - resume all gangs; true - specified gang */
0383         struct {
0384             uint32_t resume_all_gangs   : 1;
0385             uint32_t reserved       : 31;
0386         };
0387         /* valid only if resume_all_gangs = false */
0388         uint64_t        gang_context_addr;
0389 
0390         struct MES_API_STATUS   api_status;
0391     };
0392 
0393     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0394 };
0395 
0396 union MESAPI__RESET {
0397     struct {
0398         union MES_API_HEADER        header;
0399 
0400         struct {
0401             /* Only reset the queue given by doorbell_offset (not entire gang) */
0402             uint32_t                reset_queue_only : 1;
0403             /* Hang detection first then reset any queues that are hung */
0404             uint32_t                hang_detect_then_reset : 1;
0405             /* Only do hang detection (no reset) */
0406             uint32_t                hang_detect_only : 1;
0407             /* Rest HP and LP kernel queues not managed by MES */
0408             uint32_t                reset_legacy_gfx : 1;
0409             uint32_t                reserved : 28;
0410         };
0411 
0412         uint64_t            gang_context_addr;
0413 
0414         /* valid only if reset_queue_only = true */
0415         uint32_t            doorbell_offset;
0416 
0417         /* valid only if hang_detect_then_reset = true */
0418         uint64_t            doorbell_offset_addr;
0419         enum MES_QUEUE_TYPE     queue_type;
0420 
0421         /* valid only if reset_legacy_gfx = true */
0422         uint32_t            pipe_id_lp;
0423         uint32_t            queue_id_lp;
0424         uint32_t            vmid_id_lp;
0425         uint64_t            mqd_mc_addr_lp;
0426         uint32_t            doorbell_offset_lp;
0427         uint64_t            wptr_addr_lp;
0428 
0429         uint32_t            pipe_id_hp;
0430         uint32_t            queue_id_hp;
0431         uint32_t            vmid_id_hp;
0432         uint64_t            mqd_mc_addr_hp;
0433         uint32_t            doorbell_offset_hp;
0434         uint64_t            wptr_addr_hp;
0435 
0436         struct MES_API_STATUS       api_status;
0437     };
0438 
0439     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0440 };
0441 
0442 union MESAPI__SET_LOGGING_BUFFER {
0443     struct {
0444         union MES_API_HEADER    header;
0445         /* There are separate log buffers for each queue type */
0446         enum MES_QUEUE_TYPE log_type;
0447         /* Log buffer GPU Address */
0448         uint64_t        logging_buffer_addr;
0449         /* number of entries in the log buffer */
0450         uint32_t        number_of_entries;
0451         /* Entry index at which CPU interrupt needs to be signalled */
0452         uint32_t        interrupt_entry;
0453 
0454         struct MES_API_STATUS   api_status;
0455     };
0456 
0457     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0458 };
0459 
0460 union MESAPI__QUERY_MES_STATUS {
0461     struct {
0462         union MES_API_HEADER    header;
0463         bool            mes_healthy; /* 0 - not healthy, 1 - healthy */
0464         struct MES_API_STATUS   api_status;
0465     };
0466 
0467     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0468 };
0469 
0470 union MESAPI__PROGRAM_GDS {
0471     struct {
0472         union MES_API_HEADER    header;
0473         uint64_t        process_context_addr;
0474         uint32_t        gds_base;
0475         uint32_t        gds_size;
0476         uint32_t        gws_base;
0477         uint32_t        gws_size;
0478         uint32_t        oa_mask;
0479         struct MES_API_STATUS   api_status;
0480     };
0481 
0482     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0483 };
0484 
0485 union MESAPI__SET_DEBUG_VMID {
0486     struct {
0487         union MES_API_HEADER    header;
0488         struct MES_API_STATUS   api_status;
0489         union {
0490             struct {
0491                 uint32_t use_gds    : 1;
0492                 uint32_t operation      : 2;
0493                 uint32_t reserved       : 29;
0494             } flags;
0495             uint32_t    u32All;
0496         };
0497         uint32_t        reserved;
0498         uint32_t        debug_vmid;
0499         uint64_t        process_context_addr;
0500         uint64_t        page_table_base_addr;
0501         uint64_t        process_va_start;
0502         uint64_t        process_va_end;
0503         uint32_t        gds_base;
0504         uint32_t        gds_size;
0505         uint32_t        gws_base;
0506         uint32_t        gws_size;
0507         uint32_t        oa_mask;
0508 
0509         /* output addr of the acquired vmid value */
0510         uint64_t                output_addr;
0511     };
0512 
0513     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0514 };
0515 
0516 enum MESAPI_MISC_OPCODE {
0517     MESAPI_MISC__WRITE_REG,
0518     MESAPI_MISC__INV_GART,
0519     MESAPI_MISC__QUERY_STATUS,
0520     MESAPI_MISC__READ_REG,
0521     MESAPI_MISC__WAIT_REG_MEM,
0522     MESAPI_MISC__MAX,
0523 };
0524 
0525 enum { MISC_DATA_MAX_SIZE_IN_DWORDS = 20 };
0526 
0527 struct WRITE_REG {
0528     uint32_t                  reg_offset;
0529     uint32_t                  reg_value;
0530 };
0531 
0532 struct READ_REG {
0533     uint32_t                  reg_offset;
0534     uint64_t                  buffer_addr;
0535 };
0536 
0537 enum WRM_OPERATION {
0538     WRM_OPERATION__WAIT_REG_MEM,
0539     WRM_OPERATION__WR_WAIT_WR_REG,
0540     WRM_OPERATION__MAX,
0541 };
0542 
0543 struct WAIT_REG_MEM {
0544     enum WRM_OPERATION         op;
0545     uint32_t                   reference;
0546     uint32_t                   mask;
0547     uint32_t                   reg_offset1;
0548     uint32_t                   reg_offset2;
0549 };
0550 
0551 struct INV_GART {
0552     uint64_t                  inv_range_va_start;
0553     uint64_t                  inv_range_size;
0554 };
0555 
0556 struct QUERY_STATUS {
0557     uint32_t context_id;
0558 };
0559 
0560 union MESAPI__MISC {
0561     struct {
0562         union MES_API_HEADER    header;
0563         enum MESAPI_MISC_OPCODE opcode;
0564         struct MES_API_STATUS   api_status;
0565 
0566         union {
0567             struct      WRITE_REG write_reg;
0568             struct      INV_GART inv_gart;
0569             struct      QUERY_STATUS query_status;
0570             struct      READ_REG read_reg;
0571             struct          WAIT_REG_MEM wait_reg_mem;
0572             uint32_t    data[MISC_DATA_MAX_SIZE_IN_DWORDS];
0573         };
0574     };
0575 
0576     uint32_t    max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0577 };
0578 
0579 union MESAPI__UPDATE_ROOT_PAGE_TABLE {
0580     struct {
0581         union MES_API_HEADER        header;
0582         uint64_t                    page_table_base_addr;
0583         uint64_t                    process_context_addr;
0584         struct MES_API_STATUS       api_status;
0585     };
0586 
0587     uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0588 };
0589 
0590 union MESAPI_AMD_LOG {
0591     struct {
0592         union MES_API_HEADER        header;
0593         uint64_t                    p_buffer_memory;
0594         uint64_t                    p_buffer_size_used;
0595         struct MES_API_STATUS       api_status;
0596     };
0597 
0598     uint32_t max_dwords_in_api[API_FRAME_SIZE_IN_DWORDS];
0599 };
0600 
0601 #pragma pack(pop)
0602 #endif