History log of /openbsd-current/sys/arch/sparc64/sparc64/ofw_machdep.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.38 29-Mar-2024 miod

Comment out unused routines. They might become used in the future, so they
are better not moved to the Attic yet.

ok claudio@ kettenis@


# 1.37 29-Mar-2024 miod

Remove dead defines, prototypes and data, and duplicate or misleading comments.

ok claudio@ kettenis@


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.36 17-Oct-2022 kettenis

Fix "map" OpenFirmware call. It does not return a value according to the
IEEE 1275 specification.

Based on a diff provided by Harald Gutch (hgutch@netbsd). Also see
NetBSD PR#56829.

ok miod@


# 1.35 16-Oct-2022 jsg

Change function definitions using the identifier-list form used in the
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.

In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".

ok kettenis@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.34 28-Aug-2018 dlg

add support for storing the time of day on OPL based machines.

this let's me pull the date back from 2023 to 2018, and have it
stay like that after a reboot.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.33 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.32 17-Oct-2014 daniel

Mark Cave-Ayland pointed out on tech@ that the OF_test_method was called
with an ihandle instead of a phandle. And also the comparison was the
wrong way around.

This bug was causing an exception. Because -1 is returned to indicate
failure and because the comparison is the wrong way around, the bad logic
led to believing that SUNW,retain exists which is why this currently
works on some PROMs.

On E250/E450 machines, this didn't work so there was a hack to detect
these machines and work-around the problem. After this fix that hack is
now removed.

Tested on an E450 by sebastia@ and confirmed that his dmesg is now
retained after a reboot. nick@ promises to complain if his E250 is any
worse off.

ok kettenis@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.31 19-Feb-2009 kettenis

Make prom_sun4v_soft_state_supported() call the right client interface.


# 1.30 30-Dec-2008 kettenis

Add domain state related PROM calls.


# 1.29 09-Aug-2008 kettenis

Add prom_set_sun4v_api_version().


Revision tags: OPENBSD_4_4_BASE
# 1.28 10-Jul-2008 kettenis

Add a function to get the time of day from the prom on the m4k.


# 1.27 07-Jul-2008 kettenis

Extend sbbc(4) to provide a console driver for the v1280.


# 1.26 05-Jul-2008 kettenis

Specify the correct number of arguments in prom call that sets the trap table
(1 for sun4u, 2 for sun4v).


# 1.25 19-Mar-2008 kettenis

Add prom_itlb_load() and prom_dtlb_load().


# 1.24 08-Mar-2008 kettenis

SUNW,set-trap-table takes an extra argument on sun4v; sun4u doesn't seem to
mind.

tested by miod@


Revision tags: OPENBSD_4_3_BASE
# 1.23 10-Jan-2008 deraadt

instead of showing { love }, fix the macro do use the do { ... } while (0) construct; ok kettenis marco


# 1.22 10-Jan-2008 marco

Fix {}

ok kettenis


# 1.21 19-Oct-2007 kettenis

Use HDL2CELL when passing an OpenFirmware handle in prom_start_cpu. Makes
bsd.mp boot on an E250.


# 1.20 08-Sep-2007 kettenis

Add prom functions to start secondary CPUs.


Revision tags: OPENBSD_4_2_BASE
# 1.19 28-Jul-2007 kettenis

Don't try to map interrupts that are already fully specified. Makes the
onboard IDE controller on the Ultrabook 170/200 work.


# 1.18 10-Apr-2007 kettenis

Prevent infinite loop mapping interrupts when "reg" property is missing.

ok mbalmer@, dlg@


# 1.17 06-Apr-2007 kettenis

Add support for PCIe. Don't map interrupts that are already mapped correctly.
Tested by deraadt@, nick@, sturm@, naddy@ and others.


Revision tags: OPENBSD_4_1_BASE
# 1.16 16-Jan-2007 tsi

Remove unnecessary ampersands in ADR2CELL macro invocations;
Change OF_printf references to printf, given the former doesn't exist;
Clean up formatting, whitespace, unused code, etc.

ok miod@, kettenis@


