Skip to contentSkip to conversation

HP-UX for C8000

DISCUSSION Tom Bogendoerfer 4 participants 23 messages Sep 30, 2017 – Nov 2, 2017

lore
Share & tools
lore
#0 lore raw

Hi,

while makeing progress on getting better graphic support for C8000 machines, I'm at a point I need some help...

Current status:

- PCI Radeon card is passing the DMA tests (using test hack)
- fixed three bugs in parisc-agp.c (wrong byte order for iommu entries, missing coherence information in iommu entries and missing fdc for ioemmu entries)
- AGP card are still not working, looks like they don't even start a DMA transfer at all

I'm stuck at this point as there is no documentation for quicksilver agp available. The zx1-ioa document only covers mercury agp bridges (used and working in ZX2000/ZX6000), but quicksilver is different and I couldn't find the missing bit(s), yet. I now have two ideas to make progess. I'm going to measure, if a REQ signal is issued on the AGP bus and also look if the bridge responds with GNT. The second idea involves HP-UX. I want to look what HP-UX does with quicksilver.

Does anyone have a C8000 with a running HP-UX on it and can help getting a register dump of quicksilver ? Otherwise what HP-UX should I try to get for a C8000 ?

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#1 lore raw

Hi Thomas,

Quoted 2 lines · Tom Bogendoerfer

Does anyone have a C8000 with a running HP-UX on it and can help getting a register dump of quicksilver ?

I have a c8000 with hpux although I haven't booted it in some time. Let me know specifically what is needed and I'll give it a try.

Dave
--
John David Anglin [email protected]

#2 lore raw
Quoted 9 lines · John David Anglin

Hi Thomas,

Quoted 2 lines · Tom Bogendoerfer

Does anyone have a C8000 with a running HP-UX on it and can help getting a register dump of quicksilver ?

I have a c8000 with hpux although I haven't booted it in some time. Let me know specifically what is needed and I'll give it a try.

does it have a working graphics card ?

Does anybody know HP-UX ? Could I mmap the register of quicksilver and dump it from user space ?

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#3 lore raw
Quoted 5 lines · Tom Bogendoerfer
Quoted 4 lines · John David Anglin

Hi Thomas,

On 2017-09-30, at 11:25 AM, Tom Bogendoerfer wrote:

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Does anyone have a C8000 with a running HP-UX on it and can help getting a register dump of quicksilver ?

I have a c8000 with hpux although I haven't booted it in some time. Let me know specifically what is needed and I'll give it a try.

does it have a working graphics card ?

Yes (card used to work but I haven't used it in some time).

Quoted 3 lines

Does anybody know HP-UX ? Could I mmap the register of quicksilver and dump it from user space ?

Manpage for mmap says:

The mmap() function is supported for regular files. Support for any other type of file is unspecified.

If there is a device, possibly one can use dd.

Dave
--
John David Anglin [email protected]

#4 lore raw
Quoted 10 lines · John David Anglin
Quoted 3 lines

Does anybody know HP-UX ? Could I mmap the register of quicksilver and dump it from user space ?

Manpage for mmap says:

The mmap() function is supported for regular files. Support for any other type of file is unspecified.

If there is a device, possibly one can use dd.

There are also /dev/mem and /dev/kmem:

mem(7) mem(7)

NAME
mem - main memory

DESCRIPTION
mem is a special file that is an image of the main memory of the computer. It may be used, for example, to examine and patch the system.

Byte addresses in mem are interpreted as physical memory addresses. References to non-existent locations cause errors to be returned.

File kmem is the same as mem except that kernel virtual memory rather than physical memory is accessed. Please refer to kmem(7) for information about ioctl operations that are supported on /dev/kmem.
...

NAME
kmem - perform I/O on kernel memory based on symbol name.

Dave
--
John David Anglin [email protected]

#5 lore raw
In reply to Tom Bogendoerfer
Quoted 4 lines · Tom Bogendoerfer
Quoted 2 lines

I have a c8000 with hpux although I haven't booted it in some time. Let me know specifically what is needed and I'll give it a try.

does it have a working graphics card ?

We have in linux boot:

Quicksilver version TR1.0 (0x10) found at 0xfffffffffed28000
LBA: lmmio_space [0xffffffffc0000000-0xffffffffdfffffff] - new
LBA 0:4: PCI host bridge to bus 0000:80
pci_bus 0000:80: root bus resource [io 0x30000-0x3ffff] (bus address [0x0000-0) pci_bus 0000:80: root bus resource [mem 0xffffffffc0000000-0xffffffffdfffffff] ) pci_bus 0000:80: root bus resource [bus 80-87]
powersw: Soft power switch at 0xfffffff0f042e278 enabled.
pci 0000:80:00.0: vgaarb: setting as boot VGA device
pci 0000:80:00.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=noe pci 0000:80:00.0: vgaarb: bridge control possible
vgaarb: loaded

Dave
--
John David Anglin [email protected]

#7 lore raw
Quoted 6 lines · John David Anglin
Quoted 1 line · Tom Bogendoerfer

does it have a working graphics card ?

It's a FireGL T2:
80:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV350 GL [FireGL T2] (rev 80)

perfect.

Took me a little bit longer to play with a method to dump quicksilver register. Since I don't have a working HP-UX 11 box, I looked how to do it with Linux from userspace.

dd if=/dev/mem doesn't work, because it will only give access to memory.

So I recycled my small dump program, which I only used on Linux/MIPS so far. The nice thing is, it also works for Linux/PARISC:-)

