mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix some Sparc32 compile warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@189 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "a.out.h"
|
||||
#include "sys_info.h"
|
||||
#include "loadfs.h"
|
||||
#include "boot.h"
|
||||
#define printf printk
|
||||
#define debug printk
|
||||
|
||||
@@ -105,16 +106,16 @@ int aout_load(struct sys_info *info, const char *filename, const char *cmdline,
|
||||
file_seek(offset + N_TXTOFF(ehdr));
|
||||
|
||||
if (N_MAGIC(ehdr) == NMAGIC) {
|
||||
if (lfile_read(start, ehdr.a_text) != ehdr.a_text) {
|
||||
if ((unsigned long)lfile_read((void *)start, ehdr.a_text) != ehdr.a_text) {
|
||||
printf("Can't read program text segment (size 0x%lx)\n", ehdr.a_text);
|
||||
goto out;
|
||||
}
|
||||
if (lfile_read(start + N_DATADDR(ehdr), ehdr.a_data) != ehdr.a_data) {
|
||||
if ((unsigned long)lfile_read((void *)(start + N_DATADDR(ehdr)), ehdr.a_data) != ehdr.a_data) {
|
||||
printf("Can't read program data segment (size 0x%lx)\n", ehdr.a_data);
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
if (lfile_read(start, size) != size) {
|
||||
if ((unsigned long)lfile_read((void *)start, size) != size) {
|
||||
printf("Can't read program (size 0x%lx)\n", size);
|
||||
goto out;
|
||||
}
|
||||
@@ -127,7 +128,7 @@ int aout_load(struct sys_info *info, const char *filename, const char *cmdline,
|
||||
|
||||
#if 1
|
||||
{
|
||||
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
||||
int (*entry)(const void *romvec_ptr, int p2, int p3, int p4, int p5);
|
||||
|
||||
entry = (void *) addr_fixup(start);
|
||||
image_retval = entry(romvec, 0, 0, 0, 0);
|
||||
|
||||
@@ -7,30 +7,23 @@
|
||||
#include "openbios/elfload.h"
|
||||
#include "openbios/nvram.h"
|
||||
#include "libc/diskio.h"
|
||||
#include "libc/vsprintf.h"
|
||||
#include "sys_info.h"
|
||||
#include "openprom.h"
|
||||
|
||||
int elf_load(struct sys_info *, const char *filename, const char *cmdline, const void *romvec);
|
||||
int aout_load(struct sys_info *, const char *filename, const char *cmdline, const void *romvec);
|
||||
int linux_load(struct sys_info *, const char *filename, const char *cmdline, const void *romvec);
|
||||
|
||||
void boot(void);
|
||||
#include "boot.h"
|
||||
|
||||
struct sys_info sys_info;
|
||||
uint32_t kernel_image;
|
||||
uint32_t kernel_size;
|
||||
uint32_t cmdline;
|
||||
uint32_t qemu_cmdline;
|
||||
uint32_t cmdline_size;
|
||||
char boot_device;
|
||||
extern unsigned int qemu_mem_size;
|
||||
void *init_openprom(unsigned long memsize);
|
||||
extern struct linux_arguments_v0 obp_arg;
|
||||
|
||||
void boot(void)
|
||||
{
|
||||
char *path = pop_fstr_copy(), *param, *oldpath = path;
|
||||
char altpath[256];
|
||||
int unit;
|
||||
int unit = 0;
|
||||
const void *romvec;
|
||||
|
||||
if(!path) {
|
||||
@@ -41,18 +34,15 @@ void boot(void)
|
||||
fword("get-package-property");
|
||||
if (!POP()) {
|
||||
path = pop_fstr_copy();
|
||||
unit = 0;
|
||||
} else {
|
||||
switch (boot_device) {
|
||||
case 'a':
|
||||
path = strdup("/obio/SUNW,fdtwo");
|
||||
oldpath = "fd()";
|
||||
unit = 0;
|
||||
break;
|
||||
case 'c':
|
||||
path = strdup("disk");
|
||||
oldpath = "sd(0,0,0):d";
|
||||
unit = 0;
|
||||
break;
|
||||
default:
|
||||
case 'd':
|
||||
@@ -66,7 +56,6 @@ void boot(void)
|
||||
case 'n':
|
||||
path = strdup("net");
|
||||
oldpath = "le()";
|
||||
unit = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -78,14 +67,14 @@ void boot(void)
|
||||
obp_arg.boot_dev[0] = oldpath[0];
|
||||
obp_arg.boot_dev[1] = oldpath[1];
|
||||
obp_arg.argv[0] = oldpath;
|
||||
obp_arg.argv[1] = cmdline;
|
||||
obp_arg.argv[1] = (void *)(long)qemu_cmdline;
|
||||
|
||||
param = strchr(path, ' ');
|
||||
if(param) {
|
||||
*param = '\0';
|
||||
param++;
|
||||
} else if (cmdline_size) {
|
||||
param = (char *)cmdline;
|
||||
param = (char *)qemu_cmdline;
|
||||
} else {
|
||||
push_str("boot-args");
|
||||
push_str("/options");
|
||||
@@ -100,7 +89,7 @@ void boot(void)
|
||||
romvec = init_openprom(qemu_mem_size);
|
||||
|
||||
if (kernel_size) {
|
||||
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
||||
int (*entry)(const void *romvec_ptr, int p2, int p3, int p4, int p5);
|
||||
|
||||
printk("[sparc] Kernel already loaded\n");
|
||||
entry = (void *) kernel_image;
|
||||
|
||||
@@ -15,3 +15,16 @@ int linux_load(struct sys_info *, const char *filename, const char *cmdline,
|
||||
const void *romvec);
|
||||
|
||||
unsigned int start_elf(unsigned long entry_point, unsigned long param);
|
||||
|
||||
void *init_openprom(unsigned long memsize);
|
||||
void boot(void);
|
||||
|
||||
extern struct sys_info sys_info;
|
||||
extern uint32_t kernel_image;
|
||||
extern uint32_t kernel_size;
|
||||
extern uint32_t qemu_cmdline;
|
||||
extern uint32_t cmdline_size;
|
||||
extern char boot_device;
|
||||
extern unsigned int qemu_mem_size;
|
||||
extern struct linux_arguments_v0 obp_arg;
|
||||
extern int qemu_machine_type;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "openbios/config.h"
|
||||
#include "openbios/kernel.h"
|
||||
#include "openbios/drivers.h"
|
||||
#include "openbios.h"
|
||||
|
||||
#ifdef CONFIG_DEBUG_CONSOLE
|
||||
@@ -148,13 +149,13 @@ typedef struct osi_fb_info {
|
||||
int rb, w, h, depth;
|
||||
} osi_fb_info_t;
|
||||
|
||||
int TCX_GetFBInfo( osi_fb_info_t *fb )
|
||||
static int TCX_GetFBInfo( osi_fb_info_t *fb )
|
||||
{
|
||||
fb->w = 1024;
|
||||
fb->h = 768;
|
||||
fb->depth = 8;
|
||||
fb->rb = 1024;
|
||||
fb->mphys = vmem;
|
||||
fb->mphys = (unsigned long)vmem;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "openbios/config.h"
|
||||
#include "openbios/kernel.h"
|
||||
#include "context.h"
|
||||
#include "sys_info.h"
|
||||
#include "boot.h"
|
||||
|
||||
#define MAIN_STACK_SIZE 16384
|
||||
#define IMAGE_STACK_SIZE 4096
|
||||
@@ -93,7 +95,7 @@ struct context *switch_to(struct context *ctx)
|
||||
}
|
||||
|
||||
/* Start ELF Boot image */
|
||||
uint32_t start_elf(uint32_t entry_point, uint32_t param)
|
||||
unsigned int start_elf(unsigned long entry_point, unsigned long param)
|
||||
{
|
||||
struct context *ctx;
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
#include "sys_info.h"
|
||||
#include "ipchecksum.h"
|
||||
#include "loadfs.h"
|
||||
#include "boot.h"
|
||||
#define printf printk
|
||||
#define debug printk
|
||||
|
||||
extern unsigned int start_elf(unsigned long entry_point, unsigned long param);
|
||||
#define addr_fixup(addr) ((addr) & 0x00ffffff)
|
||||
|
||||
static char *image_name, *image_version;
|
||||
@@ -92,7 +92,7 @@ static unsigned long process_image_notes(Elf_phdr *phdr, int phnum,
|
||||
continue;
|
||||
buf = malloc(phdr[i].p_filesz);
|
||||
file_seek(offset + phdr[i].p_offset);
|
||||
if (lfile_read(buf, phdr[i].p_filesz) != phdr[i].p_filesz) {
|
||||
if ((uint32_t)lfile_read(buf, phdr[i].p_filesz) != phdr[i].p_filesz) {
|
||||
printf("Can't read note segment\n");
|
||||
goto out;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ static int load_segments(Elf_phdr *phdr, int phnum,
|
||||
i, addr_fixup(phdr[i].p_paddr), phdr[i].p_filesz, phdr[i].p_memsz);
|
||||
file_seek(offset + phdr[i].p_offset);
|
||||
debug("loading... ");
|
||||
if (lfile_read(phys_to_virt(addr_fixup(phdr[i].p_paddr)), phdr[i].p_filesz)
|
||||
if ((uint32_t)lfile_read(phys_to_virt(addr_fixup(phdr[i].p_paddr)), phdr[i].p_filesz)
|
||||
!= phdr[i].p_filesz) {
|
||||
printf("Can't read program segment %d\n", i);
|
||||
return 0;
|
||||
@@ -352,7 +352,7 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline,
|
||||
phdr_size = ehdr.e_phnum * sizeof *phdr;
|
||||
phdr = malloc(phdr_size);
|
||||
file_seek(offset + ehdr.e_phoff);
|
||||
if (lfile_read(phdr, phdr_size) != phdr_size) {
|
||||
if ((uint32_t)lfile_read(phdr, phdr_size) != phdr_size) {
|
||||
printf("Can't read program header\n");
|
||||
goto out;
|
||||
}
|
||||
@@ -384,7 +384,7 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline,
|
||||
|
||||
#if 1
|
||||
{
|
||||
int (*entry)(const void *romvec, int p2, int p3, int p4, int p5);
|
||||
int (*entry)(const void *romvec_ptr, int p2, int p3, int p4, int p5);
|
||||
|
||||
entry = (void *) addr_fixup(ehdr.e_entry);
|
||||
image_retval = entry(romvec, 0, 0, 0, 0);
|
||||
|
||||
@@ -92,12 +92,13 @@ void *malloc(int size)
|
||||
if (size > ALLOC_BLOCK)
|
||||
alloc_size = size;
|
||||
// Recover possible leftover
|
||||
if (ofmem.left > sizeof(alloc_desc_t) + 4) {
|
||||
alloc_desc_t *d;
|
||||
if ((size_t)ofmem.left > sizeof(alloc_desc_t) + 4) {
|
||||
alloc_desc_t *d_leftover;
|
||||
|
||||
d = (alloc_desc_t*)ofmem.next_malloc;
|
||||
d->size = ofmem.left - sizeof(alloc_desc_t);
|
||||
free((unsigned long)d + sizeof(alloc_desc_t));
|
||||
d_leftover = (alloc_desc_t*)ofmem.next_malloc;
|
||||
d_leftover->size = ofmem.left - sizeof(alloc_desc_t);
|
||||
free((void *)((unsigned long)d_leftover +
|
||||
sizeof(alloc_desc_t)));
|
||||
}
|
||||
|
||||
ofmem.next_malloc = mem_alloc(&cmem, alloc_size, 4);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "sys_info.h"
|
||||
#include "context.h"
|
||||
#include "loadfs.h"
|
||||
#include "boot.h"
|
||||
|
||||
#define printf printk
|
||||
#define debug printk
|
||||
@@ -424,7 +425,7 @@ static int load_linux_kernel(struct linux_header *hdr, uint32_t kern_addr)
|
||||
#endif
|
||||
|
||||
printf("Loading kernel... ");
|
||||
if (lfile_read(phys_to_virt(kern_addr), kern_size) != kern_size) {
|
||||
if ((uint32_t)lfile_read(phys_to_virt(kern_addr), kern_size) != kern_size) {
|
||||
printf("Can't read kernel\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -497,7 +498,7 @@ static int load_initrd(struct linux_header *hdr, struct sys_info *info,
|
||||
}
|
||||
|
||||
printf("Loading initrd... ");
|
||||
if (lfile_read(phys_to_virt(start), size) != size) {
|
||||
if ((uint32_t)lfile_read(phys_to_virt(start), size) != size) {
|
||||
printf("Can't read initrd\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,4 @@ int file_open(const char *filename);
|
||||
int lfile_read(void *buf, unsigned long len);
|
||||
int file_seek(unsigned long offset);
|
||||
unsigned long file_size(void);
|
||||
|
||||
|
||||
|
||||
void file_close(void);
|
||||
|
||||
@@ -13,13 +13,10 @@
|
||||
#include "dict.h"
|
||||
#include "openbios/kernel.h"
|
||||
#include "openbios/stack.h"
|
||||
#include "openbios/nvram.h"
|
||||
#include "sys_info.h"
|
||||
#include "openbios.h"
|
||||
|
||||
void boot(void);
|
||||
void ob_ide_init(void);
|
||||
void tcx_init(uint64_t base);
|
||||
void kbd_init(uint64_t base);
|
||||
#include "boot.h"
|
||||
|
||||
int qemu_machine_type;
|
||||
|
||||
@@ -133,8 +130,6 @@ arch_init( void )
|
||||
|
||||
int openbios(void)
|
||||
{
|
||||
extern struct sys_info sys_info;
|
||||
extern struct mem cmem;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 0; i < sizeof(hwdefs) / sizeof(struct hwdef); i++) {
|
||||
|
||||
@@ -14,8 +14,11 @@
|
||||
#include "libc/vsprintf.h"
|
||||
#include "openbios/config.h"
|
||||
#include "openbios/bindings.h"
|
||||
#include "openbios/drivers.h"
|
||||
#include "openbios/kernel.h"
|
||||
#include "openbios/sysinclude.h"
|
||||
#include "sys_info.h"
|
||||
#include "boot.h"
|
||||
|
||||
#ifdef CONFIG_DEBUG_OBP
|
||||
#define DPRINTF(fmt, args...) \
|
||||
@@ -437,7 +440,7 @@ static char * obp_dumb_memalloc(char *va, unsigned int size)
|
||||
// ROM.
|
||||
|
||||
if (va == NULL) {
|
||||
va = next_free_address - size;
|
||||
va = (char *)(next_free_address - size);
|
||||
next_free_address -= size;
|
||||
DPRINTF("obp_dumb_memalloc req null -> 0x%x\n", va);
|
||||
}
|
||||
@@ -447,9 +450,6 @@ static char * obp_dumb_memalloc(char *va, unsigned int size)
|
||||
return va;
|
||||
}
|
||||
|
||||
extern int start_cpu(unsigned int pc, unsigned int context_ptr,
|
||||
unsigned int context, int cpu);
|
||||
|
||||
static int obp_cpustart(__attribute__((unused))unsigned int whichcpu,
|
||||
__attribute__((unused))int ctxtbl_ptr,
|
||||
__attribute__((unused))int thiscontext,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "openbios/drivers.h"
|
||||
#include "openbios/nvram.h"
|
||||
#include "obio.h"
|
||||
#define cpu_to_be16(x) __cpu_to_be16(x)
|
||||
#include "openbios/firmware_abi.h"
|
||||
|
||||
#define REGISTER_NAMED_NODE( name, path ) do { \
|
||||
@@ -50,7 +51,7 @@
|
||||
* mapped memory.
|
||||
*/
|
||||
#define OBIO_CMDLINE_MAX 256
|
||||
char obio_cmdline[OBIO_CMDLINE_MAX];
|
||||
static char obio_cmdline[OBIO_CMDLINE_MAX];
|
||||
|
||||
/* DECLARE data structures for the nodes. */
|
||||
DECLARE_UNNAMED_NODE( ob_obio, INSTALL_OPEN, sizeof(int) );
|
||||
@@ -171,12 +172,9 @@ zs_read(unsigned long *address)
|
||||
}
|
||||
}
|
||||
|
||||
int keyboard_dataready(void);
|
||||
unsigned char keyboard_readdata(void);
|
||||
|
||||
/* ( addr len -- actual ) */
|
||||
static void
|
||||
zs_read_keyboard(unsigned long *address)
|
||||
zs_read_keyboard(void)
|
||||
{
|
||||
unsigned char *addr;
|
||||
int len;
|
||||
@@ -314,7 +312,7 @@ ob_eccmemctl_init(void)
|
||||
push_str("width");
|
||||
fword("property");
|
||||
|
||||
regs = map_reg(ECC_BASE, 0, ECC_SIZE, 1, ECC_BASE >> 32);
|
||||
regs = (uint32_t *)map_reg(ECC_BASE, 0, ECC_SIZE, 1, ECC_BASE >> 32);
|
||||
|
||||
version = regs[0];
|
||||
switch (version) {
|
||||
@@ -723,7 +721,7 @@ ob_nvram_init(uint64_t base, uint64_t offset)
|
||||
{
|
||||
extern uint32_t kernel_image;
|
||||
extern uint32_t kernel_size;
|
||||
extern uint32_t cmdline;
|
||||
extern uint32_t qemu_cmdline;
|
||||
extern uint32_t cmdline_size;
|
||||
extern char boot_device;
|
||||
extern char obp_stdin, obp_stdout;
|
||||
@@ -735,7 +733,7 @@ ob_nvram_init(uint64_t base, uint64_t offset)
|
||||
char nographic;
|
||||
uint32_t size;
|
||||
unsigned int machine_id;
|
||||
struct cpudef *cpu;
|
||||
const struct cpudef *cpu;
|
||||
ohwcfg_v3_t *header;
|
||||
|
||||
ob_new_obio_device("eeprom", NULL);
|
||||
@@ -763,9 +761,9 @@ ob_nvram_init(uint64_t base, uint64_t offset)
|
||||
size = nv_info.cmdline_size;
|
||||
if (size > OBIO_CMDLINE_MAX - 1)
|
||||
size = OBIO_CMDLINE_MAX - 1;
|
||||
memcpy(obio_cmdline, nv_info.cmdline, size);
|
||||
memcpy(&obio_cmdline, (void *)(long)nv_info.cmdline, size);
|
||||
obio_cmdline[size] = '\0';
|
||||
cmdline = obio_cmdline;
|
||||
qemu_cmdline = (uint32_t) &obio_cmdline;
|
||||
cmdline_size = size;
|
||||
header = (ohwcfg_v3_t *)nvram;
|
||||
header->kernel_image = 0;
|
||||
@@ -1055,7 +1053,7 @@ ob_aux2_reset_init(uint64_t base, uint64_t offset, int intr)
|
||||
{
|
||||
ob_new_obio_device("power", NULL);
|
||||
|
||||
power_reg = ob_reg(base, offset, AUXIO2_REGS, 1);
|
||||
power_reg = (void *)ob_reg(base, offset, AUXIO2_REGS, 1);
|
||||
|
||||
// Not in device tree
|
||||
reset_reg = map_io(base + (uint64_t)SLAVIO_RESET, RESET_REGS);
|
||||
@@ -1187,7 +1185,7 @@ start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context, int c
|
||||
if (!cpu)
|
||||
return -1;
|
||||
|
||||
sparc_header = &nvram[header->nvram_arch_ptr];
|
||||
sparc_header = (struct sparc_arch_cfg *)&nvram[header->nvram_arch_ptr];
|
||||
sparc_header->smp_entry = pc;
|
||||
sparc_header->smp_ctxtbl = context_ptr;
|
||||
sparc_header->smp_ctx = context;
|
||||
|
||||
@@ -57,8 +57,7 @@ ob_sbus_node_init(uint64_t base)
|
||||
}
|
||||
|
||||
static void
|
||||
ob_le_init(unsigned int slot, unsigned long base, unsigned long leoffset,
|
||||
unsigned long dmaoffset)
|
||||
ob_le_init(unsigned int slot, unsigned long leoffset, unsigned long dmaoffset)
|
||||
{
|
||||
push_str("/iommu/sbus/ledma");
|
||||
fword("find-device");
|
||||
@@ -90,7 +89,7 @@ ob_le_init(unsigned int slot, unsigned long base, unsigned long leoffset,
|
||||
uint16_t graphic_depth;
|
||||
|
||||
static void
|
||||
ob_tcx_init(unsigned int slot, unsigned long base)
|
||||
ob_tcx_init(unsigned int slot)
|
||||
{
|
||||
push_str("/iommu/sbus/SUNW,tcx");
|
||||
fword("find-device");
|
||||
@@ -305,7 +304,7 @@ ob_apc_init(unsigned int slot, unsigned long base)
|
||||
}
|
||||
|
||||
static void
|
||||
ob_cs4231_init(unsigned int slot, unsigned long base)
|
||||
ob_cs4231_init(unsigned int slot)
|
||||
{
|
||||
push_str("/iommu/sbus");
|
||||
fword("find-device");
|
||||
@@ -362,7 +361,7 @@ ob_macio_init(unsigned int slot, uint64_t base, unsigned long offset)
|
||||
#endif
|
||||
|
||||
// NCR 92C990, Am7990, Lance. See http://www.amd.com
|
||||
ob_le_init(slot, base, offset + 0x00c00000, offset + 0x00400010);
|
||||
ob_le_init(slot, offset + 0x00c00000, offset + 0x00400010);
|
||||
|
||||
// Parallel port
|
||||
//ob_bpp_init(base);
|
||||
@@ -374,11 +373,11 @@ sbus_probe_slot_ss5(unsigned int slot, uint64_t base)
|
||||
// OpenBIOS and Qemu don't know how to do Sbus probing
|
||||
switch(slot) {
|
||||
case 3: // SUNW,tcx
|
||||
ob_tcx_init(slot, base);
|
||||
ob_tcx_init(slot);
|
||||
break;
|
||||
case 4:
|
||||
// SUNW,CS4231
|
||||
ob_cs4231_init(slot, base);
|
||||
ob_cs4231_init(slot);
|
||||
// Power management (APC)
|
||||
ob_apc_init(slot, APC_OFFSET);
|
||||
break;
|
||||
@@ -396,7 +395,7 @@ sbus_probe_slot_ss10(unsigned int slot, uint64_t base)
|
||||
// OpenBIOS and Qemu don't know how to do Sbus probing
|
||||
switch(slot) {
|
||||
case 2: // SUNW,tcx
|
||||
ob_tcx_init(slot, base);
|
||||
ob_tcx_init(slot);
|
||||
break;
|
||||
case 0xf: // le, esp, bpp, power-management
|
||||
ob_macio_init(slot, base, 0);
|
||||
@@ -414,14 +413,14 @@ sbus_probe_slot_ss600mp(unsigned int slot, uint64_t base)
|
||||
// OpenBIOS and Qemu don't know how to do Sbus probing
|
||||
switch(slot) {
|
||||
case 2: // SUNW,tcx
|
||||
ob_tcx_init(slot, base);
|
||||
ob_tcx_init(slot);
|
||||
break;
|
||||
case 0xf: // le, esp, bpp, power-management
|
||||
#ifdef CONFIG_DRIVER_ESP
|
||||
ob_esp_init(slot, base, SS600MP_ESP, SS600MP_ESPDMA);
|
||||
#endif
|
||||
// NCR 92C990, Am7990, Lance. See http://www.amd.com
|
||||
ob_le_init(slot, base, 0x00060000, SS600MP_LEBUFFER);
|
||||
ob_le_init(slot, 0x00060000, SS600MP_LEBUFFER);
|
||||
// Power management (APC) XXX should not exist
|
||||
ob_apc_init(slot, APC_OFFSET);
|
||||
break;
|
||||
@@ -431,20 +430,20 @@ sbus_probe_slot_ss600mp(unsigned int slot, uint64_t base)
|
||||
}
|
||||
|
||||
static void
|
||||
ob_sbus_open(int *idx)
|
||||
ob_sbus_open(void)
|
||||
{
|
||||
int ret=1;
|
||||
RET ( -ret );
|
||||
}
|
||||
|
||||
static void
|
||||
ob_sbus_close(int *idx)
|
||||
ob_sbus_close(void)
|
||||
{
|
||||
selfword("close-deblocker");
|
||||
}
|
||||
|
||||
static void
|
||||
ob_sbus_initialize(int *idx)
|
||||
ob_sbus_initialize(void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -505,7 +504,7 @@ ob_add_sbus_range(const struct sbus_offset *range, int notfirst)
|
||||
}
|
||||
|
||||
static int
|
||||
ob_sbus_init_ss5(uint64_t base)
|
||||
ob_sbus_init_ss5(void)
|
||||
{
|
||||
unsigned int slot;
|
||||
int notfirst = 0;
|
||||
@@ -526,7 +525,7 @@ ob_sbus_init_ss5(uint64_t base)
|
||||
}
|
||||
|
||||
static int
|
||||
ob_sbus_init_ss10(uint64_t base)
|
||||
ob_sbus_init_ss10(void)
|
||||
{
|
||||
unsigned int slot;
|
||||
int notfirst = 0;
|
||||
@@ -547,7 +546,7 @@ ob_sbus_init_ss10(uint64_t base)
|
||||
}
|
||||
|
||||
static int
|
||||
ob_sbus_init_ss600mp(uint64_t base)
|
||||
ob_sbus_init_ss600mp(void)
|
||||
{
|
||||
unsigned int slot;
|
||||
int notfirst = 0;
|
||||
@@ -573,11 +572,11 @@ int ob_sbus_init(uint64_t base, int machine_id)
|
||||
|
||||
switch (machine_id) {
|
||||
case 0x71:
|
||||
return ob_sbus_init_ss600mp(base);
|
||||
return ob_sbus_init_ss600mp();
|
||||
case 0x72:
|
||||
return ob_sbus_init_ss10(base);
|
||||
return ob_sbus_init_ss10();
|
||||
case 0x80:
|
||||
return ob_sbus_init_ss5(base);
|
||||
return ob_sbus_init_ss5();
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,13 @@ int ob_pci_init(void);
|
||||
#endif
|
||||
#ifdef CONFIG_DRIVER_SBUS
|
||||
int ob_sbus_init(uint64_t base, int machine_id);
|
||||
void tcx_init(uint64_t base);
|
||||
void kbd_init(uint64_t base);
|
||||
int keyboard_dataready(void);
|
||||
unsigned char keyboard_readdata(void);
|
||||
#ifdef CONFIG_DEBUG_CONSOLE_VIDEO
|
||||
void init_video(void);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_DRIVER_IDE
|
||||
int ob_ide_init(void);
|
||||
@@ -28,5 +35,10 @@ int ob_esp_init(unsigned int slot, uint64_t base, unsigned long espoffset,
|
||||
int ob_obio_init(uint64_t slavio_base, unsigned long fd_offset,
|
||||
unsigned long counter_offset, unsigned long intr_offset,
|
||||
unsigned long aux1_offset, unsigned long aux2_offset);
|
||||
int start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context,
|
||||
int cpu);
|
||||
extern struct mem cmem;
|
||||
#endif
|
||||
#ifdef CONFIG_DRIVER_FLOPPY
|
||||
int ob_floppy_init(void);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user