Revision tags: OPENBSD_4_0_BASE
# 1.15 31-Aug-2006 kettenis

Fix handling of 64-bit quantities in Open Firmware's client interface.
Spotted by tsi@, and shamelessly stolen from his diff. Fixes several
UltraSPARC-III machines wich have more than one memory bank filled.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.14 01-Jul-2005 brad

white space nit


# 1.13 29-Jun-2005 deraadt

handle larger interrupt maps; from henric


# 1.12 21-Apr-2005 deraadt

correct idion for snprintf failure handling; ok cloder


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.11 15-Jun-2004 brad

fix some printf's

From: Brian Poole <raj at cerias dot purdue dot edu>

ok henric@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.10 17-May-2004 brad

OF_mapintr: swizzle interrupt for PCI bridges,
don't process OBP interrupts, return error if interrupt is not mapped.

allows the IDE CD-rom on a Netra T1 105 to work.

From NetBSD

Tested by me on a Netra T1 105 and Ultra 10, tested on a E450 and ok henric@


Revision tags: OPENBSD_3_5_BASE
# 1.9 07-Jan-2004 pvalchev

machine/stdarg.h -> sys/stdarg.h; ok espie


Revision tags: OPENBSD_3_4_BASE UBC_SYNC_A
# 1.8 10-May-2003 deraadt

string cleaning; ok beck dhartmei


Revision tags: OPENBSD_3_3_BASE
# 1.7 30-Jan-2003 henric

The E450 seems to have the same problem as the E250, so don't ask OF for
the msgbuf on this box either.

ok jason@ (a very, very long time ago)


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_SYNC_B
# 1.6 15-Mar-2002 millert

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.


# 1.5 14-Mar-2002 millert

First round of __P removal in sys


# 1.4 03-Jan-2002 jason

stdout and stdin are integers not pointers (use 0 not NULL)


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.3 20-Aug-2001 jason

branches: 1.3.4; 1.3.6;
$OpenBSD$


# 1.2 19-Aug-2001 art

remove some dead code.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.36 17-Oct-2022 kettenis

Fix "map" OpenFirmware call. It does not return a value according to the
IEEE 1275 specification.

Based on a diff provided by Harald Gutch (hgutch@netbsd). Also see
NetBSD PR#56829.

ok miod@


# 1.35 16-Oct-2022 jsg

Change function definitions using the identifier-list form used in the
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.

In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".

ok kettenis@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.34 28-Aug-2018 dlg

add support for storing the time of day on OPL based machines.

this let's me pull the date back from 2023 to 2018, and have it
stay like that after a reboot.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.33 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.32 17-Oct-2014 daniel

Mark Cave-Ayland pointed out on tech@ that the OF_test_method was called
with an ihandle instead of a phandle. And also the comparison was the
wrong way around.

This bug was causing an exception. Because -1 is returned to indicate
failure and because the comparison is the wrong way around, the bad logic
led to believing that SUNW,retain exists which is why this currently
works on some PROMs.

On E250/E450 machines, this didn't work so there was a hack to detect
these machines and work-around the problem. After this fix that hack is
now removed.

Tested on an E450 by sebastia@ and confirmed that his dmesg is now
retained after a reboot. nick@ promises to complain if his E250 is any
worse off.

ok kettenis@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.31 19-Feb-2009 kettenis

Make prom_sun4v_soft_state_supported() call the right client interface.


# 1.30 30-Dec-2008 kettenis

Add domain state related PROM calls.


# 1.29 09-Aug-2008 kettenis

Add prom_set_sun4v_api_version().


Revision tags: OPENBSD_4_4_BASE
# 1.28 10-Jul-2008 kettenis

Add a function to get the time of day from the prom on the m4k.


# 1.27 07-Jul-2008 kettenis

Extend sbbc(4) to provide a console driver for the v1280.


# 1.26 05-Jul-2008 kettenis

Specify the correct number of arguments in prom call that sets the trap table
(1 for sun4u, 2 for sun4v).


# 1.25 19-Mar-2008 kettenis

Add prom_itlb_load() and prom_dtlb_load().


# 1.24 08-Mar-2008 kettenis

SUNW,set-trap-table takes an extra argument on sun4v; sun4u doesn't seem to
mind.

tested by miod@


Revision tags: OPENBSD_4_3_BASE
# 1.23 10-Jan-2008 deraadt

instead of showing { love }, fix the macro do use the do { ... } while (0) construct; ok kettenis marco


# 1.22 10-Jan-2008 marco

Fix {}

ok kettenis


# 1.21 19-Oct-2007 kettenis

Use HDL2CELL when passing an OpenFirmware handle in prom_start_cpu. Makes
bsd.mp boot on an E250.


# 1.20 08-Sep-2007 kettenis

Add prom functions to start secondary CPUs.


Revision tags: OPENBSD_4_2_BASE
# 1.19 28-Jul-2007 kettenis

Don't try to map interrupts that are already fully specified. Makes the
onboard IDE controller on the Ultrabook 170/200 work.


# 1.18 10-Apr-2007 kettenis

Prevent infinite loop mapping interrupts when "reg" property is missing.

ok mbalmer@, dlg@


# 1.17 06-Apr-2007 kettenis

Add support for PCIe. Don't map interrupts that are already mapped correctly.
Tested by deraadt@, nick@, sturm@, naddy@ and others.


Revision tags: OPENBSD_4_1_BASE
# 1.16 16-Jan-2007 tsi

Remove unnecessary ampersands in ADR2CELL macro invocations;
Change OF_printf references to printf, given the former doesn't exist;
Clean up formatting, whitespace, unused code, etc.

ok miod@, kettenis@


Revision tags: OPENBSD_4_0_BASE
# 1.15 31-Aug-2006 kettenis

Fix handling of 64-bit quantities in Open Firmware's client interface.
Spotted by tsi@, and shamelessly stolen from his diff. Fixes several
UltraSPARC-III machines wich have more than one memory bank filled.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.14 01-Jul-2005 brad

white space nit


# 1.13 29-Jun-2005 deraadt

handle larger interrupt maps; from henric


# 1.12 21-Apr-2005 deraadt

correct idion for snprintf failure handling; ok cloder


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.11 15-Jun-2004 brad

fix some printf's

From: Brian Poole <raj at cerias dot purdue dot edu>

ok henric@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.10 17-May-2004 brad

OF_mapintr: swizzle interrupt for PCI bridges,
don't process OBP interrupts, return error if interrupt is not mapped.

allows the IDE CD-rom on a Netra T1 105 to work.

From NetBSD

Tested by me on a Netra T1 105 and Ultra 10, tested on a E450 and ok henric@


Revision tags: OPENBSD_3_5_BASE
# 1.9 07-Jan-2004 pvalchev

machine/stdarg.h -> sys/stdarg.h; ok espie


Revision tags: OPENBSD_3_4_BASE UBC_SYNC_A
# 1.8 10-May-2003 deraadt

string cleaning; ok beck dhartmei


Revision tags: OPENBSD_3_3_BASE
# 1.7 30-Jan-2003 henric

The E450 seems to have the same problem as the E250, so don't ask OF for
the msgbuf on this box either.

ok jason@ (a very, very long time ago)


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_SYNC_B
# 1.6 15-Mar-2002 millert

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.


# 1.5 14-Mar-2002 millert

First round of __P removal in sys


# 1.4 03-Jan-2002 jason

stdout and stdin are integers not pointers (use 0 not NULL)


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.3 20-Aug-2001 jason

branches: 1.3.4; 1.3.6;
$OpenBSD$


# 1.2 19-Aug-2001 art

remove some dead code.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.36 17-Oct-2022 kettenis

Fix "map" OpenFirmware call. It does not return a value according to the
IEEE 1275 specification.

Based on a diff provided by Harald Gutch (hgutch@netbsd). Also see
NetBSD PR#56829.

ok miod@


# 1.35 16-Oct-2022 jsg

Change function definitions using the identifier-list form used in the
1st edition of Kernighan and Ritchie's The C Programming Language, to
that of the parameter-type-list form described in the ANSI X3.159-1989
standard.

In ISO/IEC 9899:2023 drafts, there is only one form of function definition.
"N2432 Remove support for function definitions with identifier lists".

ok kettenis@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.34 28-Aug-2018 dlg

add support for storing the time of day on OPL based machines.

this let's me pull the date back from 2023 to 2018, and have it
stay like that after a reboot.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.33 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.32 17-Oct-2014 daniel

Mark Cave-Ayland pointed out on tech@ that the OF_test_method was called
with an ihandle instead of a phandle. And also the comparison was the
wrong way around.

This bug was causing an exception. Because -1 is returned to indicate
failure and because the comparison is the wrong way around, the bad logic
led to believing that SUNW,retain exists which is why this currently
works on some PROMs.

On E250/E450 machines, this didn't work so there was a hack to detect
these machines and work-around the problem. After this fix that hack is
now removed.

Tested on an E450 by sebastia@ and confirmed that his dmesg is now
retained after a reboot. nick@ promises to complain if his E250 is any
worse off.

ok kettenis@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.31 19-Feb-2009 kettenis

Make prom_sun4v_soft_state_supported() call the right client interface.


# 1.30 30-Dec-2008 kettenis

Add domain state related PROM calls.


# 1.29 09-Aug-2008 kettenis

Add prom_set_sun4v_api_version().


Revision tags: OPENBSD_4_4_BASE
# 1.28 10-Jul-2008 kettenis

Add a function to get the time of day from the prom on the m4k.


# 1.27 07-Jul-2008 kettenis

Extend sbbc(4) to provide a console driver for the v1280.


# 1.26 05-Jul-2008 kettenis

Specify the correct number of arguments in prom call that sets the trap table
(1 for sun4u, 2 for sun4v).


# 1.25 19-Mar-2008 kettenis

Add prom_itlb_load() and prom_dtlb_load().


# 1.24 08-Mar-2008 kettenis

SUNW,set-trap-table takes an extra argument on sun4v; sun4u doesn't seem to
mind.

tested by miod@


Revision tags: OPENBSD_4_3_BASE
# 1.23 10-Jan-2008 deraadt

instead of showing { love }, fix the macro do use the do { ... } while (0) construct; ok kettenis marco


# 1.22 10-Jan-2008 marco

Fix {}

ok kettenis


# 1.21 19-Oct-2007 kettenis

Use HDL2CELL when passing an OpenFirmware handle in prom_start_cpu. Makes
bsd.mp boot on an E250.


# 1.20 08-Sep-2007 kettenis

Add prom functions to start secondary CPUs.


Revision tags: OPENBSD_4_2_BASE
# 1.19 28-Jul-2007 kettenis

Don't try to map interrupts that are already fully specified. Makes the
onboard IDE controller on the Ultrabook 170/200 work.


# 1.18 10-Apr-2007 kettenis

Prevent infinite loop mapping interrupts when "reg" property is missing.

ok mbalmer@, dlg@


# 1.17 06-Apr-2007 kettenis

Add support for PCIe. Don't map interrupts that are already mapped correctly.
Tested by deraadt@, nick@, sturm@, naddy@ and others.


Revision tags: OPENBSD_4_1_BASE
# 1.16 16-Jan-2007 tsi

Remove unnecessary ampersands in ADR2CELL macro invocations;
Change OF_printf references to printf, given the former doesn't exist;
Clean up formatting, whitespace, unused code, etc.

ok miod@, kettenis@


Revision tags: OPENBSD_4_0_BASE
# 1.15 31-Aug-2006 kettenis

Fix handling of 64-bit quantities in Open Firmware's client interface.
Spotted by tsi@, and shamelessly stolen from his diff. Fixes several
UltraSPARC-III machines wich have more than one memory bank filled.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.14 01-Jul-2005 brad

white space nit


# 1.13 29-Jun-2005 deraadt

handle larger interrupt maps; from henric


# 1.12 21-Apr-2005 deraadt

correct idion for snprintf failure handling; ok cloder


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.11 15-Jun-2004 brad

fix some printf's

From: Brian Poole <raj at cerias dot purdue dot edu>

ok henric@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.10 17-May-2004 brad

OF_mapintr: swizzle interrupt for PCI bridges,
don't process OBP interrupts, return error if interrupt is not mapped.

allows the IDE CD-rom on a Netra T1 105 to work.

From NetBSD

Tested by me on a Netra T1 105 and Ultra 10, tested on a E450 and ok henric@


Revision tags: OPENBSD_3_5_BASE
# 1.9 07-Jan-2004 pvalchev

machine/stdarg.h -> sys/stdarg.h; ok espie


Revision tags: OPENBSD_3_4_BASE UBC_SYNC_A
# 1.8 10-May-2003 deraadt

string cleaning; ok beck dhartmei


Revision tags: OPENBSD_3_3_BASE
# 1.7 30-Jan-2003 henric

The E450 seems to have the same problem as the E250, so don't ask OF for
the msgbuf on this box either.

ok jason@ (a very, very long time ago)


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_SYNC_B
# 1.6 15-Mar-2002 millert

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.


# 1.5 14-Mar-2002 millert

First round of __P removal in sys


# 1.4 03-Jan-2002 jason

stdout and stdin are integers not pointers (use 0 not NULL)


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.3 20-Aug-2001 jason

branches: 1.3.4; 1.3.6;
$OpenBSD$


# 1.2 19-Aug-2001 art

remove some dead code.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


# 1.34 28-Aug-2018 dlg

add support for storing the time of day on OPL based machines.

this let's me pull the date back from 2023 to 2018, and have it
stay like that after a reboot.

ok deraadt@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.33 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.32 17-Oct-2014 daniel

Mark Cave-Ayland pointed out on tech@ that the OF_test_method was called
with an ihandle instead of a phandle. And also the comparison was the
wrong way around.

This bug was causing an exception. Because -1 is returned to indicate
failure and because the comparison is the wrong way around, the bad logic
led to believing that SUNW,retain exists which is why this currently
works on some PROMs.

On E250/E450 machines, this didn't work so there was a hack to detect
these machines and work-around the problem. After this fix that hack is
now removed.

Tested on an E450 by sebastia@ and confirmed that his dmesg is now
retained after a reboot. nick@ promises to complain if his E250 is any
worse off.

ok kettenis@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.31 19-Feb-2009 kettenis

Make prom_sun4v_soft_state_supported() call the right client interface.


# 1.30 30-Dec-2008 kettenis

Add domain state related PROM calls.


# 1.29 09-Aug-2008 kettenis

Add prom_set_sun4v_api_version().


Revision tags: OPENBSD_4_4_BASE
# 1.28 10-Jul-2008 kettenis

Add a function to get the time of day from the prom on the m4k.


# 1.27 07-Jul-2008 kettenis

Extend sbbc(4) to provide a console driver for the v1280.


# 1.26 05-Jul-2008 kettenis

Specify the correct number of arguments in prom call that sets the trap table
(1 for sun4u, 2 for sun4v).


# 1.25 19-Mar-2008 kettenis

Add prom_itlb_load() and prom_dtlb_load().


# 1.24 08-Mar-2008 kettenis

SUNW,set-trap-table takes an extra argument on sun4v; sun4u doesn't seem to
mind.

tested by miod@


Revision tags: OPENBSD_4_3_BASE
# 1.23 10-Jan-2008 deraadt

instead of showing { love }, fix the macro do use the do { ... } while (0) construct; ok kettenis marco


# 1.22 10-Jan-2008 marco

Fix {}

ok kettenis


# 1.21 19-Oct-2007 kettenis

Use HDL2CELL when passing an OpenFirmware handle in prom_start_cpu. Makes
bsd.mp boot on an E250.


# 1.20 08-Sep-2007 kettenis

Add prom functions to start secondary CPUs.


Revision tags: OPENBSD_4_2_BASE
# 1.19 28-Jul-2007 kettenis

Don't try to map interrupts that are already fully specified. Makes the
onboard IDE controller on the Ultrabook 170/200 work.


# 1.18 10-Apr-2007 kettenis

Prevent infinite loop mapping interrupts when "reg" property is missing.

