Patch Name: PHKL_24729

Patch Description: s700_800 11.00 IO pdir, SBA, async IO deadlock, PA-8700

Creation Date: 01/07/23

Post Date: 01/08/01

Hardware Platforms - OS Releases:
	s700: 11.00
	s800: 11.00

Products: N/A

Filesets:
	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP
	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP

Automatic Reboot?: Yes

Status: General Release

Critical:
	Yes
	PHKL_24729: PANIC
	PHKL_24484: CORRUPTION
	PHKL_23814: PANIC
	PHKL_22903: PANIC HANG
	PHKL_22030: PANIC
	PHKL_21612: PANIC
	PHKL_21619: CORRUPTION
	PHKL_21165: OTHER
		This defect causes an HPMC
	PHKL_20974: PANIC HANG

Category Tags:
	defect_repair hardware_enablement enhancement
	general_release critical panic halts_system corruption

Path Name: /hp-ux_patches/s700_800/11.X/PHKL_24729

Symptoms:
	PHKL_24729:
	( SR: 8606188977 DTS: JAGad58193 )
	panic in ccio_alloc_shared_mem() with messages in syslog
	reporting that equivalently mapped memory has been
	exhausted.

	panic: Data page fault

	PC-Offset Stack Trace (read down, top of stack is 1st):
	   panic+0x14
	   report_trap_or_int_and_panic+0x4c
	   interrupt+0x1e8
	   $ihndlr_rtn+0x0
	   ccio_alloc_shared_mem+0x248
	   compat10_dma_alloc+0x34
	   l_create_hybrid_out_chain+0x268
	   dma_A_create_chain+0x2d4
	   s3_init_request+0x2d4
	   scsi3+0x2c4
	   io_send+0x358
	   int_direct+0x74
	   mp_ext_interrupt+0x304
	   ivti_patch_to_nop3+0x0
	   idle+0x630
	   swidle_exit+0x0
	End Of Stack

	PHKL_24484:
	( SR: 8606196499 DTS: JAGad65702 )
	Potential data integrity issue from SCSI on systems with the
	PA-8700 revision 2.2 CPU.  This includes the C3700, J6700,
	C3600 upgrade and J6000 upgrade.

	PHKL_23814:
	( SR: 8606188675 DTS: JAGad57891 )
	When booting 11.00 on a PA-8700 system, the system panics
	with the following message :

	panic: set_machine_parameters_64: Unidentified cpu type
	returned from PDC_MODEL

	Panic stack trace:
	PC-Offset Stack Trace (read down, top of stack is 1st):
	   panic+0x54
	   set_machine_parameters_64+0x1f8
	   rm_setmachineparams_64+0x40
	   DoCalllist+0x50
	   RDB_patch_int_trap+0xb0
	End Of Stack
	WARNING: Space ID hashing is disabled

	PHKL_22903:
	( SR: 8606164003 DTS: JAGad33306 )
	The system may hang or panic in a deadlock where an
	interrupt handler spins indefinitely .  Presently, we know
	of only one interrupt handler which can enter in this
	situation.  This is the async-io driver.  The usage of
	async-io could therefore cause this hang or panic.  Once a
	processor is deadlocked due to this problem, it could cause
	any one of several things including system-wide hangs or
	timeout panics.  The stack trace of the deadlocked processor
	could be useful in identifying the problem.  The stack
	should show the interrupt handler for async-io preempting a
	processor which was performing PDIR operations on a
	super-page.

	PHKL_22030:
	( SR: 8606146815 DTS: JAGad16158 )
	After upgrading a B1000, B2000, C3X00, J5X00,
	J6000, or J7000 workstation from HP-UX 10.20
	to HP-UX 11.00 using a software depot
	containing the patch PHKL_21612, a kernel is
	created without the "sba" driver resulting
	in a non-bootable system.

	PHKL_21612:
	( SR: 8606137157 DTS: JAGad06275 )
	The I/O Page directory (IOpdir) is sized too small by
	default on L-class systems.  Due to this, systems may
	exhibit: limited PCI slots being usable, sluggish
	performance or an HPMC.

	PHKL_21619:
	( SR: 8606109509 CR: JAGab82210 )
	Data corruption observed with HP RAID 4Si card.  More
	specifically, 64 bytes of data from one process doing I/O
	will appear in the place of 64 bytes of data from another
	process.

	PHKL_21428:
	( SR: 8606127072 DTS: JAGac68618 )
	While running On-Line diagnostic tools, the io queries for
	registers will report an error, when it should process them
	correctly.

	PHKL_21165:
	( SR: 8606129595 DTS: JAGac87930 )
	N-class machines with large memory (>16G) and
	gigabit ethernet card will see HPMC at boot time.

	PHKL_20974:
	( SR: 8606124547 DTS: JAGac39930 )
	On N-class, IO hangs under heavy IO load.  This can be seen
	particularly when the Hyperfabric Drivers are in use,
	because this has a separate path through the module.

	( SR: 8606112281 DTS: JAGab84597 )
	On N-class, HPMC during IO under heavy IO load.  This can be
	seen particularly when the Hyperfabric Drivers are in use,
	because this has a separate path through the module.

	PHKL_20151:
	( SR: 8606107507 DTS: JAGab77743 )
	B1000, C3000, J5000, and J7000 workstations do not run
	on HPUX 11.00.

	PHKL_20139:
	Can not get critical data from a crash dump in a human
	readable form.

