]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/*: Remove old trace helpers 1114/head
authorMarco Schlumpp <marco@unikraft.io>
Thu, 11 May 2023 08:44:59 +0000 (10:44 +0200)
committerMarco Schlumpp <marco@unikraft.io>
Fri, 29 Sep 2023 14:38:39 +0000 (16:38 +0200)
With the new crash screen they are now unused.

Signed-off-by: Marco Schlumpp <marco@unikraft.io>
plat/common/include/uk/plat/common/trace.h [deleted file]
plat/common/x86/trace.c [deleted file]
plat/kvm/Makefile.uk
plat/xen/Makefile.uk

diff --git a/plat/common/include/uk/plat/common/trace.h b/plat/common/include/uk/plat/common/trace.h
deleted file mode 100644 (file)
index 3e841c2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
-/*
- * Authors: Costin Lupu <costin.lupu@cs.pub.ro>
- *
- * Copyright (c) 2018, NEC Europe Ltd., NEC Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
- *    contributors may be used to endorse or promote products derived from
- *    this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-#ifndef __PLAT_CMN_TRACE_H__
-#define __PLAT_CMN_TRACE_H__
-
-#include <uk/arch/lcpu.h>
-
-void dump_regs(struct __regs *regs);
-void dump_mem(unsigned long addr);
-#if !__OMIT_FRAMEPOINTER__
-void stack_walk(void);
-void stack_walk_for_frame(unsigned long frame_base);
-#endif /* !__OMIT_FRAMEPOINTER__ */
-
-#endif /* __PLAT_CMN_TRACE_H__ */
diff --git a/plat/common/x86/trace.c b/plat/common/x86/trace.c
deleted file mode 100644 (file)
index 9b5ad51..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-/* SPDX-License-Identifier: BSD-3-Clause */
-/*
- * Authors: Costin Lupu <costin.lupu@cs.pub.ro>
- *
- * Copyright (c) 2018, NEC Europe Ltd., NEC Corporation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the copyright holder nor the names of its
- *    contributors may be used to endorse or promote products derived from
- *    this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <uk/plat/common/trace.h>
-#include <uk/print.h>
-
-#define PAGE_SIZE 4096 /* TODO take this from another header */
-
-
-void dump_regs(struct __regs *regs)
-{
-       uk_pr_crit("RIP: %016lx CS: %04lx\n", regs->rip, regs->cs & 0xffff);
-       uk_pr_crit("RSP: %016lx SS: %04lx EFLAGS: %08lx\n",
-                       regs->rsp, regs->ss, regs->eflags);
-       uk_pr_crit("RAX: %016lx RBX: %016lx RCX: %016lx\n",
-                       regs->rax, regs->rbx, regs->rcx);
-       uk_pr_crit("RDX: %016lx RSI: %016lx RDI: %016lx\n",
-                       regs->rdx, regs->rsi, regs->rdi);
-       uk_pr_crit("RBP: %016lx R08: %016lx R09: %016lx\n",
-                       regs->rbp, regs->r8, regs->r9);
-       uk_pr_crit("R10: %016lx R11: %016lx R12: %016lx\n",
-                       regs->r10, regs->r11, regs->r12);
-       uk_pr_crit("R13: %016lx R14: %016lx R15: %016lx\n",
-                       regs->r13, regs->r14, regs->r15);
-}
-
-/* TODO to be removed; we should use uk_hexdump() instead */
-void dump_mem(unsigned long addr)
-{
-       unsigned long i;
-
-       if (addr < PAGE_SIZE)
-               return;
-
-       for (i = ((addr) - 16) & ~15; i < (((addr) + 48) & ~15); i++) {
-               if (!(i % 16))
-                       uk_pr_crit("\n%lx:", i);
-               uk_pr_crit(" %02x", *(unsigned char *) i);
-       }
-       uk_pr_crit("\n");
-}
-
-#if !__OMIT_FRAMEPOINTER__
-void stack_walk(void)
-{
-       unsigned long bp;
-
-       asm("movq %%rbp, %0" : "=r"(bp));
-
-       stack_walk_for_frame(bp);
-}
-
-void stack_walk_for_frame(unsigned long frame_base)
-{
-       unsigned long *frame = (void *) frame_base;
-
-       uk_pr_crit("base is %#lx ", frame_base);
-       uk_pr_crit("caller is %#lx\n", frame[1]);
-       if (frame[0])
-               stack_walk_for_frame(frame[0]);
-}
-#endif /* !__OMIT_FRAMEPOINTER__ */
index 432088233bf8534be2177e45dec58cbc3df12e67..ac39932798278fe27749a2043db5e041d0898572 100644 (file)
@@ -39,7 +39,6 @@ endif
 ifeq ($(CONFIG_PAGING),y)
 LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/paging.c|isr
 endif
-LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/trace.c|common
 LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/traps.c|isr
 LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/cpu_native.c|common
 LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/lcpu.c|x86_common
index 5670284e00c477b02bfefaa57ff782fb56a57820..7eb5083d0ff77b9d4114cd50ec25c4096707740f 100644 (file)
@@ -56,7 +56,6 @@ LIBXENPLAT_SRCS-y                += $(UK_PLAT_COMMON_BASE)/bootinfo.c|common
 LIBXENPLAT_SRCS-$(CONFIG_LIBFDT) += $(UK_PLAT_COMMON_BASE)/bootinfo_fdt.c|common
 LIBXENPLAT_SRCS-y                += $(UK_PLAT_COMMON_BASE)/bootinfo.lds.S|common
 
-LIBXENPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/trace.c|common
 LIBXENPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(UK_PLAT_COMMON_BASE)/x86/traps.c|common
 LIBXENPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBXENPLAT_BASE)/x86/setup.c
 LIBXENPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBXENPLAT_BASE)/x86/traps.c