Now the challenge is to see, if it compiles and works on HP-UX the same way...

A correct dump should start with

3c10b412 4601b002 10000006 20c00000 0c000040 00000000 00000000 00000000

Thomas.

#include <sys/types.h>
#define __USE_LARGEFILE64
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

#define QUICKSILVER_ADDR 0xfffffffffed28000

int main(int argc, char **argv)

{
	int fd;
	int i;
	unsigned int *agp;

	fd = open("/dev/mem", O_RDWR|O_SYNC);
	agp = mmap64(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd,
		    QUICKSILVER_ADDR);
	if (agp == (void *)-1) {
		perror ("mmap");
		exit (1);
	}

	for (i = 0; i < 0x800 / 4; i++) {
		printf ("%08x ", agp[i]);
		if ((i & 7) == 7) {
			printf ("\n");
		}
	}
	close (fd);
}
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#8 lore raw
Quoted 2 lines · Tom Bogendoerfer

Now the challenge is to see, if it compiles and works on HP-UX the same way...

So far, I'm not having much success. The system isn't setup with any additional tools and only HP's 32 and 64-bit non-ansi compilers are available. So, there are issues with 64-bit constants. Never set up networking as well.

Using 64-bit "cc +DA2.0W", I get:

mmap: Invalid argument

If I change QUICKSILVER_ADDR to 0, I get:

mmap: No such device

So, I think mmap can't map "/dev/mem".

I tried dd with skip but this gives a bad address. Maybe lseek + read would work in C code to copy page.

Dave
--
John David Anglin [email protected]

#10 lore raw
Quoted 3 lines · John David Anglin
Quoted 1 line · John David Anglin

mmap: Invalid argument

Same occurs when gcc is used to compile program.

Maybe PDC does not reset (all of?) those registers when it reboots?
If so, maybe it's possible to boot into Linux afterwards and get the registers from there?

Or, even better, add some code to palo and boot into palo to print out the wanted registers?

Helge

#11 lore raw
Quoted 2 lines · Helge Deller

Or, even better, add some code to palo and boot into palo to print out the wanted registers?

it might be easier to use adb or kernel debugger. As I don't have any HP-UX box handy right now, I'm not able to give instructions.

If HP-UX supports load able kernel modules, that would be another option.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#12 lore raw
Quoted 5 lines · Tom Bogendoerfer
Quoted 2 lines · Helge Deller

Or, even better, add some code to palo and boot into palo to print out the wanted registers?

it might be easier to use adb or kernel debugger.

I tried adb but I didn't have any luck. It's not clear how 64-bit addresses are handled and I suspect it can't access registers in /dev/mem since it wasn't possible to access them with pread.

Dave
--
John David Anglin [email protected]

#13 lore raw
In reply to Helge Deller
Quoted 2 lines · Helge Deller

Maybe PDC does not reset (all of?) those registers when it reboots?
If so, maybe it's possible to boot into Linux afterwards and get the registers from there?

Attached is dump from linux after rebooting from hpux.

Dave
--
John David Anglin [email protected]

