mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
pseries: Consolidate hack for RTAS display-character usage
Currently the pseries machine contains not one but two somewhat ugly hacks to allow printing of early debug messages before the guest has properly read the device tree. First, we special case H_PUT_TERM_CHAR so that a vtermno of 0 (usually invalid) will look for a suitable vty and use that. This supports Linux's early debug code which will use H_PUT_TERM_CHAR with vtermno==0 before reading the device tree. Second, we support the RTAS display-character call. This takes no vtermno so we assume the address of the default first VTY. This patch makes things more consistent by folding the second hack into the first. Now, display-character uses the existing vty_lookup() function to do the same search for a suitable VTY. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
3b768df95a
commit
5f2e2ba262
3 changed files with 3 additions and 5 deletions
|
@ -70,8 +70,6 @@ static int spapr_vty_init(VIOsPAPRDevice *sdev)
|
|||
}
|
||||
|
||||
/* Forward declaration */
|
||||
static VIOsPAPRDevice *vty_lookup(sPAPREnvironment *spapr, target_ulong reg);
|
||||
|
||||
static target_ulong h_put_term_char(CPUPPCState *env, sPAPREnvironment *spapr,
|
||||
target_ulong opcode, target_ulong *args)
|
||||
{
|
||||
|
@ -195,7 +193,7 @@ VIOsPAPRDevice *spapr_vty_get_default(VIOsPAPRBus *bus)
|
|||
return selected;
|
||||
}
|
||||
|
||||
static VIOsPAPRDevice *vty_lookup(sPAPREnvironment *spapr, target_ulong reg)
|
||||
VIOsPAPRDevice *vty_lookup(sPAPREnvironment *spapr, target_ulong reg)
|
||||
{
|
||||
VIOsPAPRDevice *sdev;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue