xref: /openbsd-src/share/man/man4/man4.hppa/pdc.4 (revision 41ce3b17e73f6b7d2d9e1a3d961e4bab2d895cb5)
1.\" $OpenBSD: pdc.4,v 1.12 2022/03/31 17:27:21 naddy 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: March 31 2022 $
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 converters.
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 \(em fdc & fic; 1 \(em fdc;\
162 2 \(em fic; 3 \(em either"
163.It "18" Ta "1" Ta "write-thru D-cache if set"
164.It "19" Ta "2" Ta "reserved"
165.It "21" Ta "3" Ta "cache line size"
166.It "24" Ta "4" Ta "associativity"
167.It "28" Ta "4" Ta "virtual address alias boundary"
168.El
169.It Fn pdc "PDC_CACHE" "PDC_CACHE_SETCS" "ptr" "i_cst" "d_cst" "it_cst" "dt_cst"
170The second word in each of the
171.Ar i_cst ,
172.Ar d_cst ,
173.Ar it_cst ,
174and
175.Ar dt_cst
176arguments specifies the desired coherency operation for the instructions cache,
177data cache, instructions TLB, and data TLB, respectively.
178The data area pointed to by the
179.Ar ptr
180argument receives the actual coherent operation state
181after an attempted change.
182The CPU does not support the requested operation change
183should the corresponding words not match the arguments upon return.
184The currently supported values are zero for incoherent operation,
185and one for coherent operation.
186.It Fn pdc "PDC_CACHE" "PDC_CACHE_GETSPIDB" "ptr"
187The word pointed to by the
188.Ar ptr
189argument receives a mask of space ID used in hashing for cache tag.
190.It Fn pdc "PDC_CHASSIS" "PDC_CHASSIS_DISP" "display"
191Update the chassis display with data given in the
192.Ar display
193argument.
194The bitfields in the word are as follows:
195.Pp
196.Bl -tag -width 0xfffff -compact
197.It 0xe0000
198Specifies the system state.
199.Bl -tag -width 0xfffff -compact
200.It 0x00000
201off
202.It 0x20000
203fault
204.It 0x40000
205test
206.It 0x60000
207initialize
208.It 0x80000
209shutdown
210.It 0xa0000
211warning
212.It 0xc0000
213run
214.It 0xe0000
215all on
216.El
217.It 0x10000
218Blank the chassis display.
219.It 0x0f000
220This and the other lower three nibbles specify the four hex digits
221to be displayed on the chassis display.
222.El
223.It Fn pdc "PDC_CHASSIS" "PDC_CHASSIS_WARN" "ptr"
224Return the warnings from the chassis fans, temperature sensors,
225batteries and power supplies.
226A word of data is returned in the area pointed by the
227.Ar ptr
228argument and is described with bitfields:
229.Pp
230.Bl -tag -width 0xff -compact
231.It 0xff000000
232Zero means none of the redundant chassis components has indicated any failures.
233A non-zero value specifies the failing component.
234.It 0x4
235Indicates the chassis battery charge is low.
236.It 0x2
237The chassis temperature has exceeded the low threshold.
238.It 0x1
239The chassis temperature has exceeded the middle threshold.
240.El
241.It Fn pdc "PDC_CHASSIS" "PDC_CHASSIS_ALL" "ptr" "display"
242Both retrieves the chassis warnings into the word pointed by the
243.Ar ptr
244argument and sets the chassis display using data in the
245.Ar display
246argument.
247.\" TODO .It Fn pdc "PDC_CONF" "PDC_CONFIG_DECONF" "ptr" "hpa"
248.\" TODO .It Fn pdc "PDC_CONF" "PDC_CONFIG_RECONF" "ptr" "hpa"
249.\" TODO .It Fn pdc "PDC_CONF" "PDC_CONFIG_INFO" "ptr" "hpa"
250.It Fn pdc "PDC_COPROC" "PDC_COPROC_DFLT" "ptr"
251Identify the coprocessors attached to the CPU.
252The
253.Ar ptr
254points to a memory location where data is to be stored.
255The first word provides a mask for functional coprocessors and
256the second word is the mask for all present coprocessors.
257.It Fn pdc "PDC_DEBUG" "PDC_DEBUG_DFLT" "ptr"
258Retrieve address of the PDC debugger placed in to the word
259pointed to by the
260.Ar ptr
261argument.
262.\" TODO .It Fn pdc "PDC_INSTR" "PDC_INSTR_DFLT"
263.It Fn pdc "PDC_IODC" "PDC_IODC_READ" "ptr" "hpa" "entry" "addr" "count"
264Given a module
265.Ar hpa ,
266retrieve the specified
267.Ar entry
268from the module's IODC into a memory area at
269.Ar adr
270of
271.Ar count
272bytes long at most.
273The
274.Ar entry
275index is a one-byte index, with a value of zero being a special case.
276For the 0th entry, an IODC header of 16 bytes is returned instead
277of an actual code.
278.It Fn pdc "PDC_IODC" "PDC_IODC_NINIT" "ptr" "hpa" "spa"
279Non-destructively initialize the memory module specified by the
280.Ar hpa
281and
282.Ar spa
283arguments and return the module status after the init in the first word
284pointed to by the
285.Ar ptr
286argument, followed by the SPA space size and an amount of
287available memory bytes in the subsequent two words.
288.It Fn pdc "PDC_IODC" "PDC_IODC_DINIT" "ptr" "hpa" "spa"
289Same as
290.Nm PDC_IODC_NINIT
291except a destructive memory test is performed.
292.It Fn pdc "PDC_IODC" "PDC_IODC_MEMERR" "ptr" "hpa" "spa"
293For the memory module that is specified by
294.Ar hpa
295and
296.Ar spa ,
297return the last most severe error information comprised of copies of
298IO_STATUS, IO_ERR_RESP, IO_ERR_INFO, and IO_ERR_REQ registers placed
299into the data area pointed to by the
300.Ar ptr
301argument, and clear the error status.
302.It Fn pdc "PDC_IODC" "PDC_IODC_IMEMMASTER" "ptr" "hpa"
303HPA for the primary memory module is returned in a word pointed to by the
304.Ar ptr
305argument for a memory module specified by
306.Ar hpa
307if it's configured as a slave module in an interleave group.
308.It Fn pdc "PDC_LAN_STATION_ID" "PDC_LAN_STATION_ID_READ" "macptr" "hpa"
309Retrieve the MAC address for the device at
310.Ar hpa
311into the data area pointed to by the
312.Ar macptr
313argument.
314.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_INFO" "ptr"
315.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_ADD" "ptr" "PDT"
316.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_CLR" "ptr"
317.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_READ" "ptr" "PDT"
318.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_RSTCLR" "ptr"
319.\" TODO .It Fn pdc "PDC_MEM" "PDC_MEM_SETGOOD" "ptr" "good"
320.It Fn pdc "PDC_MEMMAP" "PDC_MEMMAP_HPA." "ptr" "path"
321Returns device HPA in the word pointed to by the
322.Ar ptr
323argument given the device
324.Ar path
325pointer.
326.It Fn pdc "PDC_MODEL" "PDC_MODEL_INFO" "ptr"
327Returns the System model numbers.
328.It Fn pdc "PDC_MODEL" "PDC_MODEL_BOOTID" "boot_id"
329Set BOOT_ID of the processor module (used during boot
330process of monarch selection) to a word given in the
331.Ar boot_id
332argument.
333.It Fn pdc "PDC_MODEL" "PDC_MODEL_COMP" "ptr" "index"
334Retrieve processor component versions by issuing this procedure with
335subsequent indexes in the
336.Ar index
337argument starting at zero.
338The component version number is stored in the word pointed to by
339the
340.Ar ptr
341argument.
342.It Fn pdc "PDC_MODEL" "PDC_MODEL_MODEL" "ptr" "os_id" "mod_addr"
343Return a string of 80 chars maximum stored at address
344.Ar mod_addr
345and conforming to the OS specified by the
346.Ar os_id
34716-bit integer (see
348.Nm PDC_STABLE
349for more information on OS ID).
350A word at the
351.Ar ptr
352address receives the result string length.
353.\" TODO .It Fn pdc "PDC_MODEL" "PDC_MODEL_ENSPEC" "ptr"
354.\" TODO .It Fn pdc "PDC_MODEL" "PDC_MODEL_DISPEC" "ptr"
355.It Fn pdc "PDC_MODEL" "PDC_MODEL_CPUID" "ptr"
356Retrieve CPU model information.
357A word stored at the address given by the
358.Ar ptr
359argument specifies the CPU revision in the lower 5 bits followed by 7 bits
360of CPU model number.
361.It Fn pdc "PDC_MODEL" "PDC_MODEL_CPBALITIES" "ptr"
362Retrieve platform capabilities into the word pointed by the
363.Ar ptr
364argument.
365Bit 0 and 1 specify that a 64- or 32-bit OS is supported, respectively.
366.It Fn pdc "PDC_MODEL" "PDC_MODEL_GETBOOTOPTS" "ptr"
367Retrieve the currently enabled, overall supported, and enabled by default
368boot test masks respectively stored at location pointed to by
369the
370.Ar ptr
371argument.
372.It Fn pdc "PDC_MODEL" "PDC_MODEL_SETBOOTOPTS" "ptr" "disable" "enable"
373Disable boot tests specified by mask in the
374.Ar disable
375argument and enable
376boot tests specified by the mask given in the
377.Ar enable
378argument.
379The memory location pointed to by
380.Ar ptr
381will contain the resulting masks as returned
382by the PDC_MODEL_GETBOOTOPTS function.
383If an attempt is made to enable and disable the same test in one
384call, a PDC_ERR_INVAL will be returned.
385.It Fn pdc "PDC_NVM" "PDC_NVM_READ" "offset" "ptr" "count"
386Read contents of the NVM at
387.Ar offset
388into the memory area pointed to by the
389.Ar ptr
390argument of no more than
391.Ar count
392bytes.
393.Pp
394The format of the NVM is as follows:
395.Bl -column "0x0000" "size" "contents" -offset indent
396.It Sy "offset" Ta Sy "size" Ta Sy "contents"
397.It "0x00" Ta "0x24" Ta "HV dependent"
398.It "0x24" Ta "0x20" Ta "bootpath"
399.It "0x44" Ta "0x04" Ta "ISL revision"
400.It "0x48" Ta "0x04" Ta "timestamp"
401.It "0x4c" Ta "0x30" Ta "LIF utility entries"
402.It "0x7c" Ta "0x04" Ta "entry point"
403.It "0x80" Ta "0x80" Ta "OS panic information"
404.El
405.It Fn pdc "PDC_NVM" "PDC_NVM_WRITE" "offset" "ptr" "count"
406Write data pointed to by the
407.Ar ptr
408argument of
409.Ar count
410bytes at
411.Ar address
412in the NVM.
413.It Fn pdc "PDC_NVM" "PDC_NVM_SIZE" "ptr"
414Put the size of Non-Volatile Memory into the word pointed to by the
415.Ar ptr
416argument.
417.It Fn pdc "PDC_NVM" "PDC_NVM_VRFY"
418Verify that the contents of NVM are valid.
419.It Fn pdc "PDC_NVM" "PDC_NVM_INIT"
420Reset the contents of NVM to zeroes without any arguments.
421.It Fn pdc "PDC_HPA" "PDC_HPA_DFLT" "ptr"
422The data returned provides the monarch CPUs HPA in the word pointed to by
423.Ar ptr .
424.It Fn pdc "PDC_HPA" "PDC_HPA_MODULES" "ptr"
425Retrieve the bit mask for devices on the CPU bus into the data location
426pointed to by
427.Ar ptr .
428The first word is a bitmask for devices 0-31, and the second is
429a bitmask for devices 32-63, where bits set to one specify that
430the corresponding device number is on the same bus as the CPU.
431.\" TODO .It Fn pdc "PDC_PAT_IO" "PDC_PAT_IO_GET_PCI_RTSZ"
432.\" TODO .It Fn pdc "PDC_PAT_IO" "PDC_PAT_IO_GET_PCI_RT"
433.It Fn pdc "PDC_PIM" "PDC_PIM_HPMC" "offset" "ptr" "count"
434Get HPMC data from
435.Ar offset
436in Processor Internal Memory (PIM) into a
437.Ar ptr
438memory area of no more than
439.Ar count
440bytes in size.
441Data provided includes (in the order it is copied into the buffer):
442general registers (r0-r31), control registers (cr0-cr31), space
443registers (sr0-sr7), IIA space tail, IIA offset tail, check type,
444CPU state, cache check, TLB check, bus check, assist check, assist
445state, path info, system responder address, system requestor address,
446FPU registers (fpr0-fpr31).
447.It Fn pdc "PDC_PIM" "PDC_PIM_SIZE" "ptr"
448Return the amount of data available in bytes in the word pointed to by
449.Ar ptr .
450.It Fn pdc "PDC_PIM" "PDC_PIM_LPMC" "offset" "ptr" "count"
451Get LPMC data from
452.Ar offset
453in PIM into a
454.Ar ptr
455memory area of no more than
456.Ar count
457bytes in size.
458Data provided includes: HV dependent 0x4a words, check type, HV dependent
459word, cache check, TLB check, bus check, assist check, assist state,
460path info, system responder address, system requestor address,
461FPU registers (fpr0-fpr31).
462.It Fn pdc "PDC_PIM" "PDC_PIM_SBD" "offset" "ptr" "count"
463Get Soft Boot Data from
464.Ar offset
465in PIM into a
466.Ar ptr
467memory area of no more than
468.Ar count
469bytes in size.
470Data provided includes: general registers (r0-r31), control registers
471(cr0-cr31), space registers (sr0-sr7), IIA space tail, IIA offset tail,
472HV dependent word, CPU state.
473.It Fn pdc "PDC_PIM" "PDC_PIM_TOC" "offset" "ptr" "count"
474Get TOC (Transfer Of Control) data from
475.Ar offset
476in PIM into a
477.Ar ptr
478memory area of no more than
479.Ar count
480bytes in size.
481Data provided includes: general registers (r0-r31), control registers
482(cr0-cr31), space registers (sr0-sr7), IIA space tail, IIA offset tail,
483HV dependent word, CPU state.
484.It Fn pdc "PDC_POW_FAIL" "PDC_POW_FAIL_DFLT"
485Prepare for power fail.
486On the machines that provide power failure interrupts, this function is
487to be called after the operating system has completed
488.Xr shutdown 8
489to finish system-dependent tasks and power down.
490This function only requires 512 bytes of stack.
491.It Fn pdc "PDC_PROC" "PDC_PROC_STOP"
492Stop the currently executing processor and also disable bus requestorship,
493disable interrupts, and exclude the processor from cache coherency protocols.
494The caller must flush any necessary data from the cache before calling this
495function.
496.It Fn pdc "PDC_PROC" "PDC_PROC_RENDEZVOUS"
497Enter the reset rendezvous code on the current processor.
498This function is only implemented on category B processors and
499implementation is optional on category A processors.
500.It Fn pdc "PDC_PSW" "PDC_PSW_GETMASK" "ptr"
501Get the mask of default bits implemented into a word pointed to by the
502.Ar ptr
503argument.
504The following mask values are possible:
505.Pp
506.Bl -tag -width 100 -compact
507.It 1
508Default endianness bit is available.
509.It 2
510Default word width bit is available.
511.El
512.It Fn pdc "PDC_PSW" "PDC_PSW_DEFAULTS" "ptr"
513Retrieve the default PSW bits into the word pointed to by the
514.Ar ptr
515argument.
516.It Fn pdc "PDC_PSW" "PDC_PSW_SETDEFAULTS" "bits"
517Set the default PSW
518.Ar bits .
519.It Fn pdc "PDC_SOFT_POWER" "PDC_SOFT_POWER_INFO" "ptr"
520Retrieve
521.Dq power
522register address into the word pointed to by the
523.Ar ptr
524argument.
525Bit-0 in the
526.Dq power
527register address being set specifies the power button being depressed.
528No dampening is required, unlike with the
529.Xr lasi 4
530power circuit.
531.It Fn pdc "PDC_SOFT_POWER" "PDC_SOFT_POWER_ENABLE" "ptr" "stat"
532Enable (zero
533.Ar stat )
534or disable (non-zero
535.Ar stat )
536the soft power function,
537where disable means the machine will turn immediately off
538should the power get depressed.
539The
540.Ar ptr
541argument still points to the data provided previously
542by the PDC_SOFT_POWER_INFO call.
543.It Fn pdc "PDC_STABLE" "PDC_STABLE_READ" "offset" "ptr" "count"
544Read contents of the
545.Dq Stable Storage
546at
547.Ar offset
548into the memory area pointed to by the
549.Ar ptr
550argument of no more than
551.Ar count
552bytes.
553.Pp
554The format of the stable storage is as follows:
555.Bl -column "offset" "0x00" "contents" -offset indent
556.It Sy "offset" Ta Sy "size" Ta Sy "contents"
557.It "0x0000" Ta "0x20" Ta "primary bootpath"
558.It "0x0020" Ta "0x20" Ta "reserved"
559.It "0x0040" Ta "0x02" Ta "OS ID"
560.It "0x0042" Ta "0x16" Ta "OS dependent"
561.It "0x0058" Ta "0x02" Ta "diagnostic"
562.It "0x005a" Ta "0x03" Ta "reserved"
563.It "0x005d" Ta "0x02" Ta "OS dependent"
564.It "0x005f" Ta "0x01" Ta "fast size"
565.It "0x0060" Ta "0x20" Ta "console path"
566.It "0x0080" Ta "0x20" Ta "alternative boot path"
567.It "0x00a0" Ta "0x20" Ta "keyboard path"
568.It "0x00c0" Ta "0x20" Ta "reserved"
569.It "0x00e0" Ta "size" Ta "OS dependent"
570.El
571.Pp
572The
573.Dq OS ID
574field may have the following values:
575.Bl -column "value" "OS" -offset indent
576.It Sy "value" Ta Sy "OS"
577.It "0x000" Ta "No OS-dependent info"
578.It "0x001" Ta "HP-UX"
579.It "0x002" Ta "MPE-iX"
580.It "0x003" Ta "OSF"
581.It "0x004" Ta "HP-RT"
582.It "0x005" Ta "Novell Netware"
583.El
584.Pp
585The
586.Dq fast size
587field is the amount of memory to be tested upon system boot
588and is a power of two multiplier for 256KB.
589Values of 0xe and 0xf are reserved.
590.It Fn pdc "PDC_STABLE" "PDC_STABLE_WRITE" "address" "ptr" "count"
591Write data pointed to by the
592.Ar ptr
593argument of
594.Ar count
595bytes at
596.Ar address
597in the
598.Dq Stable Storage .
599.It Fn pdc "PDC_STABLE" "PDC_STABLE_SIZE" "ptr"
600Put the size of the
601.Dq Stable Storage
602into the word pointed to by the
603.Ar ptr
604argument.
605.It Fn pdc "PDC_STABLE" "PDC_STABLE_VRFY" "ptr"
606Verify that the contents of the
607.Dq Stable Storage
608are valid.
609.It Fn pdc "PDC_STABLE" "PDC_STABLE_INIT" "ptr"
610Reset the contents of the
611.Dq Stable Storage
612to zeroes.
613.It Fn pdc "PDC_SYSMAP" "PDC_SYSMAP_FIND" "ptr" "path" "number"
614Map module
615.Ar number
616into HPA and also provide an area size starting at HPA and a number of
617additional addresses placed into the data area pointed to by the
618.Ar ptr
619argument words one, two, and three, respectively.
620The device path is placed into the data area pointed to by the
621.Ar path
622argument.
623.It Fn pdc "PDC_SYSMAP" "PDC_SYSMAP_ADDR" "ptr" "im" "ia"
624Retrieve a list of additional addresses for the module number
625.Ar im
626for the address index
627.Ar ia .
628The result is placed into the data area pointed to by
629.Ar ptr ,
630where the first word gives the address and the second the size of the area.
631.It Fn pdc "PDC_SYSMAP" "PDC_SYSMAP_HPA" "ptr" "path_ptr"
632Map device
633.Ar path_ptr
634into device's HPA placed into a word pointed to by the
635.Ar ptr
636argument.
637.It Fn pdc "PDC_TLB" "PDC_TLB_INFO" "ptr"
638Retrieve the hardware TLB handler parameters.
639This includes a minimal and maximal size for the page table, in bytes,
640stored into words zero and one, respectively,
641in the data area pointed to by the
642.Ar ptr
643argument.
644.It Fn pdc "PDC_TLB" "PDC_TLB_CONFIG" "ptr" "base" "size" "param"
645Configure the hardware TLB miss handler given the same parameters fetched
646previously with PDC_TLB_INFO into data area pointed to by the
647.Ar ptr
648and page table
649.Ar base
650address, page table
651.Ar size ,
652and handler parameters
653.Ar param .
654The hardware TLB handler parameter bits are as follows:
655.Pp
656.Bl -tag -width 0xff -compact
657.It 1
658Enable the hardware TLB miss handler.
659The default is to load cr28 with the faulted page table entry address.
660.It 4
661Pointer to the next page table entry is put into cr28.
662.It 6
663Next pointer field of the page table entry is put into cr28.
664.El
665.Pp
666Resetting the page table address and/or size without disabling
667the hardware TLB miss handler is allowed.
668Any changes made are immediate upon Code or Data virtual
669address translation bits are set in PSW.
670.It Fn pdc "PDC_TOD" "PDC_TOD_READ" "ptr"
671Read the TOD, which is a UNIX Epoch time, into the data area
672pointed to by the
673.Ar ptr
674argument.
675That includes seconds in the first word and microseconds in
676the second.
677.It Fn pdc "PDC_TOD" "PDC_TOD_WRITE" "sec" "usec"
678Write TOD with UNIX Epoch time with
679.Ar sec
680seconds and
681.Ar usec
682microseconds.
683.It Fn pdc "PDC_TOD" "PDC_TOD_ITIMER" "ptr"
684Get TOD and CPU timer accuracy into the data location pointed to by the
685.Ar ptr
686argument.
687The first two words specify a double floating-point value giving
688CPU timer frequency.
689The next two words provide accuracy in parts per billion for the TOD and
690CPU timer, respectively.
691.El
692.Sh FILES
693.Bl -tag -width /sys/arch/hppa/dev/cpudevs -compact
694.It machine/pdc.h
695C header file with relevant definitions.
696.It /sys/arch/hppa/dev/cpudevs
697System components' version numbers.
698.It /dev/console
699System console device.
700.El
701.Sh DIAGNOSTICS
702Upon successful completion all procedures return zero.
703The following error codes are returned in case of failures:
704.Pp
705.Bl -tag -width PDC_ERR_NOPROC -compact
706.It PDC_ERR_NOPROC
707No such procedure
708.It PDC_ERR_NOPT
709No such option
710.It PDC_ERR_COMPL
711Unable to complete without error
712.It PDC_ERR_EOD
713No such device
714.It PDC_ERR_INVAL
715Invalid argument
716.It PDC_ERR_PFAIL
717Aborted by powerfail
718.El
719.Sh SEE ALSO
720.Xr intro 4 ,
721.Xr io 4 ,
722.Xr lasi 4
723.Rs
724.%T PA-RISC 1.1 Firmware Architecture Reference Specification
725.%A Hewlett-Packard
726.%D March 8, 1999
727.Re
728.Rs
729.%T PA-RISC 2.0 Firmware Architecture Reference Specification
730.%A Hewlett-Packard
731.%D March 7, 1999
732.Re
733