Commit 99ef0c67 authored by Helge Deller's avatar Helge Deller

sticon/parisc: Fix STI console on 64-bit only machines

Fix the STI console to be able to execute either the 64-bit STI ROM code
or the 32-bit STI ROM code.

This is necessary on 64-bit only machines (e.g. C8000 workstation) which
otherwise won't show the STI text console with HP graphic cards like
Visualize-FX5/FX10/FXe.

Note that when calling 32-bit code from a 64-bit kernel one needs to
copy contents on the CPU stack from high memory down below the 4GB
limit.
Tested-by: default avatarJohn David Anglin <dave.anglin@bell.net>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent ededd9d2
......@@ -71,9 +71,9 @@
#include <video/sticore.h>
/* REGION_BASE(fb_info, index) returns the virtual address for region <index> */
/* REGION_BASE(fb_info, index) returns the physical address for region <index> */
#define REGION_BASE(fb_info, index) \
F_EXTEND(fb_info->sti->glob_cfg->region_ptrs[index])
F_EXTEND(fb_info->sti->regions_phys[index])
#define NGLEDEVDEPROM_CRT_REGION 1
......
This diff is collapsed.
......@@ -39,7 +39,6 @@ struct fb_info;
#define STI_WAIT 1
#define STI_PTR(p) ( virt_to_phys(p) )
#define PTR_STI(p) ( phys_to_virt((unsigned long)p) )
#define sti_onscreen_x(sti) (sti->glob_cfg->onscreen_x)
#define sti_onscreen_y(sti) (sti->glob_cfg->onscreen_y)
......@@ -78,8 +77,8 @@ struct sti_glob_cfg_ext {
u8 friendly_boot; /* in friendly boot mode */
s16 power; /* power calculation (in Watts) */
s32 freq_ref; /* frequency reference */
u32 sti_mem_addr; /* pointer to global sti memory (size=sti_mem_request) */
u32 future_ptr; /* pointer to future data */
u32 *sti_mem_addr; /* pointer to global sti memory (size=sti_mem_request) */
u32 *future_ptr; /* pointer to future data */
};
struct sti_glob_cfg {
......@@ -90,10 +89,10 @@ struct sti_glob_cfg {
s16 offscreen_y; /* offset height in pixels */
s16 total_x; /* frame buffer width in pixels */
s16 total_y; /* frame buffer height in pixels */
u32 region_ptrs[STI_REGION_MAX]; /* region pointers */
u32 *region_ptrs[STI_REGION_MAX]; /* region pointers */
s32 reent_lvl; /* storage for reentry level value */
u32 save_addr; /* where to save or restore reentrant state */
u32 ext_ptr; /* pointer to extended glob_cfg data structure */
u32 *save_addr; /* where to save or restore reentrant state */
u32 *ext_ptr; /* pointer to extended glob_cfg data structure */
};
......@@ -119,26 +118,26 @@ struct sti_init_flags {
u32 caller_kernel : 1; /* set only by kernel for each call */
u32 caller_other : 1; /* set only by non-[BR/K] caller */
u32 pad : 14; /* pad to word boundary */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_init_inptr_ext {
u8 config_mon_type; /* configure to monitor type */
u8 pad[1]; /* pad to word boundary */
u16 inflight_data; /* inflight data possible on PCI */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_init_inptr {
s32 text_planes; /* number of planes to use for text */
u32 ext_ptr; /* pointer to extended init_graph inptr data structure*/
u32 *ext_ptr; /* pointer to extended init_graph inptr data structure*/
};
struct sti_init_outptr {
s32 errno; /* error number on failure */
s32 text_planes; /* number of planes used for text */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
......@@ -148,17 +147,17 @@ struct sti_init_outptr {
struct sti_conf_flags {
u32 wait : 1; /* should routine idle wait or not */
u32 pad : 31; /* pad to word boundary */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_conf_inptr {
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_conf_outptr_ext {
u32 crt_config[3]; /* hardware specific X11/OGL information */
u32 crt_hdw[3];
u32 future_ptr;
u32 *future_ptr;
};
struct sti_conf_outptr {
......@@ -174,7 +173,7 @@ struct sti_conf_outptr {
s32 planes; /* number of fb planes in system */
u8 dev_name[STI_DEV_NAME_LENGTH]; /* null terminated product name */
u32 attributes; /* flags denoting attributes */
u32 ext_ptr; /* pointer to future data */
u32 *ext_ptr; /* pointer to future data */
};
struct sti_rom {
......@@ -258,25 +257,25 @@ struct sti_cooked_rom {
/* STI font printing function structs */
struct sti_font_inptr {
u32 font_start_addr; /* address of font start */
u32 *font_start_addr; /* address of font start */
s16 index; /* index into font table of character */
u8 fg_color; /* foreground color of character */
u8 bg_color; /* background color of character */
s16 dest_x; /* X location of character upper left */
s16 dest_y; /* Y location of character upper left */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_font_flags {
u32 wait : 1; /* should routine idle wait or not */
u32 non_text : 1; /* font unpack/move in non_text planes =1, text =0 */
u32 pad : 30; /* pad to word boundary */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_font_outptr {
s32 errno; /* error number on failure */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
/* STI blockmove structs */
......@@ -287,7 +286,7 @@ struct sti_blkmv_flags {
u32 clear : 1; /* clear during move? */
u32 non_text : 1; /* block move in non_text planes =1, text =0 */
u32 pad : 28; /* pad to word boundary */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_blkmv_inptr {
......@@ -299,12 +298,12 @@ struct sti_blkmv_inptr {
s16 dest_y; /* dest upper left pixel y location */
s16 width; /* block width in pixels */
s16 height; /* block height in pixels */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
struct sti_blkmv_outptr {
s32 errno; /* error number on failure */
u32 future_ptr; /* pointer to future data */
u32 *future_ptr; /* pointer to future data */
};
......@@ -351,6 +350,7 @@ struct sti_struct {
unsigned long block_move;
unsigned long init_graph;
unsigned long inq_conf;
int do_call64; /* call 64-bit code */
/* all following fields are initialized by the generic routines */
int text_planes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment