xref: /openbsd-src/share/man/man4/man4.hppa/pdc.4 (revision 91f110e064cd7c194e59e019b83bb7496c1c84d4)
1.\" $OpenBSD: pdc.4,v 1.9 2013/01/17 21:54:18 jmc Exp $
2.\"
3.\" Copyright (c) 2004 Michael Shalayeff
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
19.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25.\" THE POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd $Mdocdate: January 17 2013 $
28.Dt PDC 4 hppa
29.Os
30.Sh NAME
31.Nm pdc
32.Nd Processor-Dependent Code firmware driver
33.Sh SYNOPSIS
34.Cd "pdc0 at mainbus?"
35.Sh DESCRIPTION
36The
37.Nm
38driver provides system console services through the PDC
39and also a means for calling PDC procedures, described later.
40The PDC console is used early in the kernel startup before enough kernel
41subsystems have been initialized to directly use the hardware
42i.e. serial ports, keyboard, and video.
43.Pp
44The PDC version displayed at system boot is relevant to the particular
45system model and is not necessarily comparable to PDC versions
46on other systems.
47.\" TODO page0 description and entry points
48.Sh PDC PROCEDURES
49PDC procedure calls are all made through a single entry point
50and assume normal C language calling conventions, with option
51number in the first argument and the return data address in the
52second, unless indicated otherwise.
53Each call requires at most 7KB of the available stack.
54Here is the list of procedures and options descriptions:
55.Bl -tag -width pdc
56.It Fn pdc "PDC_ADD_VALID" "PDC_ADD_VALID_DFLT" "paddr"
57Perform a read operation attempt at the physical address
58.Ar paddr
59without causing a HPMC, in order to verify that the address is valid
60and there is a device to respond to it.
61The implementation may choose to call the caller's HPMC handler and
62raise error conditions on the bus convertors.
63.It Fn pdc "PDC_ALLOC" "PDC_ALLOC_DFLT" "ptr" "size"
64Allocate static storage for IODC use of
65.Ar size
66bytes and return the address in a word pointed to by the
67.Ar ptr
68argument.
69There is no way of freeing the storage allocated and thus
70care shall be taken to not exhaust the total allocation limit of 32KB.
71.It Fn pdc "PDC_BLOCK_TLB" "PDC_BTLB_DEFAULT" "ptr"
72Get block TLB parameters into the data area pointed to by the
73.Ar ptr
74argument.
75This includes minimal and maximal entry size and number of fixed and
76variable sized entries in the block TLB.
77Fixed entries have size of power of two and are aligned to the size
78where variable entries can have any size and base address both
79aligned to a page.
80.It Xo
81.Fo pdc
82.Fa PDC_BLOCK_TLB
83.Fa PDC_BTLB_INSERT
84.Fa sp
85.Fa va
86.Fa pa
87.Fa len
88.Fa acc
89.Fa slot
90.Fc
91.Xc
92Insert block TLB entry specified by the space ID
93.Ar sp ,
94virtual address
95.Ar va ,
96physical address
97.Ar pa ,
98region length
99.Ar len ,
100access rights
101.Ar acc ,
102into the slot number
103.Ar slot .
104.It Fn pdc "PDC_BLOCK_TLB" "PDC_BTLB_PURGE" "sp" "va" "slot" "len"
105Purge one entry from the block TLB specified by the space ID
106.Ar sp ,
107virtual address
108.Ar va ,
109region length
110.Ar len ,
111from slot number
112.Ar slot .
113.It Fn pdc "PDC_BLOCK_TLB" "PDC_BTLB_PURGE_ALL"
114Purge all entries from the block TLB.
115.\" TODO .It Fn pdc "PDC_BUS_BAD" "PDC_BUS_BAD_DLFT"
116.It Fn pdc "PDC_CACHE" "PDC_CACHE_DFLT" "ptr"
117Retrieve cache and TLB configuration parameters into the data area
118pointed to by the
119.Ar ptr
120argument.
121The format of the data stores is as follows:
122.Bl -column "0x00" "contents" -offset indent
123.It Sy "addr" Ta Sy "contents"
124.It "0x00" Ta "I-cache size in bytes"
125.It "0x04" Ta "I-cache configuration"
126.It "0x08" Ta "I-cache base for flushing"
127.It "0x0c" Ta "I-cache stride for flushing"
128.It "0x10" Ta "I-cache count for flushing"
129.It "0x14" Ta "I-cache loop size for flushing"
130.It "0x18" Ta "D-cache size in bytes"
131.It "0x1c" Ta "D-cache configuration"
132.It "0x20" Ta "D-cache base for flushing"
133.It "0x24" Ta "D-cache stride for flushing"
134.It "0x28" Ta "D-cache count for flushing"
135.It "0x2c" Ta "D-cache loop size for flushing"
136.It "0x30" Ta "ITLB size"
137.It "0x34" Ta "ITLB configuration"
138.It "0x38" Ta "ITLB space base for flushing"
139.It "0x3c" Ta "ITLB space stride for flushing"
140.It "0x40" Ta "ITLB space count for flushing"
141.It "0x44" Ta "ITLB address base for flushing"
142.It "0x48" Ta "ITLB address stride for flushing"
143.It "0x4c" Ta "ITLB address count for flushing"
144.It "0x50" Ta "ITLB loop size for flushing"
145.It "0x54" Ta "DTLB size"
146.It "0x58" Ta "DTLB configuration"
147.It "0x5c" Ta "DTLB space base for flushing"
148.It "0x60" Ta "DTLB space stride for flushing"
149.It "0x64" Ta "DTLB space count for flushing"
150.It "0x68" Ta "DTLB address base for flushing"
151.It "0x6c" Ta "DTLB address stride for flushing"
152.It "0x70" Ta "DTLB address count for flushing"
153.It "0x74" Ta "DTLB loop size for flushing"
154.El
155.Pp
156The cache configuration word is formatted as follows:
157.Bl -column "bit" "len" "contents" -offset indent
158.It Sy "bit" Ta Sy "len" Ta Sy "contents"
159.It "0" Ta "12" Ta "reserved"
160.It "13" Ta "3" Ta "set 1 if coherent operation supported"
161.It "16" Ta "2" Ta "flush mode: 0 -- fdc & fic; 1 -- fdc; 2 -- fic; 3 -- either"
162.It "18" Ta "1" Ta "write-thru D-cache if set"
163.It "19" Ta "2" Ta "reserved"
164.It "21" Ta "3" Ta "cache line size"
165.It "24" Ta "4" Ta "associativity"
166.It "28" Ta "4" Ta "virtual address alias boundary"
167.El
168.It Fn pdc "PDC_CACHE" "PDC_CACHE_SETCS" "ptr" "i_cst" "d_cst" "it_cst" "dt_cst"
169The second word in each of the
170.Ar i_cst ,
171.Ar d_cst ,
172.Ar it_cst ,
173and
174.Ar dt_cst
175arguments specifies the desired coherency operation for the instructions cache,
176data cache, instructions TLB, and data TLB, respectively.
177The data area pointed to by the
178.Ar ptr
179argument receives the actual coherent operation state
180after an attempted change.
181The CPU does not support the requested operation change
182should the corresponding words not match the arguments upon return.
183The currently supported values are zero for incoherent operation,
184and one for coherent operation.
185.It Fn pdc "PDC_CACHE" "PDC_CACHE_GETSPIDB" "ptr"
186The word pointed to by the
187.Ar ptr
188argument receives a mask of space ID used in hashing for cache tag.
189.It Fn pdc "PDC_CHASSIS" "PDC_CHASSIS_DISP" "display"
190Update the chassis display with data given in the
191.Ar display
192argument.
193The bitfields in the word are as follows:
194.Pp
195.Bl -tag -width 0xfffff -compact
196.It 0xe0000
197Specifies the system state.
198.Bl -tag -width 0xfffff -compact
199.It 0x00000
200off
201.It 0x20000
202fault
203.It 0x40000
204test
205.It 0x60000
206initialize
207.It 0x80000
208shutdown
209.It 0xa0000
210warning
211.It 0xc0000
212run
213.It 0xe0000
214all on
215.El
216.It 0x10000
217Blank the chassis display.
218.It 0x0f000
219This and the other lower three nibbles specify the four hex digits
220to be displayed on the chassis display.
221.El
222.It Fn pdc "PDC_CHASSIS" "PDC_CHASSIS_WARN" "ptr"
223Return the warnings from the chassis fans, temperature sensors,
224batteries and power supplies.
225A word of data is returned in the area pointed by the
226.Ar ptr
227argument and is described with bitfields:
228.Pp
229.Bl -tag -width 0xff -compact
230.It 0xff000000
231Zero means none of the redundant chassis components has indicated any failures.
232A non-zero value specifies the failing component.
233.It 0x4
234Indicates the chassis battery charge is low.
235.It 0x2
236The chassis temperature has exceeded the low threshold.
237.It 0x1
238The chassis temperature has exceeded the middle threshold.
239.El
240.It Fn pdc "PDC_CHASSIS" "PDC_CHASSIS_ALL" "ptr" "display"
241Both retrieves the chassis warnings into the word pointed by the
242.Ar ptr
243argument and sets the chassis display using data in the
244.Ar display
245argument.
246.\" TODO .It Fn pdc "PDC_CONF" "PDC_CONFIG_DECONF" "ptr" "hpa"
247.\" TODO .It Fn pdc "PDC_CONF" "PDC_CONFIG_RECONF" "ptr" "hpa"
248.\" TODO .It Fn pdc "PDC_CONF" "PDC_CONFIG_INFO" "ptr" "hpa"
249.It Fn pdc "PDC_COPROC" "PDC_COPROC_DFLT" "ptr"
250Identify the coprocessors attached to the CPU.
251The
252.Ar ptr
253points to a memory location where data is to be stored.
254The first word provides a mask for functional coprocessors and
255the second word is the mask for all present coprocessors.
256.It Fn pdc "PDC_DEBUG" "PDC_DEBUG_DFLT" "ptr"
257Retrieve address of the PDC debugger placed in to the word
258pointed to by the
259.Ar ptr
260argument.
261.\" TODO .It Fn pdc "PDC_INSTR" "PDC_INSTR_DFLT"
262.It Fn pdc "PDC_IODC" "PDC_IODC_READ" "ptr" "hpa" "entry" "addr" "count"
263Given a module
264.Ar hpa ,
265retrieve the specified
266.Ar entry
267from the module's IODC into a memory area at
268.Ar adr
269of
270.Ar count
271bytes long at most.
272The
273.Ar entry
274index is a one-byte index, with a value of zero being a special case.
275For the 0th entry, an IODC header of 16 bytes is returned instead
276of an actual code.
277.It Fn pdc "PDC_IODC" "PDC_IODC_NINIT" "ptr" "hpa" "spa"
278Non-destructively initialize the memory module specified by the
279.Ar hpa
280and
281.Ar spa
282arguments and return the module status after the init in the first word
283pointed to by the
284.Ar ptr
285argument, followed by the SPA space size and an amount of
286available memory bytes in the subsequent two words.
287.It Fn pdc "PDC_IODC" "PDC_IODC_DINIT" "ptr" "hpa" "spa"
288Same as
289.Nm PDC_IODC_NINIT
290except a destructive memory test is performed.
291.It Fn pdc "PDC_IODC" "PDC_IODC_MEMERR" "ptr" "hpa" "spa"
292For the memory module that is specified by
293.Ar hpa
294and
295.Ar spa ,
296return the last most severe error information comprised of copies of
297IO_STATUS, IO_ERR_RESP, IO_ERR_INFO, and IO_ERR_REQ registers placed
298into the data area pointed to by the
299.Ar ptr
300argument, and clear the error status.
301.It Fn pdc "PDC_IODC" "PDC_IODC_IMEMMASTER" "ptr" "hpa"
302HPA for the primary memory module is returned in a word pointed to by the
303.Ar ptr
304argument for a memory module specified by
305.Ar hpa
306if it's configured as a slave module in an interleave group.
307.It Fn pdc "PDC_LAN_STATION_ID" "PDC_LAN_STATION_ID_READ" "macptr" "hpa"
308Retrieve the MAC address for the device at
309.Ar hpa
310into the data area pointed to by the
311.Ar macptr
312argument.
313.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_INFO" "ptr"
314.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_ADD" "ptr" "PDT"
315.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_CLR" "ptr"
316.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_READ" "ptr" "PDT"
317.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_RSTCLR" "ptr"
318.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_SETGOOD" "ptr" "good"
319.It Fn pdc "PDC_MEMMAP" "PDC_MEMMAP_HPA." "ptr" "path"
320Returns device HPA in the word pointed to by the
321.Ar ptr
322argument given the device
323.Ar path
324pointer.
325.It Fn pdc "PDC_MODEL" "PDC_MODEL_INFO" "ptr"
326Returns the System model numbers.
327.It Fn pdc "PDC_MODEL" "PDC_MODEL_BOOTID" "boot_id"
328Set BOOT_ID of the processor module (used during boot
329process of monarch selection) to a word given in the
330.Ar boot_id
331argument.
332.It Fn pdc "PDC_MODEL" "PDC_MODEL_COMP" "ptr" "index"
333Retrieve processor component versions by issuing this procedure with
334subsequent indexes in the
335.Ar index
336argument starting at zero.
337The component version number is stored in the word pointed to by
338the
339.Ar ptr
340argument.
341.It Fn pdc "PDC_MODEL" "PDC_MODEL_MODEL" "ptr" "os_id" "mod_addr"
342Return a string of 80 chars maximum stored at address
343.Ar mod_addr
344and conforming to the OS specified by the
345.Ar os_id
34616-bit integer (see
347.Nm PDC_STABLE
348for more information on OS ID).
349A word at the
350.Ar ptr
351address receives the result string length.
352.\" TODO .It Fn pdc "PDC_MODEL" "PDC_MODEL_ENSPEC" "ptr"
353.\" TODO .It Fn pdc "PDC_MODEL" "PDC_MODEL_DISPEC" "ptr"
354.It Fn pdc "PDC_MODEL" "PDC_MODEL_CPUID" "ptr"
355Retrieve CPU model information.
356A word stored at the address given by the
357.Ar ptr
358argument specifies the CPU revision in the lower 5 bits followed by 7 bits
359of CPU model number.
360.It Fn pdc "PDC_MODEL" "PDC_MODEL_CPBALITIES" "ptr"
361Retrieve platform capabilities into the word pointed by the
362.Ar ptr
363argument.
364Bit 0 and 1 specify that a 64- or 32-bit OS is supported, respectively.
365.It Fn pdc "PDC_MODEL" "PDC_MODEL_GETBOOTOPTS" "ptr"
366Retrieve the currently enabled, overall supported, and enabled by default
367boot test masks respectively stored at location pointed to by
368the
369.Ar ptr
370argument.
371.It Fn pdc "PDC_MODEL" "PDC_MODEL_SETBOOTOPTS" "ptr" "disable" "enable"
372Disable boot tests specified by mask in the
373.Ar disable
374argument and enable
375boot tests specified by the mask given in the
376.Ar enable
377argument.
378The memory location pointed to by
379.Ar ptr
380will contain the resulting masks as returned
381by the PDC_MODEL_GETBOOTOPTS function.
382If an attempt is made to enable and disable the same test in one
383call a PDC_ERR_INVAL will be returned.
384.It Fn pdc "PDC_NVM" "PDC_NVM_READ" "offset" "ptr" "count"
385Read contents of the NVM at
386.Ar offset
387into the memory area pointed to by the
388.Ar ptr
389argument of no more than
390.Ar count
391bytes.
392.Pp
393The format of the NVM is as follows:
394.Bl -column "0x0000" "size" "contents" -offset indent
395.It Sy "offset" Ta Sy "size" Ta Sy "contents"
396.It "0x00" Ta "0x24" Ta "HV dependent"
397.It "0x24" Ta "0x20" Ta "bootpath"
398.It "0x44" Ta "0x04" Ta "ISL revision"
399.It "0x48" Ta "0x04" Ta "timestamp"
400.It "0x4c" Ta "0x30" Ta "LIF utility entries"
401.It "0x7c" Ta "0x04" Ta "entry point"
402.It "0x80" Ta "0x80" Ta "OS panic information"
403.El
404.It Fn pdc "PDC_NVM" "PDC_NVM_WRITE" "offset" "ptr" "count"
405Write data pointed to by the
406.Ar ptr
407argument of
408.Ar count
409bytes at
410.Ar address
411in the NVM.
412.It Fn pdc "PDC_NVM" "PDC_NVM_SIZE" "ptr"
413Put the size of Non-Volatile Memory into the word pointed to by the
414.Ar ptr
415argument.
416.It Fn pdc "PDC_NVM" "PDC_NVM_VRFY"
417Verify that the contents of NVM are valid.
418.It Fn pdc "PDC_NVM" "PDC_NVM_INIT"
419Reset the contents of NVM to zeroes without any arguments.
420.It Fn pdc "PDC_HPA" "PDC_HPA_DFLT" "ptr"
421The data returned provides the monarch CPUs HPA in the word pointed to by
422.Ar ptr .
423.It Fn pdc "PDC_HPA" "PDC_HPA_MODULES" "ptr"
424Retrieve the bit mask for devices on the CPU bus into the data location
425pointed to by
426.Ar ptr .
427The first word is a bitmask for devices 0-31, and the second is
428a bitmask for devices 32-63, where bits set to one specify that
429the corresponding device number is on the same bus as the CPU.
430.\" TODO .It Fn pdc "PDC_PAT_IO" "PDC_PAT_IO_GET_PCI_RTSZ"
431.\" TODO .It Fn pdc "PDC_PAT_IO" "PDC_PAT_IO_GET_PCI_RT"
432.It Fn pdc "PDC_PIM" "PDC_PIM_HPMC" "offset" "ptr" "count"
433Get HPMC data from
434.Ar offset
435in Processor Internal Memory (PIM) into a
436.Ar ptr
437memory area of no more than
438.Ar count
439bytes in size.
440Data provided includes (in the order it is copied into the buffer):
441general registers (r0-r31), control registers (cr0-cr31), space
442registers (sr0-sr7), IIA space tail, IIA offset tail, check type,
443CPU state, cache check, TLB check, bus check, assist check, assist
444state, path info, system responder address, system requestor address,
445FPU registers (fpr0-fpr31).
446.It Fn pdc "PDC_PIM" "PDC_PIM_SIZE" "ptr"
447Return the amount of data available in bytes in the word pointed to by
448.Ar ptr .
449.It Fn pdc "PDC_PIM" "PDC_PIM_LPMC" "offset" "ptr" "count"
450Get LPMC data from
451.Ar offset
452in PIM into a
453.Ar ptr
454memory area of no more than
455.Ar count
456bytes in size.
457Data provided includes: HV dependent 0x4a words, check type, HV dependent
458word, cache check, TLB check, bus check, assist check, assist state,
459path info, system responder address, system requestor address,
460FPU registers (fpr0-fpr31).
461.It Fn pdc "PDC_PIM" "PDC_PIM_SBD" "offset" "ptr" "count"
462Get Soft Boot Data from
463.Ar offset
464in PIM into a
465.Ar ptr
466memory area of no more than
467.Ar count
468bytes in size.
469Data provided includes: general registers (r0-r31), control registers
470(cr0-cr31), space registers (sr0-sr7), IIA space tail, IIA offset tail,
471HV dependent word, CPU state.
472.It Fn pdc "PDC_PIM" "PDC_PIM_TOC" "offset" "ptr" "count"
473Get TOC (Transfer Of Control) data from
474.Ar offset
475in PIM into a
476.Ar ptr
477memory area of no more than
478.Ar count
479bytes in size.
480Data provided includes: general registers (r0-r31), control registers
481(cr0-cr31), space registers (sr0-sr7), IIA space tail, IIA offset tail,
482HV dependent word, CPU state.
483.It Fn pdc "PDC_POW_FAIL" "PDC_POW_FAIL_DFLT"
484Prepare for power fail.
485On the machines that provide power failure interrupts, this function is
486to be called after the operating system has completed
487.Xr shutdown 8
488to finish system-dependent tasks and power down.
489This function only requires 512 bytes of stack.
490.It Fn pdc "PDC_PROC" "PDC_PROC_STOP"
491Stop the currently executing processor and also disable bus requestorship,
492disable interrupts, and exclude the processor from cache coherency protocols.
493The caller must flush any necessary data from the cache before calling this
494function.
495.It Fn pdc "PDC_PROC" "PDC_PROC_RENDEZVOUS"
496Enter the reset rendezvous code on the current processor.
497This function is only implemented on category B processors and
498implementation is optional on category A processors.
499.It Fn pdc "PDC_PSW" "PDC_PSW_GETMASK" "ptr"
500Get the mask of default bits implemented into a word pointed to by the
501.Ar ptr
502argument.
503The following mask values are possible:
504.Pp
505.Bl -tag -width 100 -compact
506.It 1
507Default endianness bit is available.
508.It 2
509Default word width bit is available.
510.El
511.It Fn pdc "PDC_PSW" "PDC_PSW_DEFAULTS" "ptr"
512Retrieve the default PSW bits into the word pointed to by the
513.Ar ptr
514argument.
515.It Fn pdc "PDC_PSW" "PDC_PSW_SETDEFAULTS" "bits"
516Set the default PSW
517.Ar bits .
518.It Fn pdc "PDC_SOFT_POWER" "PDC_SOFT_POWER_INFO" "ptr"
519Retrieve
520.Dq power
521register address into the word pointed to by the
522.Ar ptr
523argument.
524Bit-0 in the
525.Dq power
526register address being set specifies the power button being depressed.
527No dampening is required, unlike with the
528.Xr lasi 4
529power circuit.
530.It Fn pdc "PDC_SOFT_POWER" "PDC_SOFT_POWER_ENABLE" "ptr" "stat"
531Enable (zero
532.Ar stat )
533or disable (non-zero
534.Ar stat )
535the soft power function,
536where disable means the machine will turn immediately off
537should the power get depressed.
538The
539.Ar ptr
540argument still points to the data provided previously
541by the PDC_SOFT_POWER_INFO call.
542.It Fn pdc "PDC_STABLE" "PDC_STABLE_READ" "offset" "ptr" "count"
543Read contents of the
544.Dq Stable Storage
545at
546.Ar offset
547into the memory area pointed to by the
548.Ar ptr
549argument of no more than
550.Ar count
551bytes.
552.Pp
553The format of the stable storage is as follows:
554.Bl -column "offset" "0x00" "contents" -offset indent
555.It Sy "offset" Ta Sy "size" Ta Sy "contents"
556.It "0x0000" Ta "0x20" Ta "primary bootpath"
557.It "0x0020" Ta "0x20" Ta "reserved"
558.It "0x0040" Ta "0x02" Ta "OS ID"
559.It "0x0042" Ta "0x16" Ta "OS dependent"
560.It "0x0058" Ta "0x02" Ta "diagnostic"
561.It "0x005a" Ta "0x03" Ta "reserved"
562.It "0x005d" Ta "0x02" Ta "OS dependent"
563.It "0x005f" Ta "0x01" Ta "fast size"
564.It "0x0060" Ta "0x20" Ta "console path"
565.It "0x0080" Ta "0x20" Ta "alternative boot path"
566.It "0x00a0" Ta "0x20" Ta "keyboard path"
567.It "0x00c0" Ta "0x20" Ta "reserved"
568.It "0x00e0" Ta "size" Ta "OS dependent"
569.El
570.Pp
571The
572.Dq OS ID
573field may have the following values:
574.Bl -column "value" "OS" -offset indent
575.It Sy "value" Ta Sy "OS"
576.It "0x000" Ta "No OS-dependent info"
577.It "0x001" Ta "HP-UX"
578.It "0x002" Ta "MPE-iX"
579.It "0x003" Ta "OSF"
580.It "0x004" Ta "HP-RT"
581.It "0x005" Ta "Novell Netware"
582.El
583.Pp
584The
585.Dq fast size
586field is the amount of memory to be tested upon system boot
587and is a power of two multiplier for 256KB.
588Values of 0xe and 0xf are reserved.
589.It Fn pdc "PDC_STABLE" "PDC_STABLE_WRITE" "address" "ptr" "count"
590Write data pointed to by the
591.Ar ptr
592argument of
593.Ar count
594bytes at
595.Ar address
596in the
597.Dq Stable Storage .
598.It Fn pdc "PDC_STABLE" "PDC_STABLE_SIZE" "ptr"
599Put the size of the
600.Dq Stable Storage
601into the word pointed to by the
602.Ar ptr
603argument.
604.It Fn pdc "PDC_STABLE" "PDC_STABLE_VRFY" "ptr"
605Verify that the contents of the
606.Dq Stable Storage
607are valid.
608.It Fn pdc "PDC_STABLE" "PDC_STABLE_INIT" "ptr"
609Reset the contents of the
610.Dq Stable Storage
611to zeroes.
612.It Fn pdc "PDC_SYSMAP" "PDC_SYSMAP_FIND" "ptr" "path" "number"
613Map module
614.Ar number
615into HPA and also provide an area size starting at HPA and a number of
616additional addresses placed into the data area pointed to by the
617.Ar ptr
618argument words one, two, and three, respectively.
619The device path is placed into the data area pointed to by the
620.Ar path
621argument.
622.It Fn pdc "PDC_SYSMAP" "PDC_SYSMAP_ADDR" "ptr" "im" "ia"
623Retrieve a list of additional addresses for the module number
624.Ar im
625for the address index
626.Ar ia .
627The result is placed into the data area pointed to by
628.Ar ptr ,
629where the first word gives the address and the second the size of the area.
630.It Fn pdc "PDC_SYSMAP" "PDC_SYSMAP_HPA" "ptr" "path_ptr"
631Map device
632.Ar path_ptr
633into device's HPA placed into a word pointed to by the
634.Ar ptr
635argument.
636.It Fn pdc "PDC_TLB" "PDC_TLB_INFO" "ptr"
637Retrieve the hardware TLB handler parameters.
638This includes a minimal and maximal size for the page table, in bytes,
639stored into words zero and one, respectively,
640in the data area pointed to by the
641.Ar ptr
642argument.
643.It Fn pdc "PDC_TLB" "PDC_TLB_CONFIG" "ptr" "base" "size" "param"
644Configure the hardware TLB miss handler given the same parameters fetched
645previously with PDC_TLB_INFO into data area pointed to by the
646.Ar ptr
647and page table
648.Ar base
649address, page table
650.Ar size ,
651and handler parameters
652.Ar param .
653The hardware TLB handler parameter bits are as follows:
654.Pp
655.Bl -tag -width 0xff -compact
656.It 1
657Enable the hardware TLB miss handler.
658The default is to load cr28 with the faulted page table entry address.
659.It 4
660Pointer to the next page table entry is put into cr28.
661.It 6
662Next pointer field of the page table entry is put into cr28.
663.El
664.Pp
665Resetting the page table address and/or size without disabling
666the hardware TLB miss handler is allowed.
667Any changes made are immediate upon Code or Data virtual
668address translation bits are set in PSW.
669.It Fn pdc "PDC_TOD" "PDC_TOD_READ" "ptr"
670Read the TOD, which is a UNIX Epoch time, into the data area
671pointed to by the
672.Ar ptr
673argument.
674That includes seconds in the first word and microseconds in
675the second.
676.It Fn pdc "PDC_TOD" "PDC_TOD_WRITE" "sec" "usec"
677Write TOD with UNIX Epoch time with
678.Ar sec
679seconds and
680.Ar usec
681microseconds.
682.It Fn pdc "PDC_TOD" "PDC_TOD_ITIMER" "ptr"
683Get TOD and CPU timer accuracy into the data location pointed to by the
684.Ar ptr
685argument.
686The first two words specify a double floating-point value giving
687CPU timer frequency.
688The next two words provide accuracy in parts per billion for the TOD and
689CPU timer, respectively.
690.El
691.Sh FILES
692.Bl -tag -width /sys/arch/hppa/dev/cpudevs -compact
693.It machine/pdc.h
694C header file with relevant definitions.
695.It /sys/arch/hppa/dev/cpudevs
696System components' version numbers.
697.It /dev/console
698System console device.
699.El
700.Sh DIAGNOSTICS
701Upon successful completion all procedures return zero.
702The following error codes are returned in case of failures:
703.Pp
704.Bl -tag -width PDC_ERR_NOPROC -compact
705.It PDC_ERR_NOPROC
706No such procedure
707.It PDC_ERR_NOPT
708No such option
709.It PDC_ERR_COMPL
710Unable to complete without error
711.It PDC_ERR_EOD
712No such device
713.It PDC_ERR_INVAL
714Invalid argument
715.It PDC_ERR_PFAIL
716Aborted by powerfail
717.El
718.Sh SEE ALSO
719.Xr intro 4 ,
720.Xr io 4 ,
721.Xr lasi 4
722.Rs
723.%T PA-RISC 1.1 Firmware Architecture Reference Specification
724.%A Hewlett-Packard
725.%D March 8, 1999
726.Re
727.Rs
728.%T PA-RISC 2.0 Firmware Architecture Reference Specification
729.%A Hewlett-Packard
730.%D March 7, 1999
731.Re
732