mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
intel/decode: Add support to new version of Xe KMD devcoredump with canonical addresses
Customers suggested that Xe KMD should change all possible interfaces visible to users to canonical address, with that we need some changes to keep the decode of devcoredump working. A old version of the tool will not be able to decode secondary batch buffers when parsing a new version of the file but the new version of this tool will be able to parse both versions of devcoredump file. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37570>
This commit is contained in:
parent
24235bcac3
commit
c45f442d5c
4 changed files with 13 additions and 4 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "intel_decoder.h"
|
||||
#include "intel_decoder_private.h"
|
||||
#include "intel/common/intel_gem.h"
|
||||
|
||||
#include "util/macros.h"
|
||||
#include "util/u_debug.h"
|
||||
|
|
@ -134,7 +135,7 @@ ctx_get_bo(struct intel_batch_decode_ctx *ctx, bool ppgtt, uint64_t addr)
|
|||
* bits. In order to correctly handle those aub dumps, we need to mask
|
||||
* off the top 16 bits.
|
||||
*/
|
||||
addr &= (~0ull >> 16);
|
||||
addr = intel_48b_address(addr);
|
||||
}
|
||||
|
||||
struct intel_batch_decode_bo bo = ctx->get_bo(ctx->user_data, ppgtt, addr);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "error_decode_lib.h"
|
||||
#include "error_decode_xe_lib.h"
|
||||
#include "intel/compiler/brw_isa_info.h"
|
||||
#include "intel/common/intel_gem.h"
|
||||
#include "intel/dev/intel_device_info.h"
|
||||
|
||||
static struct intel_batch_decode_bo
|
||||
|
|
@ -213,7 +214,7 @@ read_xe_data_file(FILE *file,
|
|||
|
||||
if (error_decode_xe_read_u64_hexacimal_parameter(line, "batch_addr[", &u64_value)) {
|
||||
batch_buffers.addrs = realloc(batch_buffers.addrs, sizeof(uint64_t) * (batch_buffers.len + 1));
|
||||
batch_buffers.addrs[batch_buffers.len] = u64_value;
|
||||
batch_buffers.addrs[batch_buffers.len] = intel_48b_address(u64_value);
|
||||
batch_buffers.len++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "error_decode_xe_lib.h"
|
||||
#include "error2hangdump_lib.h"
|
||||
#include "intel/common/intel_gem.h"
|
||||
#include "intel/dev/intel_device_info.h"
|
||||
#include "util/macros.h"
|
||||
|
||||
|
|
@ -42,7 +43,7 @@ read_xe_data_file(FILE *dump_file, FILE *hang_dump_file, bool verbose)
|
|||
|
||||
if (error_decode_xe_read_u64_hexacimal_parameter(line, "batch_addr[", &u64_value)) {
|
||||
batch_buffers.addrs = realloc(batch_buffers.addrs, sizeof(uint64_t) * (batch_buffers.len + 1));
|
||||
batch_buffers.addrs[batch_buffers.len] = u64_value;
|
||||
batch_buffers.addrs[batch_buffers.len] = intel_48b_address(u64_value);
|
||||
batch_buffers.len++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "error_decode_lib.h"
|
||||
#include "intel/common/intel_gem.h"
|
||||
#include "util/macros.h"
|
||||
|
||||
static const char *
|
||||
|
|
@ -210,7 +211,12 @@ static void
|
|||
xe_vm_entry_set(struct xe_vm_entry *entry, const uint64_t address,
|
||||
const uint32_t length, const uint32_t *data)
|
||||
{
|
||||
entry->address = address;
|
||||
/* Newer versions of Xe KMD will give us the canonical VMA address while
|
||||
* older will give us 48b address.
|
||||
* intel_batch_decoder.c convert addresses to 48b address before calling
|
||||
* get_bo() so here converting all VMA addresses to 48b.
|
||||
*/
|
||||
entry->address = intel_48b_address(address);
|
||||
entry->length = length;
|
||||
entry->data = data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue