From patchwork Mon Nov 25 19:56:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 845383 Delivered-To: patch@linaro.org Received: by 2002:a5d:688e:0:b0:382:43a8:7b94 with SMTP id h14csp1399220wru; Mon, 25 Nov 2024 12:05:02 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWtth7KA12K5uT4VoRxXb0CxsA+1xwMjOSRB/40cEW5PgjaJ8OnyXxDax1BG41dDDpxG91jsA==@linaro.org X-Google-Smtp-Source: AGHT+IGQSRkuzaPPS9Yx2P2JS6gtq82jyszVgTusOmOXkNZm8XwqWxQjGSSqKI1W5u4rP/TLRU+C X-Received: by 2002:a05:690c:4b09:b0:6ea:6e90:144b with SMTP id 00721157ae682-6eee088785amr142337547b3.3.1732565101799; Mon, 25 Nov 2024 12:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732565101; cv=none; d=google.com; s=arc-20240605; b=C6S+bSXFt5bfguoj+6fzHyr4z3tbegiTz23NrZrgSWd1FurvpBuKFXS1JxyKXPAFnJ JREQCM6AAzoTneoKU2AVno3sYQAar4J3XqdBWMBDFgSdEJ+Er52pAkKwlAv3tc4otLjP VKnHZmHSSQeA6ylLpzt0aS4ejzxFML9TBQWVZWkBXIEL4Gf0oYBEP6rvkjNpDqaES1wA P3SIYl7U2xeIZuzTa9G2S26j1LS1KPZBmLy13h7I9TwdWAv7BlnHe46d3CQ9S58A0VhQ 05z+OV+GPacIOwLuM9dkUYN6TGaecSY8vuQO6hcYhb1glRtH3l6jRDzk1XYsTxjvT3LR 6U2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+uO/papoLLk0b3uqMB8ZdXvs73vVNVF+lSFeGHBI0zI=; fh=yXxpLWTGuGhH4pr3XZkQIcrv1xInPj+TBaQ3f0B1vu4=; b=RvChwH1WOHmg9Pui4zL0cVzmtuSHulo5xfn7dc5qa0IYMyxmT1FBN98NrSI63AzIaq T9leV4VJb2orLfCu2Fdkn/tcjDeOrWKqPcz0eqS6nykJFe9gsYOQt6LHwqxmo+Ej3hkC mTswehh/s2TCbDWRiMAARMFFObfyWM9SPZDivtqo869KvXHwgIzthR1A3b3T47jBBS+a pSog2K44XmgV0L4Ij3zTfnBXQ24sNkR0RpYbz65r3C079Sdf0N692ydwjxWlFQJMUIMo KZJa7oCDv/VvKf9WqagMWKqTpcLBATrGNHHKuIblEK1o+Zp7E7kaLZsMaH0/Cv9qSQeO jBoA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OhLABPK0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 00721157ae682-6eedfe24311si57317047b3.78.2024.11.25.12.05.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Nov 2024 12:05:01 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OhLABPK0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFfFP-0005JX-L3; Mon, 25 Nov 2024 14:59:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFfFK-0005En-Hi for qemu-devel@nongnu.org; Mon, 25 Nov 2024 14:59:46 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFfFD-0004t3-OF for qemu-devel@nongnu.org; Mon, 25 Nov 2024 14:59:46 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-382442b7d9aso3702400f8f.1 for ; Mon, 25 Nov 2024 11:59:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732564778; x=1733169578; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+uO/papoLLk0b3uqMB8ZdXvs73vVNVF+lSFeGHBI0zI=; b=OhLABPK0bpZqrobwEtOOLMTKOkMVtkJ5E7s1GUlIG6BExVa7kBportjf1o4p578c5i c1yiJORL9E2+FOSULKNlW+m6rTnMFmLY9cUpTMxZBXhp6Fn4Cha96b2NKzh7JxxlVDkf LDFd012ecJThVk2mhIexaaZa+huU9GvCJASXDIMl5TsyBq8O/sX5ojAZkfnx9OaENrX/ XdsfnWLqjehD45XJyZJbwR9i7k+DaUvq5sb9NY3viFJ4Sszp6JwCJFFqaIHPoZ2gdHf1 Bz9gXBeHHZcKDMcAECk+FgL0CL43V4Gph6I/l0460RVkM3wRzIw03qavu+mcQfwKsMC+ k39Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732564778; x=1733169578; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+uO/papoLLk0b3uqMB8ZdXvs73vVNVF+lSFeGHBI0zI=; b=OIn6yHfbJWPNaEB1p6eR35ThMxHjD22iOEAqcqjSfUUGdBoOhADR3ibbKrLA9zoGLc 8Hv4Kk36jk7pLknvqScHdefJwthsn9KVvg94Dai155YVg3VtwEstdDJgCHZlQQAtfvRA u6sn8chfBYJ5e5CQGCImNz945k0DcqXuxsxcgey+ZR96xZKHotY4g1dE1wPyFn6jlPil op/RAwdUrTUhjjL5hCxDbrEmiGYBXphuj66TnKpYgYkTyotCpb0Mn22RL1eYnmqB9nOl pMQeVU85HmT0HlNMLfrbbpRwSOog1IDw7fP128VJEv4yxhBG/RLCXglquWbxcuBNmZ/9 arNA== X-Forwarded-Encrypted: i=1; AJvYcCUAAlaAmrzehqdVI8fYx/N30hmCZGZoeRuGhXOt7WrzDFVO0IhzkPFMlt3SIgMobMau3+xjiZx/iQ3I@nongnu.org X-Gm-Message-State: AOJu0YztX1TU9GW3v0mH108Ezkvvs7wb0dWFMwcJ3KzRZ6Ur/x7Xe8ZS GG0MaB6asyPFwHFD92BGP9L3PrqzZ8Hz+3FKQ27xvGKtn6BQb+wNeZXFbgUfbFk= X-Gm-Gg: ASbGnctMHZ3ueQXosvC1Tl7tX+LgCP0ma2MpbNsTfiKqevMYBhNGKibe1PCKOz5zThv a3ITWZPcff9laaZWaOI/4joqTpnZEDhbWHOxIFeH6M81jWL6PVj9B/6OQLp9IdhZ2U7yeyzdyYK XWfJag/rLhE3EMJwLTj2Lnd+gAokoHLIzeVOH207b/DLFVFjZ7FmAPcUyYBLIuMxRPQViJel3CE xFn5Wx/btD5tBRmearkOSmh6h6vXUK81R+Eb1mnUbpOfTwS5De49lcytUbqoyVACyJ+ X-Received: by 2002:a05:6000:1541:b0:382:2f62:bd45 with SMTP id ffacd0b85a97d-38260b70e7emr10262936f8f.29.1732564778383; Mon, 25 Nov 2024 11:59:38 -0800 (PST) Received: from localhost.localdomain ([2.221.137.100]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fd0fbdcsm11237971f8f.109.2024.11.25.11.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 11:59:38 -0800 (PST) From: Jean-Philippe Brucker To: peter.maydell@linaro.org Cc: richard.henderson@linaro.org, philmd@linaro.org, qemu-arm@nongnu.org, qemu-devel@nongnu.org, alex.bennee@linaro.org, Jean-Philippe Brucker Subject: [RFC PATCH v3 24/26] hw/core/loader: Add fields to RomLoaderNotify Date: Mon, 25 Nov 2024 19:56:23 +0000 Message-ID: <20241125195626.856992-26-jean-philippe@linaro.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241125195626.856992-2-jean-philippe@linaro.org> References: <20241125195626.856992-2-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=jean-philippe@linaro.org; helo=mail-wr1-x431.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In order to write an event log, the ROM load notification handler needs two more fields. Signed-off-by: Jean-Philippe Brucker --- v2->v3: New --- include/hw/loader.h | 2 ++ hw/core/loader.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/hw/loader.h b/include/hw/loader.h index 0cd9905f97..73f317966d 100644 --- a/include/hw/loader.h +++ b/include/hw/loader.h @@ -355,6 +355,8 @@ ssize_t rom_add_option(const char *file, int32_t bootindex); typedef struct RomLoaderNotify { /* Parameters passed to rom_add_blob() */ + const char *name; + uint8_t *data; hwaddr addr; size_t len; size_t max_len; diff --git a/hw/core/loader.c b/hw/core/loader.c index 759a62cf58..4ff40e8762 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -1278,6 +1278,8 @@ static void rom_reset(void *unused) trace_loader_write_rom(rom->name, rom->addr, rom->datasize, rom->isrom); notify = (RomLoaderNotify) { + .name = rom->name, + .data = rom->data, .addr = rom->addr, .len = rom->datasize, .max_len = rom->romsize,