From nobody Thu Feb 22 10:31:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TgTvZ3csNz5CLvJ; Thu, 22 Feb 2024 10:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TgTvZ0hVDz4ktg; Thu, 22 Feb 2024 10:31:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708597882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jm/o4vSTLFgA2GZ+QINpIRmPYeE4papFbATDQ+FmebM=; b=lFbxAJmuqzRH7+uxi+DlG5oK+BRTwUedhLFBvDAqBJ0GcwB3C5ZGVdNwocBpNRNvE3N6Tj uOEFuMg9ct04dNyYW3NXZ4NK0Ife/kDkSee+J3I0DtWwmrZJ0lswKijGuKVeduDSOffw/A VZ3Lnsz8xf+pFjHpO4RnE0yNPEE/kuOQPJfri4lGU49Zu+eR/I69oLMcBZmgtM0y6nPTKn ARWizkoqsAyoZcnme8y7DuiCJST3gEOhkadgPYCwE6mTpfNFKulBzUL5OPE3W9aDVZ6v7F vKJDJARua1JDGgiBNzGjkxyDbjjL/44MvWuYsrLAuUUdFjAtuSHcTJ/knO1zyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708597882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jm/o4vSTLFgA2GZ+QINpIRmPYeE4papFbATDQ+FmebM=; b=kIweKOUpuotsHpDXisGjVw5QH52jqJaPxWEYgPte6DvgvimjVhrd8DFbvYEFbjszyMKy+Y hHiQ5dtZNDLRDxA6bYs+fLitgjmY6w3tE0xj6yy/XRUCtNsjnIjQiGIP6y65SwO4/byp+A EPGKOgfJNQAHbAJPM/seoZdHfWYJwxQ/JN8O0qmwJmVvbNChcro3y+t6/FjMz2AXeDeL9v jZ5JGwJyI3cYpeJ/5IYiQHUGxR9V8Km1yYPgk49q3x3xJczFfBqK1ErN7nK304UU05udsi +gs0a3CkKsvwb/XhGsya8T9YHlj3zviQZxB7GL7bbO3r29muopizVnhnsztIlw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708597882; a=rsa-sha256; cv=none; b=Y7noyKGrK7rJ1zVCB4+nsl8hQb33bjvz3voTwFr0+fAiYbn+fL5qXcoA2zFcffjmEKO/3f EkgyitEdt9hwPAtrqaRjblBhjWqMKVspZp7m84y3KabJmBzFUuxgiUBP5vK//tzaejnqKF 8DRwJN4xMg+Pi55WOMn1HkRYQ2GDPi780Rc1/Zrgcjdxjp1OLoUeQsz6E2fEZVWZwfe8kX VOOOuJKqhfrFzqppFzKh/TAg/LFR7uba4Lp0Q3woPiWMGxA7fBqk9J6dfOfqGNLm3fYAAy 72T99kfocgttUfm0UBJ9ZGnfT68biw98d4aPsgTHVKMlkQMaCXp2VNVC2dgcFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TgTvY6vfhzSb8; Thu, 22 Feb 2024 10:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41MAVLe4016743; Thu, 22 Feb 2024 10:31:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41MAVLib016740; Thu, 22 Feb 2024 10:31:21 GMT (envelope-from git) Date: Thu, 22 Feb 2024 10:31:21 GMT Message-Id: <202402221031.41MAVLib016740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: 848e2719af50 - main - x86/xen: remove parameter from fixup_console() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 848e2719af508516452b447047ddf6642ce42d0f Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=848e2719af508516452b447047ddf6642ce42d0f commit 848e2719af508516452b447047ddf6642ce42d0f Author: Roger Pau Monné AuthorDate: 2024-02-02 08:32:15 +0000 Commit: Roger Pau Monné CommitDate: 2024-02-22 10:08:04 +0000 x86/xen: remove parameter from fixup_console() And instead fetch the metadata inside of the function. This is done in preparation for changing the call site of fixup_console(), which will no longer have the kernel metedata pointer in context. No functional change intended. Sponsored by: Cloud Software Group Reviewed by: markj Differential revision: https://reviews.freebsd.org/D43931 --- sys/x86/xen/pv.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index 9ea276caee81..75c345ff3a2c 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -335,7 +335,7 @@ xen_pvh_parse_symtab(void) #endif static void -fixup_console(caddr_t kmdp) +fixup_console(void) { struct xen_platform_op op = { .cmd = XENPF_get_dom0_console, @@ -346,10 +346,19 @@ fixup_console(caddr_t kmdp) struct vbe_fb vbe; } *fb = NULL; int size; + caddr_t kmdp; + + kmdp = preload_search_by_type("elf kernel"); + if (kmdp == NULL) + kmdp = preload_search_by_type("elf64 kernel"); + if (kmdp == NULL) { + xc_printf("Unable to find kernel metadata\n"); + return; + } size = HYPERVISOR_platform_op(&op); if (size < 0) { - xc_printf("Failed to get dom0 video console info: %d\n", size); + xc_printf("Failed to get video console info: %d\n", size); return; } @@ -486,7 +495,7 @@ xen_pvh_parse_preload_data(uint64_t modulep) else strlcpy(bootmethod, "BIOS", sizeof(bootmethod)); - fixup_console(kmdp); + fixup_console(); } else { /* Parse the extra boot information given by Xen */ if (start_info->cmdline_paddr != 0)