Defect Description:
	PHKL_24729:
	( SR: 8606188977 DTS: JAGad58193 )
	ccio_alloc_shared_mem() assumed that equivalently mapped
	memory allocation would succeed.

	Resolution:
	Detect failure and return error to caller.

	PHKL_24484:
	( SR: 8606196499 DTS: JAGad65702 )
	An interaction between version 2.2 of the PA-8700 CPU and
	the system memory and I/O controller can generate an invalid
	Virtual Index(VI) and can cause potential data integrity
	issue.

	Resolution:
	This issue is resolved by restricting the location of the
	IOPDIR such that no part of it falls at any physical
	addresses that are associated with an unacceptable Virtual
	Index.

	PHKL_23814:
	( SR: 8606188675 DTS: JAGad57891 )
	11.00 does not recognize the PA-8700 processor.
	Additionally, the PA-8700 processor is not IO-PDIR coherent.

	Resolution:
	This patch, PHKL_23814, is one of three 11.00 PA-8700
	enablement patches.  The other 11.00 PA-8700 enablement
	patches are PHKL_23813 & PHKL_23815.  To support 11.00 on
	PA-8700, the following changes were made :

	- Added code to recognize the PA-8700 processor.
	- Added code to check if non-coherent IO-PDIR is set and
	  perform flushes and syncs whenever IO-PDIR is changed.
	- Fixed inverted space hash mask to enable the PA-8700
	  processor.

	PHKL_22903:
	( SR: 8606164003 DTS: JAGad33306 )
	This problem arises when an interrupt is served on a
	processor engaged in PDIR management for a super-page and
	the interrupt handler needs to access memory belonging to
	the same super-page. Since the PDIR operation invalidates
	the PDEs of the superpage, the interrupt handler is forced
	to spin indefinitely in the TLB miss handler. This leads the
	processor to a self deadlock.

	Resolution:
	We now hold off I/O interrupts (by calling 'spl5') while
	doing PDIR operations on super-pages.

	PHKL_22030:
	( SR: 8606146815 DTS: JAGad16158 )
	The "sba" driver was renamed in the 10.20 to 11.00
	transition (was "ccio"/"ccio2" in 10.20).  As
	part of the patch process for patches created after
	this transition the related control scripts
	related to the renaming were not included.

	Resolution:
	The patch was repackaged with customized
	versions of the postinstall and postremove
	control scripts included.

	PHKL_21612:
	( SR: 8606137157 DTS: JAGad06275 )
	L-class (L1000 and L2000) systems with configurations
	combining low memory (<= 256 MB) and multiple DMA intensive
	I/O devices (high end netowrk and USB devices) may incur
	a performance penalty.  This is due to an I/O Page
	Directory (IOpdir), an internal data structure within the
	kernel, that is undersized with respect to systems with
	such configurations.

	Symptoms under these conditions are: inability to utilize
	all PCI slots in the system, or sluggish performance,
	especially when all PCI slots are used, or, in the worst
	case, the system HPMCs.  The inability to utilize all PCI
	slots in the system and sluggish performance are seperate
	symptoms of the same cause.  With the kernel's default
	size of the IOpdir, Direct Memory Access (DMA) mapping
	requests may fail.  This is a valid behaviour for the
	kernel under such circumstances as some mappings are
	dynamic and the system may be in a state such that the
	current allocation of mappings (IOpdir entries) is
	exhausted.  A device driver that handles such occurances
	correctly will end up with a system exhibiting sluggisn
	performance.  A device driver that ignores the kernel's
	return status and uses the requested mapping anyway may
	result in the system HPMCing.

	Resolution:
	Increase the default IOpdir size for such systems.

	PHKL_21619:
	( SR: 8606109509  CR: JAGab82210 )
	A stale cacheline in an I/O adapter chip in the server
	causes the CPU to read 64 bytes of data from the wrong
	virtual memory address.  The chips in question can be found
	on the following platforms:
	A-class including the 400 and 500
	B-class including the 1000 and 2000
	C-class including the 3000 and 3600
	J-class including the 5000, 5600, 7000
	L-class including the 1000 and 2000
	N-class

	Resolution:
	We ensure the CPU believes it has touched each page, so that
	the cache line gets flushed and cannot remain around with a
	stale virtual index, which would have allowed it to be
	mapped to the wrong address.

	PHKL_21428:
	( SR: 8606127072 DTS: JAGac68618 )
	While calling the routines to do the io query for registers,
	there was an unnecessary check to see the module type. This
	was not the case before the patch PHKL_18543.

	Resolution:
	Move the checking function later in the code, where it
	belonged.

	PHKL_21165:
	( SR: 8606129595 DTS: JAGac87930 )
	The I/O virtual space was by default, 1/16 th of the
	memory. For machines with > 16G of memory, this will be
	more than 1G. The new gelan driver for the gigabit
	ehternet card is limited to 30 bits for virtual address.
	This limits the memory it could see to 1G and if
	the machine has more than 1G, it causes an HPMC.

	Resolution:
	Limit IO virtual space to 1G.

	PHKL_20974:
	( SR: 8606124547 DTS: JAGac39930 )
	The bitmap which manages IO Virtual Addresses was being
	improperly updated.  The index that remembers the location
	of the first available bit was incorrect.  Requests for
	IOVA's were being rejected when they should have been
	accepted.

	Resolution:
	Correct the index in the bitmap updating code.

	( SR: 8606112281 DTS: JAGab84597 )
	Partial mappings were being returned at the end of the IOVA
	range, but were reported as full mappings (i.e.:  Requestor
	thinks he got all 10 requested pages but only 7 were
	actually mapped).  This caused HPMCs.

	Resolution:
	Correct the bitmap updating code.  Return status "no
	mapping" if a full mapping is not obtained.

	PHKL_20151:
	( SR: 8606107507 DTS: JAGab77743 )
	System bus adapter code in HPUX 11.00 does not support
	B1000, C3000, J5000, and J7000 workstations.

	Resolution:
	Added SBA support for new workstations.

	PHKL_20139:
	Structures defined in file ike_psm.c are key
	to locating and dumping the I/O Pdirs associated with the
	hardware. Since they are not visible to the on-line
	debugger, it's not possible to write a perl script to
	dump this data in human readable form. Field support
	(WTEC) of N and L class machines running 990P HP-UX
	will require access to these data structures in human
	readable form.