3c10b412 4601b002 10000006 20c00000 0c000040 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 a0000000 00000000 00000000 54000000 00000000 00000000 00000000 00000000 00000000 80ff0000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 02003500 fb6f002f 00000000 00000000 00000000 000cff17 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 12000100 00000000 48000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 010000c0 00000000 000000c0 00000000 01000000 400f0000 00000000 c00f0000 01000080 00000000 00000080 00000000 01000000 000f0000 00000000 800f0000 00000000 00000000 00000000 00000000 00000080 00000000 00000080 00000000 00000000 00000000 00000000 00000000 00000000 ff0f0000 862124b8 00000000 0100e0fe 00000000 0000f0ff ff0f0000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00200000 00000000 f0e1c10b 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1c000000 00000000 00000000 00000000 50554555 40000000 00000000 00000000 00c40000 17000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 6a710000 00000080 38000000 06000000 01001d07 00000000 40080000 20040000 00000000 00000000 00000000 00000000 04000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 10000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

#14 lore raw
Quoted 6 lines · John David Anglin
Quoted 2 lines · Helge Deller

Maybe PDC does not reset (all of?) those registers when it reboots?
If so, maybe it's possible to boot into Linux afterwards and get the registers from there?

Attached is dump from linux after rebooting from hpux.

thanks, but since firmware will sets all chipset stuff from scratch, there is no new information in that dump.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#15 lore raw
Quoted 10 lines · Tom Bogendoerfer
Quoted 6 lines · John David Anglin
Quoted 2 lines · Helge Deller

Maybe PDC does not reset (all of?) those registers when it reboots?
If so, maybe it's possible to boot into Linux afterwards and get the registers from there?

Attached is dump from linux after rebooting from hpux.

thanks, but since firmware will sets all chipset stuff from scratch, there is no new information in that dump.

After searching the internet, I don't think there's a way to read these registers from userspace on hpux. It looks like writing a kernel module is the only way...

Dave
--
John David Anglin [email protected]

#17 lore raw
Quoted 7 lines · John David Anglin
Quoted 2 lines · Tom Bogendoerfer

thanks, but since firmware will sets all chipset stuff from scratch, there is no new information in that dump.

Does this help:
https://opensource.apple.com/source/X11server/X11server-85.3/Xquartz/xorg-server-1.4.2-apple56/hw/xfree86/os-support/bus/zx1PCI.c.auto.html

unfortunatly no. The part about setting up dma mappings and other init code isn't in there. Nevertheless it's an interesting file, I didn't know before.

Does anybody have HP-UX ISOs ? I have enough spare disks and C8000 to run one with HP-UX. The problem is I don't have a mediakit and can't find one on ebay...

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#18 lore raw
Quoted 3 lines · Tom Bogendoerfer

Does anybody have HP-UX ISOs ? I have enough spare disks and C8000 to run one with HP-UX. The problem is I don't have a mediakit and can't find one on ebay...

I believe I have ISOs but I'll have to dig. I'll look next weekend.

Dave
--
John David Anglin [email protected]

#19 lore raw
Quoted 2 lines · ----- On 11 Oct, 2017, at 6:06 AM, John David Anglin [email protected] wrote:

I believe I have ISOs but I'll have to dig. I'll look next weekend.

If you did not manage to find some media, I have the following I can send :
HPUX 11.23 Core FOE. Dec 2005

Let me know :)

#20 lore raw
Quoted 2 lines · Brendan Horan

If you did not manage to find some media, I have the following I can send :
HPUX 11.23 Core FOE. Dec 2005

I believe Tom has 11.11 installed and is trying to access the Quicksilver adapter setup.  Does your media have kwdb on it?

Dave

Signature · 1 line
John David Anglin  [email protected]
#21 lore raw
Quoted 6 lines · John David Anglin
Quoted 2 lines · Brendan Horan

If you did not manage to find some media, I have the following I can send :
HPUX 11.23 Core FOE. Dec 2005

I believe Tom has 11.11 installed and is trying to access the Quicksilver adapter setup.  Does your
media have kwdb on it?

in fact I've made some progress today. I now have a loadable module, which dumps whatever I want, when it's loaded. And the first thing I've detected is that I'm missing a package named Graphics Technical Computing Environment and that a radeon 7000 card will not use DMA over AGP (which means I have to install a firegl in my test machine).

I'm using 11.11 since 11.31 doesn't install and rumours are that 11.23 will also not install.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#22 lore raw
Quoted 5 lines · Tom Bogendoerfer

in fact I've made some progress today. I now have a loadable module, which dumps whatever I want, when it's loaded. And the first thing I've detected is that I'm missing a package named Graphics Technical Computing Environment and that a radeon 7000 card will not use DMA over AGP (which means I have to install a firegl in my test machine).

That's excellent news.  It looks as if one can download it if one creates an HPE account:
https://h20392.www2.hpe.com/portal/swdepot/displayProductInfo.do?productNumber=B6268AA

Dave

Signature · 1 line
John David Anglin  [email protected]