Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f68f3400
Commit
f68f3400
authored
Oct 08, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: early printk support from Todd Inglett
parent
2afbb6a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
64 deletions
+52
-64
arch/ppc64/config.in
arch/ppc64/config.in
+1
-0
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/setup.c
+42
-55
arch/ppc64/kernel/udbg.c
arch/ppc64/kernel/udbg.c
+6
-8
arch/ppc64/xmon/xmon.c
arch/ppc64/xmon/xmon.c
+1
-1
include/asm-ppc64/udbg.h
include/asm-ppc64/udbg.h
+2
-0
No files found.
arch/ppc64/config.in
View file @
f68f3400
...
...
@@ -7,6 +7,7 @@ define_bool CONFIG_RWSEM_GENERIC_SPINLOCK n
define_bool CONFIG_RWSEM_XCHGADD_ALGORITHM y
define_bool CONFIG_GENERIC_ISA_DMA y
define_bool CONFIG_HAVE_DEC_LOCK y
define_bool CONFIG_EARLY_PRINTK y
source init/Config.in
...
...
arch/ppc64/kernel/setup.c
View file @
f68f3400
...
...
@@ -21,6 +21,8 @@
#include <linux/ide.h>
#include <linux/seq_file.h>
#include <linux/ioport.h>
#include <linux/console.h>
#include <linux/version.h>
#include <linux/tty.h>
#include <linux/root_dev.h>
#include <asm/io.h>
...
...
@@ -116,6 +118,23 @@ void ppcdbg_initialize(void) {
_naca
->
debug_switch
=
PPC_DEBUG_DEFAULT
;
/* | PPCDBG_BUSWALK | PPCDBG_PHBINIT | PPCDBG_MM | PPCDBG_MMINIT | PPCDBG_TCEINIT | PPCDBG_TCE */
;
}
static
struct
console
udbg_console
=
{
name:
"udbg"
,
write:
udbg_console_write
,
flags:
CON_PRINTBUFFER
,
index:
-
1
,
};
static
int
early_console_initialized
;
void
__init
disable_early_printk
(
void
)
{
if
(
!
early_console_initialized
)
return
;
unregister_console
(
&
udbg_console
);
early_console_initialized
=
0
;
}
/*
* Do some initial setup of the system. The paramters are those which
* were passed in from the bootloader.
...
...
@@ -162,62 +181,31 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
#endif
}
udbg_puts
(
"
\n
-----------------------------------------------------
\n
"
);
udbg_puts
(
"Naca Info...
\n\n
"
);
udbg_puts
(
"naca = 0x"
);
udbg_puthex
((
unsigned
long
)
naca
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->physicalMemorySize = 0x"
);
udbg_puthex
(
naca
->
physicalMemorySize
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->dCacheL1LineSize = 0x"
);
udbg_puthex
(
naca
->
dCacheL1LineSize
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->dCacheL1LogLineSize = 0x"
);
udbg_puthex
(
naca
->
dCacheL1LogLineSize
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->dCacheL1LinesPerPage = 0x"
);
udbg_puthex
(
naca
->
dCacheL1LinesPerPage
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->iCacheL1LineSize = 0x"
);
udbg_puthex
(
naca
->
iCacheL1LineSize
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->iCacheL1LogLineSize = 0x"
);
udbg_puthex
(
naca
->
iCacheL1LogLineSize
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->iCacheL1LinesPerPage = 0x"
);
udbg_puthex
(
naca
->
iCacheL1LinesPerPage
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->pftSize = 0x"
);
udbg_puthex
(
naca
->
pftSize
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->serialPortAddr = 0x"
);
udbg_puthex
(
naca
->
serialPortAddr
);
udbg_putc
(
'\n'
);
udbg_puts
(
"naca->interrupt_controller = 0x"
);
udbg_puthex
(
naca
->
interrupt_controller
);
udbg_putc
(
'\n'
);
udbg_printf
(
"
\n
HTAB Info ...
\n\n
"
);
udbg_puts
(
"htab_data.htab = 0x"
);
udbg_puthex
((
unsigned
long
)
htab_data
.
htab
);
udbg_putc
(
'\n'
);
udbg_puts
(
"htab_data.num_ptegs = 0x"
);
udbg_puthex
(
htab_data
.
htab_num_ptegs
);
udbg_putc
(
'\n'
);
if
(
naca
->
platform
&
PLATFORM_PSERIES
)
{
early_console_initialized
=
1
;
register_console
(
&
udbg_console
);
}
udbg_puts
(
"
\n
-----------------------------------------------------
\n
"
);
printk
(
"Starting Linux PPC64 %s
\n
"
,
UTS_RELEASE
);
printk
(
"-----------------------------------------------------
\n
"
);
printk
(
"naca = 0x%p
\n
"
,
naca
);
#if 0
printk("naca->processorCount = 0x%x\n", naca->processorCount);
#endif
printk
(
"naca->physicalMemorySize = 0x%lx
\n
"
,
naca
->
physicalMemorySize
);
printk
(
"naca->dCacheL1LineSize = 0x%x
\n
"
,
naca
->
dCacheL1LineSize
);
printk
(
"naca->dCacheL1LogLineSize = 0x%x
\n
"
,
naca
->
dCacheL1LogLineSize
);
printk
(
"naca->dCacheL1LinesPerPage = 0x%x
\n
"
,
naca
->
dCacheL1LinesPerPage
);
printk
(
"naca->iCacheL1LineSize = 0x%x
\n
"
,
naca
->
iCacheL1LineSize
);
printk
(
"naca->iCacheL1LogLineSize = 0x%x
\n
"
,
naca
->
iCacheL1LogLineSize
);
printk
(
"naca->iCacheL1LinesPerPage = 0x%x
\n
"
,
naca
->
iCacheL1LinesPerPage
);
printk
(
"naca->pftSize = 0x%lx
\n
"
,
naca
->
pftSize
);
printk
(
"naca->debug_switch = 0x%lx
\n
"
,
naca
->
debug_switch
);
printk
(
"naca->interrupt_controller = 0x%d
\n
"
,
naca
->
interrupt_controller
);
printk
(
"htab_data.htab = 0x%p
\n
"
,
htab_data
.
htab
);
printk
(
"htab_data.num_ptegs = 0x%lx
\n
"
,
htab_data
.
htab_num_ptegs
);
printk
(
"-----------------------------------------------------
\n
"
);
if
(
naca
->
platform
&
PLATFORM_PSERIES
)
{
finish_device_tree
();
...
...
@@ -492,7 +480,6 @@ void __init ppc64_calibrate_delay(void)
printk
(
"Calibrating delay loop... %lu.%02lu BogoMips
\n
"
,
loops_per_jiffy
/
(
500000
/
HZ
),
loops_per_jiffy
/
(
5000
/
HZ
)
%
100
);
}
extern
void
(
*
calibrate_delay
)(
void
);
...
...
arch/ppc64/kernel/udbg.c
View file @
f68f3400
...
...
@@ -52,8 +52,6 @@ struct NS16550 {
volatile
struct
NS16550
*
udbg_comport
;
spinlock_t
udbg_lock
=
SPIN_LOCK_UNLOCKED
;
void
udbg_init_uart
(
void
*
comport
)
{
...
...
@@ -160,6 +158,12 @@ udbg_read(char *buf, int buflen) {
return
i
;
}
void
udbg_console_write
(
struct
console
*
con
,
const
char
*
s
,
unsigned
int
n
)
{
udbg_write
(
s
,
n
);
}
void
udbg_puthex
(
unsigned
long
val
)
{
...
...
@@ -190,16 +194,13 @@ udbg_printSP(const char *s)
void
udbg_printf
(
const
char
*
fmt
,
...)
{
unsigned
long
flags
;
unsigned
char
buf
[
256
];
va_list
args
;
va_start
(
args
,
fmt
);
spin_lock_irqsave
(
&
udbg_lock
,
flags
);
vsprintf
(
buf
,
fmt
,
args
);
udbg_puts
(
buf
);
spin_unlock_irqrestore
(
&
udbg_lock
,
flags
);
va_end
(
args
);
}
...
...
@@ -208,7 +209,6 @@ udbg_printf(const char *fmt, ...)
void
udbg_ppcdbg
(
unsigned
long
debug_flags
,
const
char
*
fmt
,
...)
{
unsigned
long
flags
;
unsigned
long
active_debugs
=
debug_flags
&
naca
->
debug_switch
;
if
(
active_debugs
)
{
...
...
@@ -216,7 +216,6 @@ udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...)
unsigned
char
buf
[
256
];
unsigned
long
i
,
len
=
0
;
spin_lock_irqsave
(
&
udbg_lock
,
flags
);
for
(
i
=
0
;
i
<
PPCDBG_NUM_FLAGS
;
i
++
)
{
if
(((
1U
<<
i
)
&
active_debugs
)
&&
trace_names
[
i
])
{
...
...
@@ -237,7 +236,6 @@ udbg_ppcdbg(unsigned long debug_flags, const char *fmt, ...)
va_start
(
ap
,
fmt
);
vsprintf
(
buf
,
fmt
,
ap
);
udbg_puts
(
buf
);
spin_unlock_irqrestore
(
&
udbg_lock
,
flags
);
va_end
(
ap
);
}
...
...
arch/ppc64/xmon/xmon.c
View file @
f68f3400
...
...
@@ -55,7 +55,7 @@ static u_int bus_error_jmp[100];
/* Breakpoint stuff */
struct
bpt
{
unsigned
long
address
;
unsigned
long
instr
;
unsigned
instr
;
unsigned
long
count
;
unsigned
char
enabled
;
char
funcname
[
64
];
/* function name for humans */
...
...
include/asm-ppc64/udbg.h
View file @
f68f3400
...
...
@@ -17,6 +17,8 @@ int udbg_getc_poll(void);
void
udbg_puts
(
const
char
*
s
);
int
udbg_write
(
const
char
*
s
,
int
n
);
int
udbg_read
(
char
*
buf
,
int
buflen
);
struct
console
;
void
udbg_console_write
(
struct
console
*
con
,
const
char
*
s
,
unsigned
int
n
);
void
udbg_puthex
(
unsigned
long
val
);
void
udbg_printSP
(
const
char
*
s
);
void
udbg_printf
(
const
char
*
fmt
,
...);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment