Sparc64: configure screen size from QEMU command line options

Configure the screen size from QEMU command line options using FW_CFG
interface, like r538 for PPC.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@539 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-08-08 10:52:59 +00:00
parent a3970b12b7
commit c803a121b7
5 changed files with 19 additions and 7 deletions

View File

@@ -4,6 +4,7 @@
<!-- generic -->
<option name="CONFIG_SPARC" type="boolean" value="true"/>
<option name="CONFIG_SPARC64" type="boolean" value="true"/>
<option name="CONFIG_QEMU" type="boolean" value="true"/>
<option name="CONFIG_BIG_ENDIAN" type="boolean" value="true"/>
<!-- kernel binaries (SPARC64) -->

View File

@@ -4,6 +4,7 @@
<!-- generic -->
<option name="CONFIG_SPARC" type="boolean" value="true"/>
<option name="CONFIG_SPARC64" type="boolean" value="true"/>
<option name="CONFIG_QEMU" type="boolean" value="true"/>
<option name="CONFIG_BIG_ENDIAN" type="boolean" value="true"/>
<!-- kernel binaries (SPARC64) -->

View File

@@ -131,11 +131,11 @@ void vga_vbe_init(const char *path, unsigned long fb, uint32_t fb_size,
int depth = VGA_DEFAULT_DEPTH;
int linebytes = VGA_DEFAULT_LINEBYTES;
#if defined(CONFIG_QEMU) && defined(CONFIG_PPC)
#if defined(CONFIG_QEMU) && (defined(CONFIG_PPC) || defined(CONFIG_SPARC64))
int w, h, d;
w = fw_cfg_read_i16(FW_CFG_PPC_WIDTH);
h = fw_cfg_read_i16(FW_CFG_PPC_HEIGHT);
d = fw_cfg_read_i16(FW_CFG_PPC_DEPTH);
w = fw_cfg_read_i16(FW_CFG_ARCH_WIDTH);
h = fw_cfg_read_i16(FW_CFG_ARCH_HEIGHT);
d = fw_cfg_read_i16(FW_CFG_ARCH_DEPTH);
if (w && h && d) {
width = w;
height = h;

View File

@@ -165,9 +165,9 @@ extern void outsw(u32 reg, const void *addr, unsigned long count);
#endif
#if defined(CONFIG_QEMU)
#define FW_CFG_PPC_WIDTH (FW_CFG_ARCH_LOCAL + 0x00)
#define FW_CFG_PPC_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01)
#define FW_CFG_PPC_DEPTH (FW_CFG_ARCH_LOCAL + 0x02)
#define FW_CFG_ARCH_WIDTH (FW_CFG_ARCH_LOCAL + 0x00)
#define FW_CFG_ARCH_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01)
#define FW_CFG_ARCH_DEPTH (FW_CFG_ARCH_LOCAL + 0x02)
#endif
#endif /* _ASM_IO_H */

View File

@@ -3,6 +3,9 @@
#include "asm/types.h"
#define NO_QEMU_PROTOS
#include "openbios/fw_cfg.h"
extern unsigned long va_shift; // Set in entry.S
// Defined in ldscript
extern char _start, _data, _stack, _estack, _end, _vmem, _evmem, _iomem;
@@ -213,4 +216,11 @@ extern void outl(u32 reg, u32 val);
extern void outsw(u32 reg, const void *addr, unsigned long count);
#endif
#endif
#if defined(CONFIG_QEMU)
#define FW_CFG_ARCH_WIDTH (FW_CFG_ARCH_LOCAL + 0x00)
#define FW_CFG_ARCH_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01)
#define FW_CFG_ARCH_DEPTH (FW_CFG_ARCH_LOCAL + 0x02)
#endif
#endif /* _ASM_IO_H */