SR:
	8606107073 8606107507 8606109509 8606112281 8606124547
	8606127072 8606129595 8606137157 8606146815 8606164003
	8606188675 8606188977 8606196499

Patch Files:
	
	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP:
	/usr/conf/lib/libhp-ux.a(cb_cdio.o)
	/usr/conf/lib/libhp-ux.a(io.o)
	/usr/conf/lib/libhp-ux.a(pa_ccio_psm.o)
	/usr/conf/lib/libhp-ux.a(pa_legacy_psm.o)
	/usr/conf/lib/libhp-ux.a(vm_pdir2_0.o)

	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP:
	/usr/conf/lib/libhp-ux.a(cb_cdio.o)
	/usr/conf/lib/libhp-ux.a(ike_psm.o)
	/usr/conf/lib/libhp-ux.a(io.o)
	/usr/conf/lib/libhp-ux.a(pa_ccio_psm.o)
	/usr/conf/lib/libhp-ux.a(pa_legacy_psm.o)
	/usr/conf/lib/libhp-ux.a(vm_pdir2_0.o)

what(1) Output:
	
	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP:
	/usr/conf/lib/libhp-ux.a(io.o):
		io.c $Date: 1999/10/14 13:01:37 $Revision: r11ros/2 
			PATCH_11.00 (PHKL_20139)
	/usr/conf/lib/libhp-ux.a(cb_cdio.o):
		cb_cdio.c $Date: 1999/10/27 15:28:40 $Revision: r11r
			os/2 PATCH_11.00 (PHKL_20151)
	/usr/conf/lib/libhp-ux.a(pa_ccio_psm.o):
		pa_ccio_psm.c $Date: 2001/07/23 09:21:24 $Revision: 
			r11ros/9 PATCH_11.00 (PHKL_24729)
	/usr/conf/lib/libhp-ux.a(pa_legacy_psm.o):
		pa_legacy_psm.c $Date: 2000/04/11 07:40:20 $Revision
			: r11ros/3 PATCH_11.00(PHKL_21428)
	/usr/conf/lib/libhp-ux.a(vm_pdir2_0.o):
		vm_pdir2_0.c $Date: 2000/12/06 14:49:30 $Revision: r
			11ros/9 PATCH_11.00 (PHKL_22903)

	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP:
	/usr/conf/lib/libhp-ux.a(io.o):
		io.c $Date: 1999/10/14 13:01:37 $Revision: r11ros/2 
			PATCH_11.00 (PHKL_20139)
	/usr/conf/lib/libhp-ux.a(cb_cdio.o):
		cb_cdio.c $Date: 1999/10/27 15:28:40 $Revision: r11r
			os/2 PATCH_11.00 (PHKL_20151)
	/usr/conf/lib/libhp-ux.a(pa_ccio_psm.o):
		pa_ccio_psm.c $Date: 2001/07/23 09:21:24 $Revision: 
			r11ros/9 PATCH_11.00 (PHKL_24729)
	/usr/conf/lib/libhp-ux.a(pa_legacy_psm.o):
		pa_legacy_psm.c $Date: 2000/04/11 07:40:20 $Revision
			: r11ros/3 PATCH_11.00(PHKL_21428)
	/usr/conf/lib/libhp-ux.a(vm_pdir2_0.o):
		vm_pdir2_0.c $Date: 2000/12/06 14:49:30 $Revision: r
			11ros/9 PATCH_11.00 (PHKL_22903)
	/usr/conf/lib/libhp-ux.a(ike_psm.o):
		ike_psm.c $Date: 2001/06/21 16:26:52 $Revision: r11r
			os/9 PATCH_11.00 (PHKL_24484)