ok mbalmer@, dlg@


# 1.17 06-Apr-2007 kettenis

Add support for PCIe. Don't map interrupts that are already mapped correctly.
Tested by deraadt@, nick@, sturm@, naddy@ and others.


Revision tags: OPENBSD_4_1_BASE
# 1.16 16-Jan-2007 tsi

Remove unnecessary ampersands in ADR2CELL macro invocations;
Change OF_printf references to printf, given the former doesn't exist;
Clean up formatting, whitespace, unused code, etc.

ok miod@, kettenis@


Revision tags: OPENBSD_4_0_BASE
# 1.15 31-Aug-2006 kettenis

Fix handling of 64-bit quantities in Open Firmware's client interface.
Spotted by tsi@, and shamelessly stolen from his diff. Fixes several
UltraSPARC-III machines wich have more than one memory bank filled.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.14 01-Jul-2005 brad

white space nit


# 1.13 29-Jun-2005 deraadt

handle larger interrupt maps; from henric


# 1.12 21-Apr-2005 deraadt

correct idion for snprintf failure handling; ok cloder


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.11 15-Jun-2004 brad

fix some printf's

From: Brian Poole <raj at cerias dot purdue dot edu>

ok henric@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.10 17-May-2004 brad

OF_mapintr: swizzle interrupt for PCI bridges,
don't process OBP interrupts, return error if interrupt is not mapped.

allows the IDE CD-rom on a Netra T1 105 to work.

From NetBSD

Tested by me on a Netra T1 105 and Ultra 10, tested on a E450 and ok henric@


Revision tags: OPENBSD_3_5_BASE
# 1.9 07-Jan-2004 pvalchev

machine/stdarg.h -> sys/stdarg.h; ok espie


Revision tags: OPENBSD_3_4_BASE UBC_SYNC_A
# 1.8 10-May-2003 deraadt

string cleaning; ok beck dhartmei


Revision tags: OPENBSD_3_3_BASE
# 1.7 30-Jan-2003 henric

The E450 seems to have the same problem as the E250, so don't ask OF for
the msgbuf on this box either.

ok jason@ (a very, very long time ago)


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_SYNC_B
# 1.6 15-Mar-2002 millert

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.


# 1.5 14-Mar-2002 millert

First round of __P removal in sys


# 1.4 03-Jan-2002 jason

stdout and stdin are integers not pointers (use 0 not NULL)


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.3 20-Aug-2001 jason

branches: 1.3.4; 1.3.6;
$OpenBSD$


# 1.2 19-Aug-2001 art

remove some dead code.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.33 07-Mar-2016 naddy

Sync no-argument function declaration and definition by adding (void).
ok mpi@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
# 1.32 17-Oct-2014 daniel

Mark Cave-Ayland pointed out on tech@ that the OF_test_method was called
with an ihandle instead of a phandle. And also the comparison was the
wrong way around.

This bug was causing an exception. Because -1 is returned to indicate
failure and because the comparison is the wrong way around, the bad logic
led to believing that SUNW,retain exists which is why this currently
works on some PROMs.

On E250/E450 machines, this didn't work so there was a hack to detect
these machines and work-around the problem. After this fix that hack is
now removed.

Tested on an E450 by sebastia@ and confirmed that his dmesg is now
retained after a reboot. nick@ promises to complain if his E250 is any
worse off.

ok kettenis@


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.31 19-Feb-2009 kettenis

Make prom_sun4v_soft_state_supported() call the right client interface.


# 1.30 30-Dec-2008 kettenis

Add domain state related PROM calls.


# 1.29 09-Aug-2008 kettenis

Add prom_set_sun4v_api_version().


Revision tags: OPENBSD_4_4_BASE
# 1.28 10-Jul-2008 kettenis

Add a function to get the time of day from the prom on the m4k.


# 1.27 07-Jul-2008 kettenis

Extend sbbc(4) to provide a console driver for the v1280.


# 1.26 05-Jul-2008 kettenis

Specify the correct number of arguments in prom call that sets the trap table
(1 for sun4u, 2 for sun4v).


# 1.25 19-Mar-2008 kettenis

