mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 14:46:43 +07:00
7191b61575
We have a bunch of CONFIG_PPC_EARLY_DEBUG_* options that are intended for bringup/debug only. They hard wire a machine specific udbg backend very early on (before we even probe the platform), and use whatever tricks are available on each machine/cpu to be able to get some kind of output out there early on. So far, on powermac with no serial ports, we have CONFIG_PPC_EARLY_DEBUG_BOOTX to use the low-level btext engine on the screen, but it doesn't do much, at least on 64-bit. It only really gets enabled after the platform has been probed and the MMU enabled. This adds a way to enable it much earlier. From prom_init.c (while still running with Open Firmware), we grab the screen details and set things up using the physical address of the frame buffer. Then btext itself uses the "rm_ci" feature of the 970 processor (Real Mode Cache Inhibited) to access it while in real mode. We need to do a little bit of reorg of the btext code to inline things better, in order to limit how much we touch memory while in this mode as the consequences might be ... interesting. This successfully allowed me to debug problems early on with the G5 (related to gold being broken vs. ppc64 kernels). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
30 lines
887 B
C
30 lines
887 B
C
/*
|
|
* Definitions for using the procedures in btext.c.
|
|
*
|
|
* Benjamin Herrenschmidt <benh@kernel.crashing.org>
|
|
*/
|
|
#ifndef __PPC_BTEXT_H
|
|
#define __PPC_BTEXT_H
|
|
#ifdef __KERNEL__
|
|
|
|
extern int btext_find_display(int allow_nonstdout);
|
|
extern void btext_update_display(unsigned long phys, int width, int height,
|
|
int depth, int pitch);
|
|
extern void btext_setup_display(int width, int height, int depth, int pitch,
|
|
unsigned long address);
|
|
extern void btext_prepare_BAT(void);
|
|
extern void btext_map(void);
|
|
extern void btext_unmap(void);
|
|
|
|
extern void btext_drawchar(char c);
|
|
extern void btext_drawstring(const char *str);
|
|
extern void btext_drawhex(unsigned long v);
|
|
extern void btext_drawtext(const char *c, unsigned int len);
|
|
|
|
extern void btext_clearscreen(void);
|
|
extern void btext_flushscreen(void);
|
|
extern void btext_flushline(void);
|
|
|
|
#endif /* __KERNEL__ */
|
|
#endif /* __PPC_BTEXT_H */
|