mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 12:15:35 +07:00
d2912cb15b
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
83 lines
1.3 KiB
ArmAsm
83 lines
1.3 KiB
ArmAsm
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* linux/arch/unicore32/kernel/debug.S
|
|
*
|
|
* Code specific to PKUnity SoC and UniCore ISA
|
|
*
|
|
* Copyright (C) 2001-2010 GUAN Xue-tao
|
|
*
|
|
* 32-bit debugging code
|
|
*/
|
|
#include <linux/linkage.h>
|
|
#include <asm/assembler.h>
|
|
|
|
.text
|
|
|
|
/*
|
|
* Some debugging routines (useful if you've got MM problems and
|
|
* printk isn't working). For DEBUGGING ONLY!!! Do not leave
|
|
* references to these in a production kernel!
|
|
*/
|
|
#include "debug-macro.S"
|
|
|
|
/*
|
|
* Useful debugging routines
|
|
*/
|
|
ENTRY(printhex8)
|
|
mov r1, #8
|
|
b printhex
|
|
ENDPROC(printhex8)
|
|
|
|
ENTRY(printhex4)
|
|
mov r1, #4
|
|
b printhex
|
|
ENDPROC(printhex4)
|
|
|
|
ENTRY(printhex2)
|
|
mov r1, #2
|
|
printhex: adr r2, hexbuf
|
|
add r3, r2, r1
|
|
mov r1, #0
|
|
stb r1, [r3]
|
|
1: and r1, r0, #15
|
|
mov r0, r0 >> #4
|
|
csub.a r1, #10
|
|
beg 2f
|
|
add r1, r1, #'0' - 'a' + 10
|
|
2: add r1, r1, #'a' - 10
|
|
stb.w r1, [r3+], #-1
|
|
cxor.a r3, r2
|
|
bne 1b
|
|
mov r0, r2
|
|
b printascii
|
|
ENDPROC(printhex2)
|
|
|
|
.ltorg
|
|
|
|
ENTRY(printascii)
|
|
addruart r3
|
|
b 2f
|
|
1: waituart r2, r3
|
|
senduart r1, r3
|
|
busyuart r2, r3
|
|
cxor.a r1, #'\n'
|
|
cmoveq r1, #'\r'
|
|
beq 1b
|
|
2: cxor.a r0, #0
|
|
beq 3f
|
|
ldb.w r1, [r0]+, #1
|
|
cxor.a r1, #0
|
|
bne 1b
|
|
3: mov pc, lr
|
|
ENDPROC(printascii)
|
|
|
|
ENTRY(printch)
|
|
addruart r3
|
|
mov r1, r0
|
|
mov r0, #0
|
|
b 1b
|
|
ENDPROC(printch)
|
|
|
|
hexbuf: .space 16
|
|
|