cksum(1) Output:
	
	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_32,v=HP:
	2444410641 235780 /usr/conf/lib/libhp-ux.a(io.o)
	2561928561 16792 /usr/conf/lib/libhp-ux.a(cb_cdio.o)
	2624442965 28268 /usr/conf/lib/libhp-ux.a(pa_ccio_psm.o)
	3047052003 48452 /usr/conf/lib/libhp-ux.a(pa_legacy_psm.o)
	3272916766 56724 /usr/conf/lib/libhp-ux.a(vm_pdir2_0.o)

	OS-Core.CORE2-KRN,fr=B.11.00,fa=HP-UX_B.11.00_64,v=HP:
	1472346537 290376 /usr/conf/lib/libhp-ux.a(io.o)
	646226932 39864 /usr/conf/lib/libhp-ux.a(cb_cdio.o)
	1804413672 57800 /usr/conf/lib/libhp-ux.a(pa_ccio_psm.o)
	2393298486 117488 /usr/conf/lib/libhp-ux.a(pa_legacy_psm.o)
	626530735 147320 /usr/conf/lib/libhp-ux.a(vm_pdir2_0.o)
	3564243424 100560 /usr/conf/lib/libhp-ux.a(ike_psm.o)

Patch Conflicts: None

Patch Dependencies:
	s700: 11.00: PHKL_18543
	s800: 11.00: PHKL_18543

Hardware Dependencies: None

Other Dependencies:
	PHKL_23814:
	Two other patches work in conjuction with this patch
	to enable PA-8700 support. These other two patches are
	PHKL_23813 and PHKL_23815.

Supersedes:
	PHKL_24484 PHKL_23814 PHKL_22903 PHKL_22030 PHKL_21619 PHKL_21612
	PHKL_21428 PHKL_21165 PHKL_20974 PHKL_20151 PHKL_20139

Equivalent Patches: None

Patch Package Size: 1170 KBytes

Installation Instructions:
	Please review all instructions and the Hewlett-Packard
	SupportLine User Guide or your Hewlett-Packard support terms
	and conditions for precautions, scope of license,
	restrictions, and, limitation of liability and warranties,
	before installing this patch.
	------------------------------------------------------------
	1. Back up your system before installing a patch.

	2. Login as root.

	3. Copy the patch to the /tmp directory.

	4. Move to the /tmp directory and unshar the patch:

		cd /tmp
		sh PHKL_24729

	5. Run swinstall to install the patch:

		swinstall -x autoreboot=true -x patch_match_target=true \
			  -s /tmp/PHKL_24729.depot

	By default swinstall will archive the original software in 
	/var/adm/sw/save/PHKL_24729.  If you do not wish to retain a
	copy of the original software, include the patch_save_files
	option in the swinstall command above:

		-x patch_save_files=false

	WARNING: If patch_save_files is false when a patch is installed,
		 the patch cannot be deinstalled.  Please be careful
		 when using this feature.

	For future reference, the contents of the PHKL_24729.text file is 
	available in the product readme:

		swlist -l product -a readme -d @ /tmp/PHKL_24729.depot

	To put this patch on a magnetic tape and install from the
	tape drive, use the command:

		dd if=/tmp/PHKL_24729.depot of=/dev/rmt/0m bs=2k

Special Installation Instructions:
	PHKL_23814:
	This patch, PHKL_23814, is one of the three 11.00 PA-8700
	enablement patches. The other 11.00 PA-8700 enablement
	patches are PHKL_23813 & PHKL_23815. Installation of
	each patch individually will have not effect on the
	system.

	This patch depends on base patch PHKL_18543.
	For successful installation please insure that PHKL_18543
	is already installed, or that PHKL_18543 is included
	in the same depot with this patch and PHKL_18543
	is selected for installation.