Add prom_itlb_load() and prom_dtlb_load().


# 1.24 08-Mar-2008 kettenis

SUNW,set-trap-table takes an extra argument on sun4v; sun4u doesn't seem to
mind.

tested by miod@


Revision tags: OPENBSD_4_3_BASE
# 1.23 10-Jan-2008 deraadt

instead of showing { love }, fix the macro do use the do { ... } while (0) construct; ok kettenis marco


# 1.22 10-Jan-2008 marco

Fix {}

ok kettenis


# 1.21 19-Oct-2007 kettenis

Use HDL2CELL when passing an OpenFirmware handle in prom_start_cpu. Makes
bsd.mp boot on an E250.


# 1.20 08-Sep-2007 kettenis

Add prom functions to start secondary CPUs.


Revision tags: OPENBSD_4_2_BASE
# 1.19 28-Jul-2007 kettenis

Don't try to map interrupts that are already fully specified. Makes the
onboard IDE controller on the Ultrabook 170/200 work.


# 1.18 10-Apr-2007 kettenis

Prevent infinite loop mapping interrupts when "reg" property is missing.

ok mbalmer@, dlg@


# 1.17 06-Apr-2007 kettenis

Add support for PCIe. Don't map interrupts that are already mapped correctly.
Tested by deraadt@, nick@, sturm@, naddy@ and others.


Revision tags: OPENBSD_4_1_BASE
# 1.16 16-Jan-2007 tsi

Remove unnecessary ampersands in ADR2CELL macro invocations;
Change OF_printf references to printf, given the former doesn't exist;
Clean up formatting, whitespace, unused code, etc.

ok miod@, kettenis@


Revision tags: OPENBSD_4_0_BASE
# 1.15 31-Aug-2006 kettenis

Fix handling of 64-bit quantities in Open Firmware's client interface.
Spotted by tsi@, and shamelessly stolen from his diff. Fixes several
UltraSPARC-III machines wich have more than one memory bank filled.

ok deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.14 01-Jul-2005 brad

white space nit


# 1.13 29-Jun-2005 deraadt

handle larger interrupt maps; from henric


# 1.12 21-Apr-2005 deraadt

correct idion for snprintf failure handling; ok cloder


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.11 15-Jun-2004 brad

fix some printf's

From: Brian Poole <raj at cerias dot purdue dot edu>

ok henric@


Revision tags: SMP_SYNC_A SMP_SYNC_B
# 1.10 17-May-2004 brad

OF_mapintr: swizzle interrupt for PCI bridges,
don't process OBP interrupts, return error if interrupt is not mapped.

allows the IDE CD-rom on a Netra T1 105 to work.

From NetBSD

Tested by me on a Netra T1 105 and Ultra 10, tested on a E450 and ok henric@


Revision tags: OPENBSD_3_5_BASE
# 1.9 07-Jan-2004 pvalchev

machine/stdarg.h -> sys/stdarg.h; ok espie


Revision tags: OPENBSD_3_4_BASE UBC_SYNC_A
# 1.8 10-May-2003 deraadt

string cleaning; ok beck dhartmei


Revision tags: OPENBSD_3_3_BASE
# 1.7 30-Jan-2003 henric

The E450 seems to have the same problem as the E250, so don't ask OF for
the msgbuf on this box either.

ok jason@ (a very, very long time ago)


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE UBC_SYNC_B
# 1.6 15-Mar-2002 millert

Kill #if __STDC__ used to do K&R vs. ANSI varargs/stdarg; just do things
the ANSI way.


# 1.5 14-Mar-2002 millert

First round of __P removal in sys


# 1.4 03-Jan-2002 jason

stdout and stdin are integers not pointers (use 0 not NULL)


Revision tags: OPENBSD_3_0_BASE UBC_BASE
# 1.3 20-Aug-2001 jason

branches: 1.3.4; 1.3.6;
$OpenBSD$


# 1.2 19-Aug-2001 art

remove some dead code.


# 1.1 19-Aug-2001 jason

Lot of stuff... Some from NetBSD, some from OpenBSD, minor modifications