Skip to content

Commit

Permalink
even less diff, add sticore.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hdeller committed Feb 16, 2019
1 parent ab91e6b commit 070b7fe
Show file tree
Hide file tree
Showing 11 changed files with 385 additions and 24 deletions.
1 change: 0 additions & 1 deletion Makefile.parisc
@@ -1,6 +1,5 @@
# SeaBIOS build system for PA-RISC
#
# Copyright (C) 2008-2012 Kevin O'Connor <kevin@koconnor.net>
# Copyright (C) 2017-2019 Helge Deller <deller@gmx.de> for PA-RISC
#
# This file may be distributed under the terms of the GNU LGPLv3 license.
Expand Down
7 changes: 0 additions & 7 deletions src/hw/lsi-scsi.c
Expand Up @@ -110,13 +110,6 @@ lsi_scsi_process_op(struct disk_op_s *op)
/* convert to little endian for PCI */
convert_to_le32(script, sizeof(script));

#if 0
int nr;
dprintf(1, "Data from SEABIOS cdbcmd = ");
for (nr=0; nr<15; nr++) dprintf(1, "0x%x ", cdbcmd[nr]);
dprintf(1, "\n");
#endif

outb(dsp & 0xff, iobase + LSI_REG_DSP0);
outb((dsp >> 8) & 0xff, iobase + LSI_REG_DSP1);
outb((dsp >> 16) & 0xff, iobase + LSI_REG_DSP2);
Expand Down
3 changes: 2 additions & 1 deletion src/hw/pcidevice.c
Expand Up @@ -110,7 +110,8 @@ pci_find_class(u16 classid)
int pci_init_device(const struct pci_device_id *ids
, struct pci_device *pci, void *arg)
{
dprintf(1, "pci_init_device: vendor 0x%x device 0x%x\n", pci->vendor, pci->device);
dprintf(1, "pci_init_device: vendor 0x%x device 0x%x\n",
pci->vendor, pci->device);
while (ids->vendid || ids->class_mask) {
if ((ids->vendid == PCI_ANY_ID || ids->vendid == pci->vendor) &&
(ids->devid == PCI_ANY_ID || ids->devid == pci->device) &&
Expand Down
4 changes: 2 additions & 2 deletions src/hw/serialio.h
Expand Up @@ -3,14 +3,14 @@

#include "types.h" // u16

#if !CONFIG_PARISC
#if CONFIG_X86
#define PORT_LPT2 0x0278
#define PORT_SERIAL4 0x02e8
#define PORT_SERIAL2 0x02f8
#define PORT_LPT1 0x0378
#define PORT_SERIAL3 0x03e8
#define PORT_SERIAL1 0x03f8
#else
#elif CONFIG_PARISC
#include "parisc/hppa_hardware.h"
#define PORT_LPT2 0
#define PORT_SERIAL4 0
Expand Down
4 changes: 2 additions & 2 deletions src/hw/virtio-pci.c
Expand Up @@ -109,13 +109,13 @@ u64 _vp_read(struct vp_cap *cap, u32 offset, u8 size)
}
}
}
dprintf(1, "vp read %x (%d) -> 0x%llx\n", cap->ioaddr + offset, size, var);
dprintf(9, "vp read %x (%d) -> 0x%llx\n", cap->ioaddr + offset, size, var);
return var;
}

void _vp_write(struct vp_cap *cap, u32 offset, u8 size, u64 var)
{
dprintf(1, "vp write %x (%d) <- 0x%llx mode=%d\n", cap->ioaddr + offset, size, var, cap->mode);
dprintf(9, "vp write %x (%d) <- 0x%llx mode=%d\n", cap->ioaddr + offset, size, var, cap->mode);

switch (cap->mode) {
case VP_ACCESS_IO:
Expand Down
2 changes: 1 addition & 1 deletion src/parisc/head.S
@@ -1,7 +1,7 @@
/*
* Startup glue code for parisc firmware
*
* (C) 2017-2018 Helge Deller <deller@gmx.de>
* (C) 2017-2019 Helge Deller <deller@gmx.de>
*/

#include "parisc/hppa_hardware.h"
Expand Down
9 changes: 7 additions & 2 deletions src/parisc/parisc.c
Expand Up @@ -64,6 +64,9 @@ void farcall16(struct bregs *callregs) { }
void farcall16big(struct bregs *callregs) { }
void mutex_lock(struct mutex_s *mutex) { }
void mutex_unlock(struct mutex_s *mutex) { }
void start_preempt(void) { }
void finish_preempt(void) { }
int wait_preempt(void) { return 0; }

void cpuid(u32 index, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx)
{
Expand Down Expand Up @@ -1214,11 +1217,11 @@ static void parisc_vga_init(void)
//
// vga_set_mode(0x119, MF_NOCLEARMEM); // bochs: MM_DIRECT, 1280, 1024, 15, 8, 16,
// vga_set_mode(0x105, 0); // bochs: { 0x105, { MM_PACKED, 1024, 768, 8, 8, 16, SEG_GRAPH } },
// vga_set_mode(0x107, 0); // bochs: { 0x107, { MM_PACKED, 1280, 1024, 8, 8, 16, SEG_GRAPH } },
vga_set_mode(0x107, 0); // bochs: { 0x107, { MM_PACKED, 1280, 1024, 8, 8, 16, SEG_GRAPH } },
// vga_set_mode(0x11c, 0); // bochs: { 0x11C, { MM_PACKED, 1600, 1200, 8, 8, 16, SEG_GRAPH } },
// vga_set_mode(0x11f, 0); // bochs: { 0x11F, { MM_DIRECT, 1600, 1200, 24, 8, 16, SEG_GRAPH } },
// vga_set_mode(0x101, 0); // bochs: { 0x101, { MM_PACKED, 640, 480, 8, 8, 16, SEG_GRAPH } },
vga_set_mode(0x100, 0); // bochs: { 0x100, { MM_PACKED, 640, 400, 8, 8, 16, SEG_GRAPH } },
// vga_set_mode(0x100, 0); // bochs: { 0x100, { MM_PACKED, 640, 400, 8, 8, 16, SEG_GRAPH } },

u32 endian = *(u32 *)(parisc_vga_mmio + 0x0604);
dprintf(1, "parisc: VGA at %pP, mem 0x%lx mmio 0x%lx endian 0x%x found.\n",
Expand All @@ -1231,6 +1234,8 @@ static void parisc_vga_init(void)
dprintf(1, "parisc: VGA resolution: %dx%d-%d memmodel:%d bpp:%d linelength:%d\n",
vmode_g->width, vmode_g->height, vmode_g->depth,
vmode_g->memmodel, bpp, linelength);

break; // only allow one VGA for now.
}
}

Expand Down
1 change: 1 addition & 0 deletions src/parisc/sti.c
Expand Up @@ -10,6 +10,7 @@
#include "hw/pci.h" // pci_config_readl
#include "hw/pci_regs.h" // PCI_BASE_ADDRESS_0
#include "vgahw.h"
#include "parisc/sticore.h"

/****************************************************************
* PCI Data
Expand Down

0 comments on commit 070b7fe

Please sign in to comment.