mail.coreboot.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
January
2000
December
November
October
September
August
July
June
May
April
March
February
January
1999
December
November
October
September
August
July
June
May
April
March
February
January
1998
December
November
October
September
August
July
June
May
April
March
February
January
1997
December
November
October
September
August
July
June
May
April
March
February
January
1996
December
November
October
September
August
July
June
May
April
March
February
January
1995
December
November
October
September
August
July
June
May
April
March
February
January
1994
December
November
October
September
August
July
June
May
April
March
February
January
1993
December
November
October
September
August
July
June
May
April
March
February
January
1992
December
November
October
September
August
July
June
May
April
March
February
January
1991
December
November
October
September
August
July
June
May
April
March
February
January
1990
December
November
October
September
August
July
June
May
April
March
February
January
1989
December
November
October
September
August
July
June
May
April
March
February
January
1988
December
November
October
September
August
July
June
May
April
March
February
January
1987
December
November
October
September
August
July
June
May
April
March
February
January
1986
December
November
October
September
August
July
June
May
April
March
February
January
1985
December
November
October
September
August
July
June
May
April
March
February
January
1984
December
November
October
September
August
July
June
May
April
March
February
January
1983
December
November
October
September
August
July
June
May
April
March
February
January
1982
December
November
October
September
August
July
June
May
April
March
February
January
1981
December
November
October
September
August
July
June
May
April
March
February
January
1980
December
November
October
September
August
July
June
May
April
March
February
January
1979
December
November
October
September
August
July
June
May
April
March
February
January
1978
December
November
October
September
August
July
June
May
April
March
February
January
1977
December
November
October
September
August
July
June
May
April
March
February
January
1976
December
November
October
September
August
July
June
May
April
March
February
January
1975
December
November
October
September
August
July
June
May
April
March
February
January
1974
December
November
October
September
August
July
June
May
April
March
February
January
1973
December
November
October
September
August
July
June
May
April
March
February
January
1972
December
November
October
September
August
July
June
May
April
March
February
January
1971
December
November
October
September
August
July
June
May
April
March
February
January
1970
December
November
October
September
August
July
June
May
April
March
February
January
1969
December
November
October
September
August
July
June
May
April
March
February
January
1968
December
November
October
September
August
July
June
May
April
March
February
January
1967
December
November
October
September
August
July
June
May
April
March
February
January
1966
December
November
October
September
August
July
June
May
April
March
February
January
1965
December
November
October
September
August
July
June
May
April
March
February
January
1964
December
November
October
September
August
July
June
May
April
March
February
January
1963
December
November
October
September
August
July
June
May
April
March
February
January
1962
December
November
October
September
August
July
June
May
April
March
February
January
1961
December
November
October
September
August
July
June
May
April
March
February
January
1960
December
November
October
September
August
July
June
May
April
March
February
January
1959
December
November
October
September
August
July
June
May
April
March
February
January
1958
December
November
October
September
August
July
June
May
April
March
February
January
1957
December
November
October
September
August
July
June
May
April
March
February
January
1956
December
November
October
September
August
July
June
May
April
March
February
January
1955
December
November
October
September
August
July
June
May
April
March
February
January
1954
December
November
October
September
August
July
June
May
April
March
February
January
1953
December
November
October
September
August
July
June
May
April
March
February
January
1952
December
November
October
September
August
July
June
May
April
March
February
January
1951
December
November
October
September
August
July
June
May
April
March
February
January
1950
December
November
October
September
August
July
June
May
April
March
February
January
1949
December
November
October
September
August
July
June
May
April
March
February
January
1948
December
November
October
September
August
July
June
May
April
March
February
January
1947
December
November
October
September
August
July
June
May
April
March
February
January
1946
December
November
October
September
August
July
June
May
April
March
February
January
1945
December
November
October
September
August
July
June
May
April
March
February
January
1944
December
November
October
September
August
July
June
May
April
March
February
January
1943
December
November
October
September
August
July
June
May
April
March
February
January
1942
December
November
October
September
August
July
June
May
April
March
February
January
1941
December
November
October
September
August
July
June
May
April
March
February
January
1940
December
November
October
September
August
July
June
May
April
March
February
January
1939
December
November
October
September
August
July
June
May
April
March
February
January
1938
December
November
October
September
August
July
June
May
April
March
February
January
1937
December
November
October
September
August
July
June
May
April
March
February
January
1936
December
November
October
September
August
July
June
May
April
March
February
January
1935
December
November
October
September
August
July
June
May
April
March
February
January
1934
December
November
October
September
August
July
June
May
April
March
February
January
1933
December
November
October
September
August
July
June
May
April
March
February
January
1932
December
November
October
September
August
July
June
May
April
March
February
January
1931
December
November
October
September
August
July
June
May
April
March
February
January
1930
December
November
October
September
August
July
June
May
April
March
February
January
1929
December
November
October
September
August
July
June
May
April
March
February
January
1928
December
November
October
September
August
July
June
May
April
March
February
January
1927
December
November
October
September
August
July
June
May
April
March
February
January
1926
December
November
October
September
August
July
June
May
April
March
February
January
1925
December
November
October
September
August
July
June
May
April
March
February
January
1924
December
November
October
September
August
July
June
May
April
March
February
January
1923
December
November
October
September
August
July
June
May
April
March
February
January
1922
December
November
October
September
August
July
June
May
April
March
February
January
1921
December
November
October
September
August
July
June
May
April
March
February
January
1920
December
November
October
September
August
July
June
May
April
March
February
January
1919
December
November
October
September
August
July
June
May
April
March
February
January
1918
December
November
October
September
August
July
June
May
April
March
February
January
1917
December
November
October
September
August
July
June
May
April
March
February
January
1916
December
November
October
September
August
July
June
May
April
March
February
January
1915
December
November
October
September
August
July
June
May
April
March
February
January
1914
December
November
October
September
August
July
June
May
April
March
February
January
1913
December
November
October
September
August
July
June
May
April
March
February
January
1912
December
November
October
September
August
July
June
May
April
March
February
January
1911
December
November
October
September
August
July
June
May
April
March
February
January
1910
December
November
October
September
August
July
June
May
April
March
February
January
1909
December
November
October
September
August
July
June
May
April
March
February
January
1908
December
November
October
September
August
July
June
May
April
March
February
January
1907
December
November
October
September
August
July
June
May
April
March
February
January
1906
December
November
October
September
August
July
June
May
April
March
February
January
1905
December
November
October
September
August
July
June
May
April
March
February
January
1904
December
November
October
September
August
July
June
May
April
March
February
January
List overview
Download
OpenBIOS
November 2008
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
January 2001
----- 2000 -----
December 2000
November 2000
October 2000
September 2000
August 2000
July 2000
June 2000
May 2000
April 2000
March 2000
February 2000
January 2000
----- 1999 -----
December 1999
November 1999
October 1999
September 1999
August 1999
July 1999
June 1999
May 1999
April 1999
March 1999
February 1999
January 1999
----- 1998 -----
December 1998
November 1998
October 1998
September 1998
August 1998
July 1998
June 1998
May 1998
April 1998
March 1998
February 1998
January 1998
----- 1997 -----
December 1997
November 1997
October 1997
September 1997
August 1997
July 1997
June 1997
May 1997
April 1997
March 1997
February 1997
January 1997
----- 1996 -----
December 1996
November 1996
October 1996
September 1996
August 1996
July 1996
June 1996
May 1996
April 1996
March 1996
February 1996
January 1996
----- 1995 -----
December 1995
November 1995
October 1995
September 1995
August 1995
July 1995
June 1995
May 1995
April 1995
March 1995
February 1995
January 1995
----- 1994 -----
December 1994
November 1994
October 1994
September 1994
August 1994
July 1994
June 1994
May 1994
April 1994
March 1994
February 1994
January 1994
----- 1993 -----
December 1993
November 1993
October 1993
September 1993
August 1993
July 1993
June 1993
May 1993
April 1993
March 1993
February 1993
January 1993
----- 1992 -----
December 1992
November 1992
October 1992
September 1992
August 1992
July 1992
June 1992
May 1992
April 1992
March 1992
February 1992
January 1992
----- 1991 -----
December 1991
November 1991
October 1991
September 1991
August 1991
July 1991
June 1991
May 1991
April 1991
March 1991
February 1991
January 1991
----- 1990 -----
December 1990
November 1990
October 1990
September 1990
August 1990
July 1990
June 1990
May 1990
April 1990
March 1990
February 1990
January 1990
----- 1989 -----
December 1989
November 1989
October 1989
September 1989
August 1989
July 1989
June 1989
May 1989
April 1989
March 1989
February 1989
January 1989
----- 1988 -----
December 1988
November 1988
October 1988
September 1988
August 1988
July 1988
June 1988
May 1988
April 1988
March 1988
February 1988
January 1988
----- 1987 -----
December 1987
November 1987
October 1987
September 1987
August 1987
July 1987
June 1987
May 1987
April 1987
March 1987
February 1987
January 1987
----- 1986 -----
December 1986
November 1986
October 1986
September 1986
August 1986
July 1986
June 1986
May 1986
April 1986
March 1986
February 1986
January 1986
----- 1985 -----
December 1985
November 1985
October 1985
September 1985
August 1985
July 1985
June 1985
May 1985
April 1985
March 1985
February 1985
January 1985
----- 1984 -----
December 1984
November 1984
October 1984
September 1984
August 1984
July 1984
June 1984
May 1984
April 1984
March 1984
February 1984
January 1984
----- 1983 -----
December 1983
November 1983
October 1983
September 1983
August 1983
July 1983
June 1983
May 1983
April 1983
March 1983
February 1983
January 1983
----- 1982 -----
December 1982
November 1982
October 1982
September 1982
August 1982
July 1982
June 1982
May 1982
April 1982
March 1982
February 1982
January 1982
----- 1981 -----
December 1981
November 1981
October 1981
September 1981
August 1981
July 1981
June 1981
May 1981
April 1981
March 1981
February 1981
January 1981
----- 1980 -----
December 1980
November 1980
October 1980
September 1980
August 1980
July 1980
June 1980
May 1980
April 1980
March 1980
February 1980
January 1980
----- 1979 -----
December 1979
November 1979
October 1979
September 1979
August 1979
July 1979
June 1979
May 1979
April 1979
March 1979
February 1979
January 1979
----- 1978 -----
December 1978
November 1978
October 1978
September 1978
August 1978
July 1978
June 1978
May 1978
April 1978
March 1978
February 1978
January 1978
----- 1977 -----
December 1977
November 1977
October 1977
September 1977
August 1977
July 1977
June 1977
May 1977
April 1977
March 1977
February 1977
January 1977
----- 1976 -----
December 1976
November 1976
October 1976
September 1976
August 1976
July 1976
June 1976
May 1976
April 1976
March 1976
February 1976
January 1976
----- 1975 -----
December 1975
November 1975
October 1975
September 1975
August 1975
July 1975
June 1975
May 1975
April 1975
March 1975
February 1975
January 1975
----- 1974 -----
December 1974
November 1974
October 1974
September 1974
August 1974
July 1974
June 1974
May 1974
April 1974
March 1974
February 1974
January 1974
----- 1973 -----
December 1973
November 1973
October 1973
September 1973
August 1973
July 1973
June 1973
May 1973
April 1973
March 1973
February 1973
January 1973
----- 1972 -----
December 1972
November 1972
October 1972
September 1972
August 1972
July 1972
June 1972
May 1972
April 1972
March 1972
February 1972
January 1972
----- 1971 -----
December 1971
November 1971
October 1971
September 1971
August 1971
July 1971
June 1971
May 1971
April 1971
March 1971
February 1971
January 1971
----- 1970 -----
December 1970
November 1970
October 1970
September 1970
August 1970
July 1970
June 1970
May 1970
April 1970
March 1970
February 1970
January 1970
----- 1969 -----
December 1969
November 1969
October 1969
September 1969
August 1969
July 1969
June 1969
May 1969
April 1969
March 1969
February 1969
January 1969
----- 1968 -----
December 1968
November 1968
October 1968
September 1968
August 1968
July 1968
June 1968
May 1968
April 1968
March 1968
February 1968
January 1968
----- 1967 -----
December 1967
November 1967
October 1967
September 1967
August 1967
July 1967
June 1967
May 1967
April 1967
March 1967
February 1967
January 1967
----- 1966 -----
December 1966
November 1966
October 1966
September 1966
August 1966
July 1966
June 1966
May 1966
April 1966
March 1966
February 1966
January 1966
----- 1965 -----
December 1965
November 1965
October 1965
September 1965
August 1965
July 1965
June 1965
May 1965
April 1965
March 1965
February 1965
January 1965
----- 1964 -----
December 1964
November 1964
October 1964
September 1964
August 1964
July 1964
June 1964
May 1964
April 1964
March 1964
February 1964
January 1964
----- 1963 -----
December 1963
November 1963
October 1963
September 1963
August 1963
July 1963
June 1963
May 1963
April 1963
March 1963
February 1963
January 1963
----- 1962 -----
December 1962
November 1962
October 1962
September 1962
August 1962
July 1962
June 1962
May 1962
April 1962
March 1962
February 1962
January 1962
----- 1961 -----
December 1961
November 1961
October 1961
September 1961
August 1961
July 1961
June 1961
May 1961
April 1961
March 1961
February 1961
January 1961
----- 1960 -----
December 1960
November 1960
October 1960
September 1960
August 1960
July 1960
June 1960
May 1960
April 1960
March 1960
February 1960
January 1960
----- 1959 -----
December 1959
November 1959
October 1959
September 1959
August 1959
July 1959
June 1959
May 1959
April 1959
March 1959
February 1959
January 1959
----- 1958 -----
December 1958
November 1958
October 1958
September 1958
August 1958
July 1958
June 1958
May 1958
April 1958
March 1958
February 1958
January 1958
----- 1957 -----
December 1957
November 1957
October 1957
September 1957
August 1957
July 1957
June 1957
May 1957
April 1957
March 1957
February 1957
January 1957
----- 1956 -----
December 1956
November 1956
October 1956
September 1956
August 1956
July 1956
June 1956
May 1956
April 1956
March 1956
February 1956
January 1956
----- 1955 -----
December 1955
November 1955
October 1955
September 1955
August 1955
July 1955
June 1955
May 1955
April 1955
March 1955
February 1955
January 1955
----- 1954 -----
December 1954
November 1954
October 1954
September 1954
August 1954
July 1954
June 1954
May 1954
April 1954
March 1954
February 1954
January 1954
----- 1953 -----
December 1953
November 1953
October 1953
September 1953
August 1953
July 1953
June 1953
May 1953
April 1953
March 1953
February 1953
January 1953
----- 1952 -----
December 1952
November 1952
October 1952
September 1952
August 1952
July 1952
June 1952
May 1952
April 1952
March 1952
February 1952
January 1952
----- 1951 -----
December 1951
November 1951
October 1951
September 1951
August 1951
July 1951
June 1951
May 1951
April 1951
March 1951
February 1951
January 1951
----- 1950 -----
December 1950
November 1950
October 1950
September 1950
August 1950
July 1950
June 1950
May 1950
April 1950
March 1950
February 1950
January 1950
----- 1949 -----
December 1949
November 1949
October 1949
September 1949
August 1949
July 1949
June 1949
May 1949
April 1949
March 1949
February 1949
January 1949
----- 1948 -----
December 1948
November 1948
October 1948
September 1948
August 1948
July 1948
June 1948
May 1948
April 1948
March 1948
February 1948
January 1948
----- 1947 -----
December 1947
November 1947
October 1947
September 1947
August 1947
July 1947
June 1947
May 1947
April 1947
March 1947
February 1947
January 1947
----- 1946 -----
December 1946
November 1946
October 1946
September 1946
August 1946
July 1946
June 1946
May 1946
April 1946
March 1946
February 1946
January 1946
----- 1945 -----
December 1945
November 1945
October 1945
September 1945
August 1945
July 1945
June 1945
May 1945
April 1945
March 1945
February 1945
January 1945
----- 1944 -----
December 1944
November 1944
October 1944
September 1944
August 1944
July 1944
June 1944
May 1944
April 1944
March 1944
February 1944
January 1944
----- 1943 -----
December 1943
November 1943
October 1943
September 1943
August 1943
July 1943
June 1943
May 1943
April 1943
March 1943
February 1943
January 1943
----- 1942 -----
December 1942
November 1942
October 1942
September 1942
August 1942
July 1942
June 1942
May 1942
April 1942
March 1942
February 1942
January 1942
----- 1941 -----
December 1941
November 1941
October 1941
September 1941
August 1941
July 1941
June 1941
May 1941
April 1941
March 1941
February 1941
January 1941
----- 1940 -----
December 1940
November 1940
October 1940
September 1940
August 1940
July 1940
June 1940
May 1940
April 1940
March 1940
February 1940
January 1940
----- 1939 -----
December 1939
November 1939
October 1939
September 1939
August 1939
July 1939
June 1939
May 1939
April 1939
March 1939
February 1939
January 1939
----- 1938 -----
December 1938
November 1938
October 1938
September 1938
August 1938
July 1938
June 1938
May 1938
April 1938
March 1938
February 1938
January 1938
----- 1937 -----
December 1937
November 1937
October 1937
September 1937
August 1937
July 1937
June 1937
May 1937
April 1937
March 1937
February 1937
January 1937
----- 1936 -----
December 1936
November 1936
October 1936
September 1936
August 1936
July 1936
June 1936
May 1936
April 1936
March 1936
February 1936
January 1936
----- 1935 -----
December 1935
November 1935
October 1935
September 1935
August 1935
July 1935
June 1935
May 1935
April 1935
March 1935
February 1935
January 1935
----- 1934 -----
December 1934
November 1934
October 1934
September 1934
August 1934
July 1934
June 1934
May 1934
April 1934
March 1934
February 1934
January 1934
----- 1933 -----
December 1933
November 1933
October 1933
September 1933
August 1933
July 1933
June 1933
May 1933
April 1933
March 1933
February 1933
January 1933
----- 1932 -----
December 1932
November 1932
October 1932
September 1932
August 1932
July 1932
June 1932
May 1932
April 1932
March 1932
February 1932
January 1932
----- 1931 -----
December 1931
November 1931
October 1931
September 1931
August 1931
July 1931
June 1931
May 1931
April 1931
March 1931
February 1931
January 1931
----- 1930 -----
December 1930
November 1930
October 1930
September 1930
August 1930
July 1930
June 1930
May 1930
April 1930
March 1930
February 1930
January 1930
----- 1929 -----
December 1929
November 1929
October 1929
September 1929
August 1929
July 1929
June 1929
May 1929
April 1929
March 1929
February 1929
January 1929
----- 1928 -----
December 1928
November 1928
October 1928
September 1928
August 1928
July 1928
June 1928
May 1928
April 1928
March 1928
February 1928
January 1928
----- 1927 -----
December 1927
November 1927
October 1927
September 1927
August 1927
July 1927
June 1927
May 1927
April 1927
March 1927
February 1927
January 1927
----- 1926 -----
December 1926
November 1926
October 1926
September 1926
August 1926
July 1926
June 1926
May 1926
April 1926
March 1926
February 1926
January 1926
----- 1925 -----
December 1925
November 1925
October 1925
September 1925
August 1925
July 1925
June 1925
May 1925
April 1925
March 1925
February 1925
January 1925
----- 1924 -----
December 1924
November 1924
October 1924
September 1924
August 1924
July 1924
June 1924
May 1924
April 1924
March 1924
February 1924
January 1924
----- 1923 -----
December 1923
November 1923
October 1923
September 1923
August 1923
July 1923
June 1923
May 1923
April 1923
March 1923
February 1923
January 1923
----- 1922 -----
December 1922
November 1922
October 1922
September 1922
August 1922
July 1922
June 1922
May 1922
April 1922
March 1922
February 1922
January 1922
----- 1921 -----
December 1921
November 1921
October 1921
September 1921
August 1921
July 1921
June 1921
May 1921
April 1921
March 1921
February 1921
January 1921
----- 1920 -----
December 1920
November 1920
October 1920
September 1920
August 1920
July 1920
June 1920
May 1920
April 1920
March 1920
February 1920
January 1920
----- 1919 -----
December 1919
November 1919
October 1919
September 1919
August 1919
July 1919
June 1919
May 1919
April 1919
March 1919
February 1919
January 1919
----- 1918 -----
December 1918
November 1918
October 1918
September 1918
August 1918
July 1918
June 1918
May 1918
April 1918
March 1918
February 1918
January 1918
----- 1917 -----
December 1917
November 1917
October 1917
September 1917
August 1917
July 1917
June 1917
May 1917
April 1917
March 1917
February 1917
January 1917
----- 1916 -----
December 1916
November 1916
October 1916
September 1916
August 1916
July 1916
June 1916
May 1916
April 1916
March 1916
February 1916
January 1916
----- 1915 -----
December 1915
November 1915
October 1915
September 1915
August 1915
July 1915
June 1915
May 1915
April 1915
March 1915
February 1915
January 1915
----- 1914 -----
December 1914
November 1914
October 1914
September 1914
August 1914
July 1914
June 1914
May 1914
April 1914
March 1914
February 1914
January 1914
----- 1913 -----
December 1913
November 1913
October 1913
September 1913
August 1913
July 1913
June 1913
May 1913
April 1913
March 1913
February 1913
January 1913
----- 1912 -----
December 1912
November 1912
October 1912
September 1912
August 1912
July 1912
June 1912
May 1912
April 1912
March 1912
February 1912
January 1912
----- 1911 -----
December 1911
November 1911
October 1911
September 1911
August 1911
July 1911
June 1911
May 1911
April 1911
March 1911
February 1911
January 1911
----- 1910 -----
December 1910
November 1910
October 1910
September 1910
August 1910
July 1910
June 1910
May 1910
April 1910
March 1910
February 1910
January 1910
----- 1909 -----
December 1909
November 1909
October 1909
September 1909
August 1909
July 1909
June 1909
May 1909
April 1909
March 1909
February 1909
January 1909
----- 1908 -----
December 1908
November 1908
October 1908
September 1908
August 1908
July 1908
June 1908
May 1908
April 1908
March 1908
February 1908
January 1908
----- 1907 -----
December 1907
November 1907
October 1907
September 1907
August 1907
July 1907
June 1907
May 1907
April 1907
March 1907
February 1907
January 1907
----- 1906 -----
December 1906
November 1906
October 1906
September 1906
August 1906
July 1906
June 1906
May 1906
April 1906
March 1906
February 1906
January 1906
----- 1905 -----
December 1905
November 1905
October 1905
September 1905
August 1905
July 1905
June 1905
May 1905
April 1905
March 1905
February 1905
January 1905
----- 1904 -----
December 1904
November 1904
October 1904
September 1904
August 1904
July 1904
June 1904
May 1904
April 1904
March 1904
February 1904
January 1904
openbios@openbios.org
13 participants
62 discussions
Start a n
N
ew thread
[PATCH] sparc64 add cpuid to cpu node
by Igor Kovalenko
23 Dec '08
23 Dec '08
Hi! Linux kernel expects at least "cpuid" property in cpu device node, or it halts execution. This patch adds one with dummy "1" value. This allows to make some progress into booting the kernel. Please apply. -- Kind regards, Igor V. Kovalenko
2
7
0
0
r277 - in openbios-devel: arch/amd64 arch/ppc/briq arch/ppc/mol arch/ppc/pearpc arch/ppc/qemu arch/sparc32 arch/sparc64 arch/x86 drivers
by svn@openbios.org
30 Nov '08
30 Nov '08
Author: blueswirl Date: 2008-11-30 14:44:38 +0100 (Sun, 30 Nov 2008) New Revision: 277 Modified: openbios-devel/arch/amd64/lib.c openbios-devel/arch/ppc/briq/briq.c openbios-devel/arch/ppc/mol/main.c openbios-devel/arch/ppc/mol/mol.c openbios-devel/arch/ppc/pearpc/pearpc.c openbios-devel/arch/ppc/qemu/qemu.c openbios-devel/arch/sparc32/boot.c openbios-devel/arch/sparc32/lib.c openbios-devel/arch/sparc64/boot.c openbios-devel/arch/sparc64/lib.c openbios-devel/
…
[View More]
arch/sparc64/openbios.c openbios-devel/arch/x86/lib.c openbios-devel/drivers/adb.c openbios-devel/drivers/cuda.c openbios-devel/drivers/esp.c openbios-devel/drivers/ide.c openbios-devel/drivers/obio.c openbios-devel/drivers/pci.c Log: Change uses of sprintf to snprintf Modified: openbios-devel/arch/amd64/lib.c =================================================================== --- openbios-devel/arch/amd64/lib.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/amd64/lib.c 2008-11-30 13:44:38 UTC (rev 277) @@ -19,12 +19,12 @@ */ int printk( const char *fmt, ... ) { - char *p, buf[512]; /* XXX: no buffer overflow protection... */ + char *p, buf[512]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) Modified: openbios-devel/arch/ppc/briq/briq.c =================================================================== --- openbios-devel/arch/ppc/briq/briq.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/ppc/briq/briq.c 2008-11-30 13:44:38 UTC (rev 277) @@ -62,12 +62,12 @@ int printk( const char *fmt, ... ) { - char *p, buf[1024]; /* XXX: no buffer overflow protection... */ + char *p, buf[1024]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vnsprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) { Modified: openbios-devel/arch/ppc/mol/main.c =================================================================== --- openbios-devel/arch/ppc/mol/main.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/ppc/mol/main.c 2008-11-30 13:44:38 UTC (rev 277) @@ -300,7 +300,8 @@ continue; for( j=0; !entry && j<32; j++ ) { - sprintf( spec, "%s/disk@%x:%d", path, i, j ); + snprintf( spec, sizeof(spec), "%s/disk@%x:%d", + path, i, j ); entry = newworld_load( path, spec, (!type || type==2) ); } if( entry ) { Modified: openbios-devel/arch/ppc/mol/mol.c =================================================================== --- openbios-devel/arch/ppc/mol/mol.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/ppc/mol/mol.c 2008-11-30 13:44:38 UTC (rev 277) @@ -57,12 +57,12 @@ int printk( const char *fmt, ... ) { - char *p, buf[1024]; /* XXX: no buffer overflow protection... */ + char *p, buf[1024]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vnsprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) { Modified: openbios-devel/arch/ppc/pearpc/pearpc.c =================================================================== --- openbios-devel/arch/ppc/pearpc/pearpc.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/ppc/pearpc/pearpc.c 2008-11-30 13:44:38 UTC (rev 277) @@ -64,12 +64,12 @@ int printk( const char *fmt, ... ) { - char *p, buf[1024]; /* XXX: no buffer overflow protection... */ + char *p, buf[1024]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) { Modified: openbios-devel/arch/ppc/qemu/qemu.c =================================================================== --- openbios-devel/arch/ppc/qemu/qemu.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/ppc/qemu/qemu.c 2008-11-30 13:44:38 UTC (rev 277) @@ -62,12 +62,12 @@ int printk( const char *fmt, ... ) { - char *p, buf[1024]; /* XXX: no buffer overflow protection... */ + char *p, buf[1024]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) { @@ -105,7 +105,7 @@ char buf[64]; nvram = (char*)addr + IO_NVRAM_OFFSET; - sprintf(buf, "%s/nvram", path); + snprintf(buf, sizeof(buf), "%s/nvram", path); nvram_init(buf); dnode = find_dev(buf); set_int_property(dnode, "#bytes", IO_NVRAM_SIZE >> 4); Modified: openbios-devel/arch/sparc32/boot.c =================================================================== --- openbios-devel/arch/sparc32/boot.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/sparc32/boot.c 2008-11-30 13:44:38 UTC (rev 277) @@ -107,7 +107,7 @@ if (linux_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) if (aout_load(&sys_info, path, romvec) == LOADER_NOT_SUPPORT) { - sprintf(altpath, "%s:d", path); + snprintf(altpath, sizeof(altpath), "%s:d", path); if (elf_load(&sys_info, altpath, param, romvec) == LOADER_NOT_SUPPORT) Modified: openbios-devel/arch/sparc32/lib.c =================================================================== --- openbios-devel/arch/sparc32/lib.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/sparc32/lib.c 2008-11-30 13:44:38 UTC (rev 277) @@ -19,12 +19,12 @@ */ int printk( const char *fmt, ... ) { - char *p, buf[512]; /* XXX: no buffer overflow protection... */ + char *p, buf[512]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) Modified: openbios-devel/arch/sparc64/boot.c =================================================================== --- openbios-devel/arch/sparc64/boot.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/sparc64/boot.c 2008-11-30 13:44:38 UTC (rev 277) @@ -88,7 +88,7 @@ if (aout_load(&sys_info, path) == LOADER_NOT_SUPPORT) if (fcode_load(path) == LOADER_NOT_SUPPORT) { - sprintf(altpath, "%s:d", path); + snprintf(altpath, sizeof(altpath), "%s:d", path); if (elf_load(&sys_info, altpath, param) == LOADER_NOT_SUPPORT) Modified: openbios-devel/arch/sparc64/lib.c =================================================================== --- openbios-devel/arch/sparc64/lib.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/sparc64/lib.c 2008-11-30 13:44:38 UTC (rev 277) @@ -19,12 +19,12 @@ */ int printk( const char *fmt, ... ) { - char *p, buf[512]; /* XXX: no buffer overflow protection... */ + char *p, buf[512]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/sparc64/openbios.c 2008-11-30 13:44:38 UTC (rev 277) @@ -432,7 +432,7 @@ fword("finish-device"); // MMU node - sprintf(nodebuff, "/%s", cpu->name); + snprintf(nodebuff, sizeof(nodebuff), "/%s", cpu->name); push_str(nodebuff); fword("find-device"); @@ -443,7 +443,7 @@ fword("finish-device"); - sprintf(nodebuff, "/%s/mmu", cpu->name); + snprintf(nodebuff, sizeof(nodebuff), "/%s/mmu", cpu->name); REGISTER_NODE_METHODS(mmu, nodebuff); Modified: openbios-devel/arch/x86/lib.c =================================================================== --- openbios-devel/arch/x86/lib.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/arch/x86/lib.c 2008-11-30 13:44:38 UTC (rev 277) @@ -19,12 +19,12 @@ */ int printk( const char *fmt, ... ) { - char *p, buf[512]; /* XXX: no buffer overflow protection... */ + char *p, buf[512]; va_list args; int i; va_start(args, fmt); - i=vsprintf(buf,fmt,args); + i = vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); for( p=buf; *p; p++ ) Modified: openbios-devel/drivers/adb.c =================================================================== --- openbios-devel/drivers/adb.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/drivers/adb.c 2008-11-30 13:44:38 UTC (rev 277) @@ -494,7 +494,7 @@ my_adb_dev = dev; } - sprintf(buf, "%s/keyboard", path); + snprintf(buf, sizeof(buf), "%s/keyboard", path); REGISTER_NAMED_NODE( keyboard, buf); ph = find_dev(buf); @@ -551,7 +551,7 @@ phandle_t ph, aliases; adb_dev_t *dev = private; - sprintf(buf, "%s/mouse", path); + snprintf(buf, sizeof(buf), "%s/mouse", path); REGISTER_NAMED_NODE( mouse, buf); ph = find_dev(buf); Modified: openbios-devel/drivers/cuda.c =================================================================== --- openbios-devel/drivers/cuda.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/drivers/cuda.c 2008-11-30 13:44:38 UTC (rev 277) @@ -227,7 +227,7 @@ phandle_t ph, aliases; char buf[64]; - sprintf(buf, "%s/rtc", path); + snprintf(buf, sizeof(buf), "%s/rtc", path); REGISTER_NAMED_NODE(rtc, buf); ph = find_dev(buf); @@ -250,7 +250,7 @@ if (cuda == NULL) return NULL; - sprintf(buf, "%s/via-cuda", path); + snprintf(buf, sizeof(buf), "%s/via-cuda", path); REGISTER_NAMED_NODE(ob_cuda, buf); cuda->base = base; @@ -323,7 +323,7 @@ * */ int adb_bus_init (char *path, adb_bus_t *bus) { - char buf[64]; + char buf[64]; uint8_t buffer[ADB_BUF_SIZE]; uint8_t adb_addresses[16] = { 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1, -1, -1, 0, }; @@ -332,7 +332,7 @@ int reloc = 0, next_free = 7; int keep; - sprintf(buf, "%s/adb", path); + snprintf(buf, sizeof(buf), "%s/adb", path); REGISTER_NAMED_NODE( adb, buf); /* Reset the bus */ // ADB_DPRINTF("\n"); Modified: openbios-devel/drivers/esp.c =================================================================== --- openbios-devel/drivers/esp.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/drivers/esp.c 2008-11-30 13:44:38 UTC (rev 277) @@ -507,7 +507,8 @@ push_str("reg"); fword("property"); fword("finish-device"); - sprintf(nodebuff, "/iommu/sbus/espdma/esp/sd@%d,0", id); + snprintf(nodebuff, sizeof(nodebuff), "/iommu/sbus/espdma/esp/sd@%d,0", + id); REGISTER_NODE_METHODS(ob_sd, nodebuff); if (esp->sd[id].media == TYPE_ROM) { counter_ptr = &cdcount; @@ -517,11 +518,12 @@ if (*counter_ptr == 0) { add_alias(nodebuff, esp->sd[id].media_str); } - sprintf(aliasbuff, "%s%d", esp->sd[id].media_str, *counter_ptr); + snprintf(aliasbuff, sizeof(aliasbuff), "%s%d", esp->sd[id].media_str, + *counter_ptr); add_alias(nodebuff, aliasbuff); - sprintf(aliasbuff, "sd(0,%d,0)", id); + snprintf(aliasbuff, sizeof(aliasbuff), "sd(0,%d,0)", id); add_alias(nodebuff, aliasbuff); - sprintf(aliasbuff, "sd(0,%d,0)@0,0", id); + snprintf(aliasbuff, sizeof(aliasbuff), "sd(0,%d,0)@0,0", id); add_alias(nodebuff, aliasbuff); (*counter_ptr)++; } Modified: openbios-devel/drivers/ide.c =================================================================== --- openbios-devel/drivers/ide.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/drivers/ide.c 2008-11-30 13:44:38 UTC (rev 277) @@ -1330,7 +1330,7 @@ ob_ide_identify_drives(chan); - sprintf(nodebuff, nodetemp_chan, i); + snprintf(nodebuff, sizeof(nodebuff), nodetemp_chan, i); REGISTER_NAMED_NODE(ob_ide_ctrl, nodebuff); printk("ide%d: [io ports 0x%x-0x%x,0x%x]\n", i, chan->io_regs[0], chan->io_regs[0] + 7, chan->io_regs[8]); @@ -1357,7 +1357,8 @@ break; } printk("%s]: %s\n", media, drive->model); - sprintf(nodebuff, nodetemp, i, media); + snprintf(nodebuff, sizeof(nodebuff), nodetemp, i, + media); REGISTER_NAMED_NODE(ob_ide, nodebuff); dnode=find_dev(nodebuff); set_int_property(dnode, "reg", j); Modified: openbios-devel/drivers/obio.c =================================================================== --- openbios-devel/drivers/obio.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/drivers/obio.c 2008-11-30 13:44:38 UTC (rev 277) @@ -275,7 +275,8 @@ fword("finish-device"); - sprintf(nodebuff, "/obio/zs@0,%x", (int)offset & 0xffffffff); + snprintf(nodebuff, sizeof(nodebuff), "/obio/zs@0,%x", + (int)offset & 0xffffffff); if (keyboard) { REGISTER_NODE_METHODS(zs_keyboard, nodebuff); } else { Modified: openbios-devel/drivers/pci.c =================================================================== --- openbios-devel/drivers/pci.c 2008-11-30 13:43:27 UTC (rev 276) +++ openbios-devel/drivers/pci.c 2008-11-30 13:44:38 UTC (rev 277) @@ -1098,7 +1098,7 @@ phandle_t ph; cell props[2]; - sprintf(buf, "%s/interrupt-controller", config->path); + snprintf(buf, sizeof(buf), "%s/interrupt-controller", config->path); REGISTER_NAMED_NODE(ob_pci_node, buf); ph = find_dev(buf); @@ -1505,9 +1505,11 @@ dbus=get_cur_dev(); if (pci_dev == NULL || pci_dev->name == NULL) - sprintf(config.path, "%s/pci%x,%x", path, vid, did); + snprintf(config.path, sizeof(config.path), + "%s/pci%x,%x", path, vid, did); else - sprintf(config.path, "%s/%s", path, pci_dev->name); + snprintf(config.path, sizeof(config.path), + "%s/%s", path, pci_dev->name); #ifdef CONFIG_DEBUG_PCI printk("%s - ", config.path); #endif
[View Less]
1
0
0
0
r276 - openbios-devel/config/examples
by svn@openbios.org
30 Nov '08
30 Nov '08
Author: blueswirl Date: 2008-11-30 14:43:27 +0100 (Sun, 30 Nov 2008) New Revision: 276 Modified: openbios-devel/config/examples/cross-sparc32_rules.xml openbios-devel/config/examples/cross-sparc64_rules.xml Log: Use a cross compiler prefix like PPC Modified: openbios-devel/config/examples/cross-sparc32_rules.xml =================================================================== --- openbios-devel/config/examples/cross-sparc32_rules.xml 2008-11-30 13:42:11 UTC (rev 275) +++ openbios-
…
[View More]
devel/config/examples/cross-sparc32_rules.xml 2008-11-30 13:43:27 UTC (rev 276) @@ -12,13 +12,14 @@ HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include -CC := sparc-linux-gcc -AS := sparc-linux-as -AR := sparc-linux-ar -LD := sparc-linux-ld -NM := sparc-linux-nm -STRIP := sparc-linux-strip -RANLIB := sparc-linux-ranlib +TARGET=sparc-elf- +CC := $(TARGET)gcc +AS := $(TARGET)as +AR := $(TARGET)ar +LD := $(TARGET)ld +NM := $(TARGET)nm +STRIP := $(TARGET)strip +RANLIB := $(TARGET)ranlib CFLAGS := -Os -Wall -W -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g CFLAGS+= -Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations Modified: openbios-devel/config/examples/cross-sparc64_rules.xml =================================================================== --- openbios-devel/config/examples/cross-sparc64_rules.xml 2008-11-30 13:42:11 UTC (rev 275) +++ openbios-devel/config/examples/cross-sparc64_rules.xml 2008-11-30 13:43:27 UTC (rev 276) @@ -12,13 +12,14 @@ HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include -CC := sparc64-linux-gcc -AS := sparc64-linux-as -AR := sparc64-linux-ar -LD := sparc64-linux-ld -NM := sparc64-linux-nm -STRIP := sparc64-linux-strip -RANLIB := sparc64-linux-ranlib +TARGET=sparc64-elf- +CC := $(TARGET)gcc +AS := $(TARGET)as +AR := $(TARGET)ar +LD := $(TARGET)ld +NM := $(TARGET)nm +STRIP := $(TARGET)strip +RANLIB := $(TARGET)ranlib CFLAGS := -Os -Wall -W -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -g CFLAGS+= -Wa,-xarch=v9b -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany CFLAGS+= -fno-builtin -nostdlib -ffreestanding
[View Less]
1
0
0
0
r275 - in openbios-devel: include include/openbios kernel
by svn@openbios.org
30 Nov '08
30 Nov '08
Author: blueswirl Date: 2008-11-30 14:42:11 +0100 (Sun, 30 Nov 2008) New Revision: 275 Modified: openbios-devel/include/a.out.h openbios-devel/include/openbios/kernel.h openbios-devel/kernel/bootstrap.c Log: Fix some more warnings Modified: openbios-devel/include/a.out.h =================================================================== --- openbios-devel/include/a.out.h 2008-11-30 11:54:01 UTC (rev 274) +++ openbios-devel/include/a.out.h 2008-11-30 13:42:11 UTC (rev 275) @@ -127,17
…
[View More]
+127,19 @@ #define SEGMENT_SIZE PAGE_SIZE #endif +#if !defined(SEGMENT_SIZE) #ifdef linux #if defined(__i386__) || defined(__mc68000__) #define SEGMENT_SIZE 1024 #elif defined(__sparc__) -#define SEGMENT_SIZE 4096 +#define SEGMENT_SIZE 0x2000 #else -#ifndef SEGMENT_SIZE +#if defined(PAGE_SIZE) #define SEGMENT_SIZE PAGE_SIZE #endif #endif #endif +#endif #define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) Modified: openbios-devel/include/openbios/kernel.h =================================================================== --- openbios-devel/include/openbios/kernel.h 2008-11-30 11:54:01 UTC (rev 274) +++ openbios-devel/include/openbios/kernel.h 2008-11-30 13:42:11 UTC (rev 275) @@ -37,11 +37,14 @@ extern int get_inputbyte( void ); #endif +#ifndef BOOTSTRAP #undef putchar #undef getchar extern int putchar( int ch ); -extern int availchar( void ); extern int getchar( void ); +#endif +extern int availchar( void ); + #endif /* _H_KERNEL */ Modified: openbios-devel/kernel/bootstrap.c =================================================================== --- openbios-devel/kernel/bootstrap.c 2008-11-30 11:54:01 UTC (rev 274) +++ openbios-devel/kernel/bootstrap.c 2008-11-30 13:42:11 UTC (rev 275) @@ -80,7 +80,7 @@ "$include", "$encode-file" }; -void init_trampoline(void) +static void init_trampoline(void) { if (!trampoline) { /* We're using side effects which is to some extent nasty */
[View Less]
1
0
0
0
r274 - in openbios-devel: arch/ppc/qemu arch/sparc32 arch/sparc64 drivers fs/grubfs fs/hfsplus fs/hfsplus/include include include/libc include/openbios kernel libc modules
by svn@openbios.org
30 Nov '08
30 Nov '08
Author: blueswirl Date: 2008-11-30 12:54:01 +0100 (Sun, 30 Nov 2008) New Revision: 274 Modified: openbios-devel/arch/ppc/qemu/console.c openbios-devel/arch/ppc/qemu/init.c openbios-devel/arch/ppc/qemu/qemu.c openbios-devel/arch/ppc/qemu/qemu.h openbios-devel/arch/ppc/qemu/tree.c openbios-devel/arch/sparc32/aoutload.c openbios-devel/arch/sparc32/boot.c openbios-devel/arch/sparc32/boot.h openbios-devel/arch/sparc32/context.c openbios-devel/arch/sparc32/elfload.c
…
[View More]
openbios-devel/arch/sparc32/forthload.c openbios-devel/arch/sparc32/linux_load.c openbios-devel/arch/sparc32/romvec.c openbios-devel/arch/sparc32/sys_info.c openbios-devel/arch/sparc64/aoutload.c openbios-devel/arch/sparc64/boot.c openbios-devel/arch/sparc64/boot.h openbios-devel/arch/sparc64/context.c openbios-devel/arch/sparc64/elfload.c openbios-devel/arch/sparc64/fcodeload.c openbios-devel/arch/sparc64/forthload.c openbios-devel/arch/sparc64/linux_load.c openbios-devel/arch/sparc64/sys_info.c openbios-devel/drivers/adb.c openbios-devel/drivers/adb.h openbios-devel/drivers/cuda.c openbios-devel/drivers/esp.c openbios-devel/drivers/iommu.c openbios-devel/drivers/obio.c openbios-devel/drivers/timer.c openbios-devel/drivers/vga.h openbios-devel/fs/grubfs/fsys_affs.c openbios-devel/fs/grubfs/fsys_ext2fs.c openbios-devel/fs/grubfs/fsys_jfs.c openbios-devel/fs/grubfs/fsys_reiserfs.c openbios-devel/fs/grubfs/fsys_ufs.c openbios-devel/fs/grubfs/fsys_vstafs.c openbios-devel/fs/grubfs/grubfs_fs.c openbios-devel/fs/hfsplus/btree.c openbios-devel/fs/hfsplus/include/libhfsp.h openbios-devel/fs/hfsplus/volume.c openbios-devel/include/elf_boot.h openbios-devel/include/libc/string.h openbios-devel/include/openbios/drivers.h openbios-devel/kernel/dict.c openbios-devel/kernel/internal.c openbios-devel/libc/misc.c openbios-devel/libc/string.c openbios-devel/libc/vsprintf.c openbios-devel/modules/cmdline.c openbios-devel/modules/video.c Log: Fix most warnings from Sparse Modified: openbios-devel/arch/ppc/qemu/console.c =================================================================== --- openbios-devel/arch/ppc/qemu/console.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/console.c 2008-11-30 11:54:01 UTC (rev 274) @@ -58,7 +58,7 @@ static void uart_putchar(int port, unsigned char c) { if (!port) - return -1; + return; while (!(inb(LSR(port)) & 0x20)); outb(c, THR(port)); } @@ -134,6 +134,7 @@ #define openbios_GetFBInfo(x) Qemu_GetFBInfo(x) #include "../../../modules/font_8x16.c" +#undef FONTDATAMAX #include "../../../modules/video.c" #include "../../../modules/console.c" Modified: openbios-devel/arch/ppc/qemu/init.c =================================================================== --- openbios-devel/arch/ppc/qemu/init.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/init.c 2008-11-30 11:54:01 UTC (rev 274) @@ -47,7 +47,7 @@ ARCH_HEATHROW, }; -pci_arch_t known_arch[] = { +static pci_arch_t known_arch[] = { [ARCH_PREP] = { "PREP", 0x1057, 0x4801, 0x80800000, 0x800c0000, 0x80000000, 0x00100000, 0xf0000000, 0x10000000, 0x80000000, 0x00010000, 0x00000000, 0x00400000, Modified: openbios-devel/arch/ppc/qemu/qemu.c =================================================================== --- openbios-devel/arch/ppc/qemu/qemu.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/qemu.c 2008-11-30 11:54:01 UTC (rev 274) @@ -20,6 +20,7 @@ #include "openbios/kernel.h" #include "openbios/nvram.h" #include "openbios/bindings.h" +#include "openbios/drivers.h" #include "libc/vsprintf.h" #include "libc/string.h" #include "libc/byteorder.h" @@ -111,7 +112,7 @@ set_property(dnode, "compatible", "nvram,flash", 12); props[0] = __cpu_to_be32(IO_NVRAM_OFFSET); props[1] = __cpu_to_be32(IO_NVRAM_SIZE); - set_property(dnode, "reg", &props, sizeof(props)); + set_property(dnode, "reg", (char *)&props, sizeof(props)); set_property(dnode, "device_type", "nvram", 6); chosen = find_dev("/chosen"); Modified: openbios-devel/arch/ppc/qemu/qemu.h =================================================================== --- openbios-devel/arch/ppc/qemu/qemu.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/qemu.h 2008-11-30 11:54:01 UTC (rev 274) @@ -21,6 +21,9 @@ extern int console_draw_str( const char *str ); +/* console.c */ +int serial_init(void); + #include "kernel.h" #endif /* _H_QEMU */ Modified: openbios-devel/arch/ppc/qemu/tree.c =================================================================== --- openbios-devel/arch/ppc/qemu/tree.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/ppc/qemu/tree.c 2008-11-30 11:54:01 UTC (rev 274) @@ -16,6 +16,7 @@ #include "openbios/config.h" #include "openbios/bindings.h" +#include "qemu.h" void devtree_init( void ) { Modified: openbios-devel/arch/sparc32/aoutload.c =================================================================== --- openbios-devel/arch/sparc32/aoutload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/aoutload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -51,8 +51,7 @@ return 0; } -int aout_load(struct sys_info *info, const char *filename, const char *cmdline, - const void *romvec) +int aout_load(struct sys_info *info, const char *filename, const void *romvec) { int retval = -1; int image_retval; @@ -60,7 +59,7 @@ unsigned long start, size; unsigned int offset; - image_name = image_version = 0; + image_name = image_version = NULL; if (!file_open(filename)) goto out; Modified: openbios-devel/arch/sparc32/boot.c =================================================================== --- openbios-devel/arch/sparc32/boot.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/boot.c 2008-11-30 11:54:01 UTC (rev 274) @@ -6,6 +6,7 @@ #include "openbios/bindings.h" #include "openbios/elfload.h" #include "openbios/nvram.h" +#include "openbios/drivers.h" #include "libc/diskio.h" #include "libc/vsprintf.h" #include "sys_info.h" @@ -103,14 +104,17 @@ printk("without parameters.\n"); if (elf_load(&sys_info, path, param, romvec) == LOADER_NOT_SUPPORT) - if (linux_load(&sys_info, path, param, romvec) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, path, param, romvec) == LOADER_NOT_SUPPORT) { + if (linux_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) + if (aout_load(&sys_info, path, romvec) == LOADER_NOT_SUPPORT) { sprintf(altpath, "%s:d", path); - if (elf_load(&sys_info, altpath, param, romvec) == LOADER_NOT_SUPPORT) - if (linux_load(&sys_info, altpath, param, romvec) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, altpath, param, romvec) == LOADER_NOT_SUPPORT) + if (elf_load(&sys_info, altpath, param, romvec) + == LOADER_NOT_SUPPORT) + if (linux_load(&sys_info, altpath, param) + == LOADER_NOT_SUPPORT) + if (aout_load(&sys_info, altpath, romvec) + == LOADER_NOT_SUPPORT) printk("Unsupported image format\n"); } Modified: openbios-devel/arch/sparc32/boot.h =================================================================== --- openbios-devel/arch/sparc32/boot.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/boot.h 2008-11-30 11:54:01 UTC (rev 274) @@ -6,25 +6,35 @@ * the copyright and warranty status of this work. */ -int forth_load(struct sys_info *info, const char *filename, const char *cmdline); +// forthload.c +int forth_load(const char *filename); + +// elfload.c int elf_load(struct sys_info *, const char *filename, const char *cmdline, const void *romvec); -int aout_load(struct sys_info *, const char *filename, const char *cmdline, - const void *romvec); -int linux_load(struct sys_info *, const char *filename, const char *cmdline, - const void *romvec); +// aout_load.c +int aout_load(struct sys_info *info, const char *filename, const void *romvec); + +// linux_load.c +int linux_load(struct sys_info *info, const char *file, const char *cmdline); + +// context.c +extern struct context *__context; unsigned int start_elf(unsigned long entry_point, unsigned long param); +// romvec.c void *init_openprom(unsigned long memsize, const char *path); + +// boot.c +extern struct sys_info sys_info; void boot(void); -extern struct sys_info sys_info; -extern uint32_t kernel_image; -extern uint32_t kernel_size; -extern uint32_t qemu_cmdline; -extern uint32_t cmdline_size; -extern char boot_device; +// sys_info.c extern unsigned int qemu_mem_size; + +// romvec.c extern struct linux_arguments_v0 obp_arg; + +// openbios.c extern int qemu_machine_type; Modified: openbios-devel/arch/sparc32/context.c =================================================================== --- openbios-devel/arch/sparc32/context.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/context.c 2008-11-30 11:54:01 UTC (rev 274) @@ -22,7 +22,7 @@ * It is placed at the bottom of our stack, and loaded by assembly routine * to start us up. */ -struct context main_ctx = { +static struct context main_ctx = { .regs[REG_SP] = (uint32_t) &_estack - 96, .pc = (uint32_t) start_main, .npc = (uint32_t) start_main + 4, Modified: openbios-devel/arch/sparc32/elfload.c =================================================================== --- openbios-devel/arch/sparc32/elfload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/elfload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -26,7 +26,7 @@ if (alloc_size < nmemb || alloc_size < size) { printf("calloc overflow: %u, %u\n", nmemb, size); - return 0; + return NULL; } mem = malloc(alloc_size); @@ -314,7 +314,7 @@ int image_retval; unsigned int offset; - image_name = image_version = 0; + image_name = image_version = NULL; if (!file_open(filename)) goto out; Modified: openbios-devel/arch/sparc32/forthload.c =================================================================== --- openbios-devel/arch/sparc32/forthload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/forthload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -16,7 +16,8 @@ #define debug printk static char *forthtext=NULL; -int forth_load(struct sys_info *info, const char *filename, const char *cmdline) + +int forth_load(const char *filename) { char magic[2]; unsigned long forthsize; Modified: openbios-devel/arch/sparc32/linux_load.c =================================================================== --- openbios-devel/arch/sparc32/linux_load.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/linux_load.c 2008-11-30 11:54:01 UTC (rev 274) @@ -156,7 +156,7 @@ uint8_t reserved17[1792]; /* 0x900 - 0x1000 */ }; -uint64_t forced_memsize; +static uint64_t forced_memsize; /* Load the first part the file and check if it's Linux */ static uint32_t load_linux_header(struct linux_header *hdr) @@ -293,14 +293,14 @@ unsigned long len; int k_len; int to_kern; - char *initrd = 0; + char *initrd = NULL; int toolong = 0; forced_memsize = 0; if (!orig_cmdline) { - *kern_cmdline = 0; - return 0; + *kern_cmdline = '\0'; + return NULL; } k_len = 0; @@ -327,7 +327,7 @@ val = sep + 1; len = end - val; } else { - val = 0; + val = NULL; len = 0; } @@ -434,8 +434,8 @@ return kern_size; } -static int load_initrd(struct linux_header *hdr, struct sys_info *info, - uint32_t kern_end, struct linux_params *params, const char *initrd_file) +static int load_initrd(struct linux_header *hdr, uint32_t kern_end, + struct linux_params *params, const char *initrd_file) { uint32_t max; uint32_t start, end, size; @@ -549,7 +549,7 @@ } /* Start Linux */ -static int start_linux(uint32_t kern_addr, struct linux_params *params) +static int start_linux(uint32_t kern_addr) { struct context *ctx; //extern int cursor_x, cursor_y; @@ -579,13 +579,12 @@ return ctx->regs[REG_O0]; } -int linux_load(struct sys_info *info, const char *file, const char *cmdline, - const void *romvec) +int linux_load(struct sys_info *info, const char *file, const char *cmdline) { struct linux_header hdr; struct linux_params *params; uint32_t kern_addr, kern_size; - char *initrd_file = 0; + char *initrd_file = NULL; if (!file_open(file)) return -1; @@ -610,7 +609,7 @@ } if (initrd_file) { - if (load_initrd(&hdr, info, kern_addr+kern_size, params, initrd_file) + if (load_initrd(&hdr, kern_addr+kern_size, params, initrd_file) != 0) { free(initrd_file); return -1; @@ -620,6 +619,6 @@ hardware_setup(); - start_linux(kern_addr, params); + start_linux(kern_addr); return 0; } Modified: openbios-devel/arch/sparc32/romvec.c =================================================================== --- openbios-devel/arch/sparc32/romvec.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/romvec.c 2008-11-30 11:54:01 UTC (rev 274) @@ -257,18 +257,14 @@ static void obp_reboot(char *str) { - extern volatile unsigned int *reset_reg; - printk("rebooting (%s)\n", str); *reset_reg = 1; printk("reboot failed\n"); for (;;) {} } -extern volatile unsigned char *power_reg; static void obp_abort(void) { - printk("abort, power off\n"); *power_reg = 1; printk("power off failed\n"); Modified: openbios-devel/arch/sparc32/sys_info.c =================================================================== --- openbios-devel/arch/sparc32/sys_info.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc32/sys_info.c 2008-11-30 11:54:01 UTC (rev 274) @@ -3,6 +3,7 @@ #include "elf_boot.h" #include "sys_info.h" #include "context.h" +#include "boot.h" #define printf printk #ifdef CONFIG_DEBUG_BOOT @@ -20,7 +21,6 @@ int i; unsigned long long total = 0; struct memrange *mmap; - extern struct elf_image_note elf_image_notes; /* Pick up paramters given by bootloader to us */ //info->boot_type = boot_ctx->eax; Modified: openbios-devel/arch/sparc64/aoutload.c =================================================================== --- openbios-devel/arch/sparc64/aoutload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/aoutload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -52,7 +52,7 @@ return 0; } -int aout_load(struct sys_info *info, const char *filename, const char *cmdline) +int aout_load(struct sys_info *info, const char *filename) { int retval = -1; int image_retval; @@ -60,7 +60,7 @@ unsigned long start, size; unsigned int offset; - image_name = image_version = 0; + image_name = image_version = NULL; if (!file_open(filename)) goto out; Modified: openbios-devel/arch/sparc64/boot.c =================================================================== --- openbios-devel/arch/sparc64/boot.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/boot.c 2008-11-30 11:54:01 UTC (rev 274) @@ -85,9 +85,8 @@ if (elf_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) if (linux_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, path, param) == LOADER_NOT_SUPPORT) - if (fcode_load(&sys_info, path, param) - == LOADER_NOT_SUPPORT) { + if (aout_load(&sys_info, path) == LOADER_NOT_SUPPORT) + if (fcode_load(path) == LOADER_NOT_SUPPORT) { sprintf(altpath, "%s:d", path); @@ -95,9 +94,9 @@ == LOADER_NOT_SUPPORT) if (linux_load(&sys_info, altpath, param) == LOADER_NOT_SUPPORT) - if (aout_load(&sys_info, altpath, param) + if (aout_load(&sys_info, altpath) == LOADER_NOT_SUPPORT) - if (fcode_load(&sys_info, path, param) + if (fcode_load(altpath) == LOADER_NOT_SUPPORT) printk("Unsupported image format\n"); } Modified: openbios-devel/arch/sparc64/boot.h =================================================================== --- openbios-devel/arch/sparc64/boot.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/boot.h 2008-11-30 11:54:01 UTC (rev 274) @@ -6,21 +6,32 @@ * the copyright and warranty status of this work. */ -int forth_load(struct sys_info *info, const char *filename, const char *cmdline); +// forthload.c +int forth_load(const char *filename); + +// elfload.c int elf_load(struct sys_info *info, const char *filename, const char *cmdline); + +// aout_load.c +int aout_load(struct sys_info *info, const char *filename); + +// linux_load.c int linux_load(struct sys_info *info, const char *file, const char *cmdline); -int aout_load(struct sys_info *info, const char *filename, const char *cmdline); -int fcode_load(struct sys_info *info, const char *filename, - const char *cmdline); +// fcodeload.c +int fcode_load(const char *filename); + +// context.c uint64_t start_elf(uint64_t entry_point, uint64_t param); -void boot(void); - +// boot.c +extern struct sys_info sys_info; extern uint64_t kernel_image; extern uint64_t kernel_size; extern uint64_t qemu_cmdline; extern uint64_t cmdline_size; extern char boot_device; -extern struct sys_info sys_info; +void boot(void); + +// console.c void ob_su_init(uint64_t base, uint64_t offset, int intr); Modified: openbios-devel/arch/sparc64/context.c =================================================================== --- openbios-devel/arch/sparc64/context.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/context.c 2008-11-30 11:54:01 UTC (rev 274) @@ -22,7 +22,7 @@ * It is placed at the bottom of our stack, and loaded by assembly routine * to start us up. */ -struct context main_ctx = { +static struct context main_ctx = { .regs[REG_SP] = (uint64_t) &_estack - 2047 - 96, .pc = (uint64_t) start_main, .npc = (uint64_t) start_main + 4, Modified: openbios-devel/arch/sparc64/elfload.c =================================================================== --- openbios-devel/arch/sparc64/elfload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/elfload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -26,7 +26,7 @@ if (alloc_size < nmemb || alloc_size < size) { printf("calloc overflow: %u, %u\n", nmemb, size); - return 0; + return NULL; } mem = malloc(alloc_size); @@ -313,7 +313,7 @@ int image_retval; unsigned int offset; - image_name = image_version = 0; + image_name = image_version = NULL; if (!file_open(filename)) goto out; Modified: openbios-devel/arch/sparc64/fcodeload.c =================================================================== --- openbios-devel/arch/sparc64/fcodeload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/fcodeload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -11,8 +11,7 @@ #define printf printk #define debug printk -int fcode_load(struct sys_info *info, const char *filename, - const char *cmdline) +int fcode_load(const char *filename) { int retval = -1; uint8_t fcode_header[8]; Modified: openbios-devel/arch/sparc64/forthload.c =================================================================== --- openbios-devel/arch/sparc64/forthload.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/forthload.c 2008-11-30 11:54:01 UTC (rev 274) @@ -16,7 +16,7 @@ #define debug printk static char *forthtext=NULL; -int forth_load(struct sys_info *info, const char *filename, const char *cmdline) +int forth_load(const char *filename) { char magic[2]; unsigned long forthsize; Modified: openbios-devel/arch/sparc64/linux_load.c =================================================================== --- openbios-devel/arch/sparc64/linux_load.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/linux_load.c 2008-11-30 11:54:01 UTC (rev 274) @@ -156,7 +156,7 @@ uint8_t reserved17[1792]; /* 0x900 - 0x1000 */ }; -uint64_t forced_memsize; +static uint64_t forced_memsize; /* Load the first part the file and check if it's Linux */ static uint32_t load_linux_header(struct linux_header *hdr) @@ -293,14 +293,14 @@ unsigned long len; int k_len; int to_kern; - char *initrd = 0; + char *initrd = NULL; int toolong = 0; forced_memsize = 0; if (!orig_cmdline) { - *kern_cmdline = 0; - return 0; + *kern_cmdline = '\0'; + return NULL; } k_len = 0; @@ -327,7 +327,7 @@ val = sep + 1; len = end - val; } else { - val = 0; + val = NULL; len = 0; } @@ -584,7 +584,7 @@ struct linux_header hdr; struct linux_params *params; uint32_t kern_addr, kern_size; - char *initrd_file = 0; + char *initrd_file = NULL; if (!file_open(file)) return -1; Modified: openbios-devel/arch/sparc64/sys_info.c =================================================================== --- openbios-devel/arch/sparc64/sys_info.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/arch/sparc64/sys_info.c 2008-11-30 11:54:01 UTC (rev 274) @@ -21,7 +21,6 @@ int i; unsigned long long total = 0; struct memrange *mmap; - extern struct elf_image_note elf_image_notes; /* Pick up paramters given by bootloader to us */ //info->boot_type = boot_ctx->eax; Modified: openbios-devel/drivers/adb.c =================================================================== --- openbios-devel/drivers/adb.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/adb.c 2008-11-30 11:54:01 UTC (rev 274) @@ -39,8 +39,6 @@ #define ADB_DPRINTF(fmt, args...) do { } while (0) #endif -static void adb_read(void); - DECLARE_UNNAMED_NODE( keyboard, INSTALL_OPEN, sizeof(int)); static void @@ -447,7 +445,6 @@ int next_key; }; -static adb_kbd_t *my_adb_kbd = NULL; static adb_dev_t *my_adb_dev = NULL; static int adb_kbd_read (void *private) @@ -504,7 +501,7 @@ set_property(ph, "device_type", "keyboard", 9); props[0] = __cpu_to_be32(dev->addr); - set_property(ph, "reg", &props, sizeof(props)); + set_property(ph, "reg", (char *)&props, sizeof(props)); aliases = find_dev("/aliases"); set_property(aliases, "adb-keyboard", buf, strlen(buf) + 1); @@ -542,14 +539,12 @@ { } -static void mouse_read(void); - NODE_METHODS( mouse ) = { { "open", mouse_open }, { "close", mouse_close }, }; -void *adb_mouse_new (char *path, void *private) +void adb_mouse_new (char *path, void *private) { char buf[64]; int props[1]; @@ -563,7 +558,7 @@ set_property(ph, "device_type", "mouse", 6); props[0] = __cpu_to_be32(dev->addr); - set_property(ph, "reg", &props, sizeof(props)); + set_property(ph, "reg", (char *)&props, sizeof(props)); set_int_property(ph, "#buttons", 3); aliases = find_dev("/aliases"); Modified: openbios-devel/drivers/adb.h =================================================================== --- openbios-devel/drivers/adb.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/adb.h 2008-11-30 11:54:01 UTC (rev 274) @@ -101,5 +101,6 @@ void *adb_kbd_new (char *path, void *private); +void adb_mouse_new (char *path, void *private); #endif /* !defined(__OHW_ADB_H__) */ Modified: openbios-devel/drivers/cuda.c =================================================================== --- openbios-devel/drivers/cuda.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/cuda.c 2008-11-30 11:54:01 UTC (rev 274) @@ -171,7 +171,7 @@ props[0] = __cpu_to_be32(IO_CUDA_OFFSET); props[1] = __cpu_to_be32(IO_CUDA_SIZE); - set_property(ph, "reg", &props, sizeof(props)); + set_property(ph, "reg", (char *)&props, sizeof(props)); set_int_property(ph, "interrupt-parent", pic_handle); // HEATHROW set_int_property(ph, "interrupts", 0x12); Modified: openbios-devel/drivers/esp.c =================================================================== --- openbios-devel/drivers/esp.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/esp.c 2008-11-30 11:54:01 UTC (rev 274) @@ -62,7 +62,7 @@ sd_private_t sd[8]; } esp_private_t; -esp_private_t *global_esp; +static esp_private_t *global_esp; /* DECLARE data structures for the nodes. */ DECLARE_UNNAMED_NODE(ob_sd, INSTALL_OPEN, sizeof(sd_private_t *)); @@ -304,7 +304,7 @@ { espdma->regs = (void *)map_io(base + (uint64_t)offset, 0x10); - if (espdma->regs == 0) { + if (espdma->regs == NULL) { DPRINTF("espdma_init: cannot map registers\n"); return -1; } @@ -437,7 +437,7 @@ /* Get the IO region */ esp->ll = (void *)map_io(base + (uint64_t)espoffset, sizeof(struct esp_regs)); - if (esp->ll == 0) { + if (esp->ll == NULL) { DPRINTF("Can't map ESP registers\n"); return -1; } Modified: openbios-devel/drivers/iommu.c =================================================================== --- openbios-devel/drivers/iommu.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/iommu.c 2008-11-30 11:54:01 UTC (rev 274) @@ -41,7 +41,7 @@ }; struct mem cmem; /* Current memory, virtual */ -struct mem cio; /* Current I/O space */ +static struct mem cio; /* Current I/O space */ unsigned int va_shift; @@ -59,7 +59,7 @@ struct mem bmap; }; -struct iommu ciommu; +static struct iommu ciommu; static struct iommu_regs *regs; static void iommu_init(struct iommu *t, uint64_t base); @@ -95,7 +95,7 @@ if ((unsigned long)p >= (unsigned long)t->uplim || (unsigned long)p + size > (unsigned long)t->uplim) - return 0; + return NULL; t->curp = p + size; return p; @@ -106,7 +106,7 @@ { char *p; - if ((p = mem_alloc(t, size, align)) != 0) + if ((p = mem_alloc(t, size, align)) != NULL) memset(p, 0, size); return p; @@ -124,7 +124,7 @@ if (alloc) { p = mem_zalloc(&cmem, SRMMU_PTRS_PER_PMD * sizeof(int), SRMMU_PTRS_PER_PMD * sizeof(int)); - if (p == 0) + if (p == NULL) return -1; pte = SRMMU_ET_PTD | ((va2pa((unsigned long)p)) >> 4); l1[(va >> SRMMU_PGDIR_SHIFT) & (SRMMU_PTRS_PER_PGD - 1)] = pte; @@ -141,7 +141,7 @@ if (alloc) { p = mem_zalloc(&cmem, SRMMU_PTRS_PER_PTE * sizeof(void *), SRMMU_PTRS_PER_PTE * sizeof(void *)); - if (p == 0) + if (p == NULL) return -2; pte = SRMMU_ET_PTD | ((va2pa((unsigned int)p)) >> 4); *(uint32_t *)pa2va(pa) = pte; @@ -199,7 +199,7 @@ pa &= ~(PAGE_SIZE - 1); va = mem_alloc(&cio, npages * PAGE_SIZE, PAGE_SIZE); - if (va == 0) + if (va == NULL) return va; mva = (unsigned int) va; @@ -435,12 +435,12 @@ npages = (size + (PAGE_SIZE-1)) / PAGE_SIZE; va = mem_alloc(&cmem, npages * PAGE_SIZE, PAGE_SIZE); - if (va == 0) - return 0; + if (va == NULL) + return NULL; ba = (unsigned int)mem_alloc(&t->bmap, npages * PAGE_SIZE, PAGE_SIZE); if (ba == 0) - return 0; + return NULL; pa = (unsigned int)va2pa((unsigned long)va); @@ -484,7 +484,7 @@ unsigned int tmp; regs = map_io(base, IOMMU_REGS); - if (regs == 0) { + if (regs == NULL) { DPRINTF("Cannot map IOMMU\n"); for (;;) { } } @@ -505,7 +505,7 @@ /* Allocate IOMMU page table */ /* Thremendous alignment causes great waste... */ ptsize = (t->vasize/PAGE_SIZE) * sizeof(int); - if ((ptab = mem_zalloc(&cmem, ptsize, ptsize)) == 0) { + if ((ptab = mem_zalloc(&cmem, ptsize, ptsize)) == NULL) { DPRINTF("Cannot allocate IOMMU table [0x%x]\n", ptsize); for (;;) { } } Modified: openbios-devel/drivers/obio.c =================================================================== --- openbios-devel/drivers/obio.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/obio.c 2008-11-30 11:54:01 UTC (rev 274) @@ -325,7 +325,7 @@ } static unsigned char *nvram; -ohwcfg_v3_t nv_info; +static ohwcfg_v3_t nv_info; #define NVRAM_OB_START (sizeof(ohwcfg_v3_t) + sizeof(struct sparc_arch_cfg)) #define NVRAM_OB_SIZE ((NVRAM_IDPROM - NVRAM_OB_START) & ~15) @@ -807,15 +807,6 @@ static void ob_nvram_init(uint64_t base, uint64_t offset) { - extern uint32_t kernel_image; - extern uint32_t kernel_size; - extern uint32_t qemu_cmdline; - extern uint32_t cmdline_size; - extern char boot_device; - extern char obp_stdin, obp_stdout; - extern const char *obp_stdin_path, *obp_stdout_path; - extern uint16_t graphic_depth; - const char *stdin, *stdout; unsigned int i; char nographic; Modified: openbios-devel/drivers/timer.c =================================================================== --- openbios-devel/drivers/timer.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/timer.c 2008-11-30 11:54:01 UTC (rev 274) @@ -79,7 +79,7 @@ * TODO: pass via lb table */ -unsigned long get_timer_freq() +unsigned long get_timer_freq(void) { return 100000000 / 4; } Modified: openbios-devel/drivers/vga.h =================================================================== --- openbios-devel/drivers/vga.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/drivers/vga.h 2008-11-30 11:54:01 UTC (rev 274) @@ -14,6 +14,8 @@ #ifndef VGA_H_INCL #define VGA_H_INCL 1 +#include "video_subr.h" + //#include <cpu/p5/io.h> #define u8 unsigned char @@ -226,9 +228,4 @@ __u32 vmode; /* interlaced etc */ __u32 reserved[6]; /* Reserved for future compatibility */ }; - -void vga_set_gmode (void); -void vga_set_amode (void); -void vga_font_load(unsigned char *vidmem, const unsigned char *font, int height, - int num_chars); #endif Modified: openbios-devel/fs/grubfs/fsys_affs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_affs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_affs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -235,10 +235,10 @@ #define rdsk(x) ((struct RigidDiskBlock *)(x)->blockbuffer) #define part(x) ((struct PartitionBlock *)(x)->blockbuffer) -struct FSysBuffer *fsysb; -int blockoffset; /* offset if there is an embedded RDB partition */ -int rootb; /* block number of root block */ -int rdbb; /* block number of rdb block */ +static struct FSysBuffer *fsysb; +static int blockoffset; /* offset if there is an embedded RDB partition */ +static int rootb; /* block number of root block */ +static int rdbb; /* block number of rdb block */ static void initCache(void) { @@ -357,7 +357,7 @@ { disk_read_func = disk_read_hook; cblock = getBlock(block); - disk_read_func = 0; + disk_read_func = NULL; block = AROS_BE2LONG(extensionBlock(cblock)->extension); togo--; } @@ -383,7 +383,7 @@ len=fsysb->file.filesize-fsysb->file.current.offset; disk_read_func = disk_read_hook; cblock = getBlock(fsysb->file.current.block); - disk_read_func = 0; + disk_read_func = NULL; while (len) { disk_read_func = disk_read_hook; @@ -427,7 +427,7 @@ fsysb->file.current.byte = 0; fsysb->file.current.filekey--; } - disk_read_func = 0; + disk_read_func = NULL; len -= size; readbytes += size; } @@ -580,10 +580,9 @@ return 0; } +#ifndef STAGE1_5 static void checkPossibility(char *filename, char *bstr) { - -#ifndef STAGE1_5 char cstr[32]; if (noCaseStrCmp(filename, bstr, 1)<=0) @@ -594,8 +593,10 @@ cstr[bstr[0]]=0; print_a_completion(cstr); } +} +#else +#define checkPossibility(a, b) do { } while(0) #endif -} int affs_dir(char *dirname) { Modified: openbios-devel/fs/grubfs/fsys_ext2fs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -468,7 +468,7 @@ devread (map * (EXT2_BLOCK_SIZE (SUPERBLOCK) / DEV_BSIZE), offset, size, buf); - disk_read_func = 0; + disk_read_func = NULL; buf += size; len -= size; Modified: openbios-devel/fs/grubfs/fsys_jfs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_jfs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_jfs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -53,8 +53,8 @@ #define dtroot ((dtroot_t *)(&inode->di_btroot)) static ldtentry_t de_always[2] = { - {1, -1, 2, {'.', '.'}}, - {1, -1, 1, {'.'}} + {1, -1, 2, {'.', '.'}, 0}, + {1, -1, 1, {'.'}, 0} }; static int Modified: openbios-devel/fs/grubfs/fsys_reiserfs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_reiserfs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_reiserfs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -691,12 +691,12 @@ blockNr, depth); #endif /* REISERDEBUG */ if (! block_read (blockNr, 0, INFO->blocksize, cache)) - return 0; + return NULL; /* Make sure it has the right node level */ if (BLOCKHEAD (cache)->blk_level != depth) { errnum = ERR_FSYS_CORRUPT; - return 0; + return NULL; } INFO->blocks[depth] = blockNr; Modified: openbios-devel/fs/grubfs/fsys_ufs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_ufs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_ufs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -94,7 +94,7 @@ char sbbuf[SBLOCKSIZE]; /* superblock */ char secbuf[DEV_BSIZE]; /* for MBR/disklabel */ }; -struct dmadat *dmadat = (struct dmadat*)FSYS_BUF; +static struct dmadat *dmadat = (struct dmadat*)FSYS_BUF; #define SUPERBLOCK ((struct fs*)dmadat->sbbuf) Modified: openbios-devel/fs/grubfs/fsys_vstafs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -74,7 +74,7 @@ if (FILE_INFO->type != 2) { errnum = ERR_FILE_NOT_FOUND; - return 0; + return NULL; } a1 = FILE_INFO->blocks; @@ -105,8 +105,8 @@ } else { - /* errnum =ERR_FILE_NOT_FOUND; */ - return 0; + /* errnum =ERR_FILE_NOT_FOUND; */ + return NULL; } } Modified: openbios-devel/fs/grubfs/grubfs_fs.c =================================================================== --- openbios-devel/fs/grubfs/grubfs_fs.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/grubfs/grubfs_fs.c 2008-11-30 11:54:01 UTC (rev 274) @@ -57,34 +57,34 @@ static const struct fsys_entry fsys_table[] = { # ifdef CONFIG_FSYS_FAT - {"fat", fat_mount, fat_read, fat_dir, 0, 0}, + {"fat", fat_mount, fat_read, fat_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_EXT2FS - {"ext2fs", ext2fs_mount, ext2fs_read, ext2fs_dir, 0, 0}, + {"ext2fs", ext2fs_mount, ext2fs_read, ext2fs_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_MINIX - {"minix", minix_mount, minix_read, minix_dir, 0, 0}, + {"minix", minix_mount, minix_read, minix_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_REISERFS - {"reiserfs", reiserfs_mount, reiserfs_read, reiserfs_dir, 0, reiserfs_embed}, + {"reiserfs", reiserfs_mount, reiserfs_read, reiserfs_dir, NULL, reiserfs_embed}, # endif # ifdef CONFIG_FSYS_JFS - {"jfs", jfs_mount, jfs_read, jfs_dir, 0, jfs_embed}, + {"jfs", jfs_mount, jfs_read, jfs_dir, NULL, jfs_embed}, # endif # ifdef CONFIG_FSYS_XFS - {"xfs", xfs_mount, xfs_read, xfs_dir, 0, 0}, + {"xfs", xfs_mount, xfs_read, xfs_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_UFS - {"ufs", ufs_mount, ufs_read, ufs_dir, 0, ufs_embed}, + {"ufs", ufs_mount, ufs_read, ufs_dir, NULL, ufs_embed}, # endif # ifdef CONFIG_FSYS_ISO9660 - {"iso9660", iso9660_mount, iso9660_read, iso9660_dir, 0, 0}, + {"iso9660", iso9660_mount, iso9660_read, iso9660_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_NTFS - {"ntfs", ntfs_mount, ntfs_read, ntfs_dir, 0, 0}, + {"ntfs", ntfs_mount, ntfs_read, ntfs_dir, NULL, NULL}, # endif # ifdef CONFIG_FSYS_AFFS - {"affs", affs_mount, affs_read, affs_dir, 0, 0}, + {"affs", affs_mount, affs_read, affs_dir, NULL, NULL}, # endif }; @@ -157,9 +157,10 @@ grubfs_file_read( file_desc_t *fd, void *buf, size_t count ) { grubfile_t *file = (grubfile_t*)fd; - curfs = (grubfs_t *)file->fs->fs_data; - int ret; + int ret; + curfs = (grubfs_t *)file->fs->fs_data; + filepos=file->pos; filemax=file->len; @@ -186,8 +187,9 @@ open_path( fs_ops_t *fs, const char *path ) { grubfile_t *ret = NULL; + char *s = (char *)path; + curfs = (grubfs_t *)fs->fs_data; - char *s=(char *)path; while(*s) { if(*s=='\\') *s='/'; Modified: openbios-devel/fs/hfsplus/btree.c =================================================================== --- openbios-devel/fs/hfsplus/btree.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/hfsplus/btree.c 2008-11-30 11:54:01 UTC (rev 274) @@ -114,12 +114,6 @@ { return (node_buf*) (cache->buffers + (i * cache->nodebufsize)); } - -/* flush the cache NYI */ -static void node_cache_flush(node_cache* cache) -{ - // NYI -} /* flush the node at index */ static void node_cache_flush_node(node_cache* cache, int index) @@ -132,7 +126,6 @@ { if (!cache->entries) // not (fully) intialized ? return; - node_cache_flush(cache); free(cache->entries); } Modified: openbios-devel/fs/hfsplus/include/libhfsp.h =================================================================== --- openbios-devel/fs/hfsplus/include/libhfsp.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/hfsplus/include/libhfsp.h 2008-11-30 11:54:01 UTC (rev 274) @@ -27,7 +27,6 @@ # include "hfs.h" # include "hfsp.h" -extern int errno; /* Last error is eventually found here */ extern const char *hfsp_error; Modified: openbios-devel/fs/hfsplus/volume.c =================================================================== --- openbios-devel/fs/hfsplus/volume.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/fs/hfsplus/volume.c 2008-11-30 11:54:01 UTC (rev 274) @@ -114,8 +114,8 @@ * * ToDo: add more consitency checks. */ -static int -volume_readbuf(volume * vol, hfsp_vh* vh, char * p) +static int +volume_readbuf(hfsp_vh* vh, char * p) { if( (vh->signature = bswabU16_inc(p)) != HFSP_VOLHEAD_SIG) HFSP_ERROR(-1, "This is not a HFS+ volume"); @@ -159,7 +159,7 @@ if( volume_readinbuf(vol, buf, block)) return -1; - return volume_readbuf(vol, vh, buf); + return volume_readbuf(vh, buf); } /* Find out wether the volume is wrapped and unwrap it eventually */ @@ -200,7 +200,7 @@ } else if( signature == HFSP_VOLHEAD_SIG) { /* Native HFS+ volume */ p = buf; // Restore to begin of block - return volume_readbuf(vol, vh, p); + return volume_readbuf(vh, p); } else HFSP_ERROR(-1, "Neither Wrapper nor native HFS+ volume header found"); fail: Modified: openbios-devel/include/elf_boot.h =================================================================== --- openbios-devel/include/elf_boot.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/include/elf_boot.h 2008-11-30 11:54:01 UTC (rev 274) @@ -100,5 +100,6 @@ #define EB_IA64_IMAGE_HANDLE 0x00000007 #define EB_I386_MEMMAP 0x00000008 +extern const struct elf_image_note elf_image_notes; #endif /* ELF_BOOT_H */ Modified: openbios-devel/include/libc/string.h =================================================================== --- openbios-devel/include/libc/string.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/include/libc/string.h 2008-11-30 11:54:01 UTC (rev 274) @@ -17,6 +17,8 @@ #ifndef _H_STRING #define _H_STRING +#include "openbios/config.h" + #define bzero(s,n) memset( s, 0, n ) #define atol(nptr) strtol(nptr, NULL, 10 ) @@ -95,5 +97,6 @@ #define tolower(c) __tolower(c) #define toupper(c) __toupper(c) +extern int errno_int; #endif /* _H_STRING */ Modified: openbios-devel/include/openbios/drivers.h =================================================================== --- openbios-devel/include/openbios/drivers.h 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/include/openbios/drivers.h 2008-11-30 11:54:01 UTC (rev 274) @@ -13,6 +13,7 @@ #ifdef CONFIG_DRIVER_PCI int ob_pci_init(void); +void macio_nvram_init(char *path, uint32_t addr); #endif #ifdef CONFIG_DRIVER_SBUS int ob_sbus_init(uint64_t base, int machine_id); @@ -38,6 +39,17 @@ int start_cpu(unsigned int pc, unsigned int context_ptr, unsigned int context, int cpu); extern struct mem cmem; +extern uint16_t graphic_depth; +extern volatile unsigned char *power_reg; +extern volatile unsigned int *reset_reg; +extern const char *obp_stdin_path, *obp_stdout_path; +extern char obp_stdin, obp_stdout; +extern volatile struct sun4m_timer_regs *counter_regs; +extern uint32_t kernel_image; +extern uint32_t kernel_size; +extern uint32_t qemu_cmdline; +extern uint32_t cmdline_size; +extern char boot_device; #endif #ifdef CONFIG_DRIVER_FLOPPY int ob_floppy_init(void); Modified: openbios-devel/kernel/dict.c =================================================================== --- openbios-devel/kernel/dict.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/kernel/dict.c 2008-11-30 11:54:01 UTC (rev 274) @@ -18,7 +18,7 @@ #include "cross.h" -unsigned char *dict = 0; +unsigned char *dict = NULL; ucell *last; cell dicthead = 0; Modified: openbios-devel/kernel/internal.c =================================================================== --- openbios-devel/kernel/internal.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/kernel/internal.c 2008-11-30 11:54:01 UTC (rev 274) @@ -24,7 +24,7 @@ * point behind the pointer. */ static ucell t[] = { DOCOL, 0, (ucell)(t+3), 0 }; -ucell *trampoline = t; +static ucell *trampoline = t; #endif #ifndef CONFIG_DEBUG_INTERPRETER @@ -287,7 +287,7 @@ #ifndef FCOMPILER static ucell get_myself(void) { - static ucell **myself = 0; + static ucell **myself = NULL; if( !myself ) myself = (ucell**)findword("my-self") + 1; return (*myself && **myself) ? (ucell)**myself : 0; Modified: openbios-devel/libc/misc.c =================================================================== --- openbios-devel/libc/misc.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/libc/misc.c 2008-11-30 11:54:01 UTC (rev 274) @@ -17,7 +17,7 @@ #include "openbios/config.h" #include "libc/string.h" -int errno; +int errno_int; void qsort( void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void*) ) Modified: openbios-devel/libc/string.c =================================================================== --- openbios-devel/libc/string.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/libc/string.c 2008-11-30 11:54:01 UTC (rev 274) @@ -50,7 +50,7 @@ return (int)c1 - (int)c2; } -char * ___strtok; +static char * ___strtok; /** * strcpy - Copy a %NUL terminated string Modified: openbios-devel/libc/vsprintf.c =================================================================== --- openbios-devel/libc/vsprintf.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/libc/vsprintf.c 2008-11-30 11:54:01 UTC (rev 274) @@ -63,7 +63,7 @@ if (type & LEFT) type &= ~ZEROPAD; if (base < 2 || base > 36) - return 0; + return NULL; c = (type & ZEROPAD) ? '0' : ' '; sign = 0; if (type & SIGN) { Modified: openbios-devel/modules/cmdline.c =================================================================== --- openbios-devel/modules/cmdline.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/modules/cmdline.c 2008-11-30 11:54:01 UTC (rev 274) @@ -120,7 +120,7 @@ ci->buf[0] = 0; if( !p ) - return 0; + return NULL; for( len=0; len <= ci->ncol && p[len] != '\n' && p[len] ; len++ ) ; Modified: openbios-devel/modules/video.c =================================================================== --- openbios-devel/modules/video.c 2008-11-29 19:31:28 UTC (rev 273) +++ openbios-devel/modules/video.c 2008-11-30 11:54:01 UTC (rev 274) @@ -41,11 +41,13 @@ static void startup_splash( void ) { +#ifdef CONFIG_MOL int fd, s, i, y, x, dx, dy; int width, height; char *pp, *p; char buf[64]; - +#endif + /* only draw logo in 24-bit mode (for now) */ if( video.fb.depth < 15 ) return; @@ -247,7 +249,7 @@ video_write(void) { char *addr; - int i, len; + int len; len = GETTOS(); addr = pop_fstr_copy();
[View Less]
1
0
0
0
r273 - in openbios-devel: arch/sparc32 arch/sparc64 drivers fs/grubfs fs/hfsplus include include/openbios libc
by svn@openbios.org
29 Nov '08
29 Nov '08
Author: blueswirl Date: 2008-11-29 20:31:28 +0100 (Sat, 29 Nov 2008) New Revision: 273 Modified: openbios-devel/arch/sparc32/elfload.c openbios-devel/arch/sparc32/romvec.c openbios-devel/arch/sparc64/elfload.c openbios-devel/arch/sparc64/openbios.c openbios-devel/drivers/floppy.c openbios-devel/drivers/obio.c openbios-devel/drivers/vga.h openbios-devel/fs/grubfs/dir.h openbios-devel/fs/grubfs/fsys_affs.c openbios-devel/fs/grubfs/fsys_ext2fs.c openbios-devel/fs/
…
[View More]
grubfs/fsys_vstafs.c openbios-devel/fs/grubfs/fsys_xfs.c openbios-devel/fs/hfsplus/btree.c openbios-devel/fs/hfsplus/hfsp_fs.c openbios-devel/fs/hfsplus/unicode.c openbios-devel/fs/hfsplus/volume.c openbios-devel/include/ofmem.h openbios-devel/include/openbios/firmware_abi.h openbios-devel/libc/diskio.c Log: Reduce warnings by 29% Modified: openbios-devel/arch/sparc32/elfload.c =================================================================== --- openbios-devel/arch/sparc32/elfload.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/arch/sparc32/elfload.c 2008-11-29 19:31:28 UTC (rev 273) @@ -308,7 +308,7 @@ Elf_phdr *phdr = NULL; unsigned long phdr_size; unsigned long checksum_offset; - unsigned short checksum; + unsigned short checksum = 0; Elf_Bhdr *boot_notes = NULL; int retval = -1; int image_retval; Modified: openbios-devel/arch/sparc32/romvec.c =================================================================== --- openbios-devel/arch/sparc32/romvec.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/arch/sparc32/romvec.c 2008-11-29 19:31:28 UTC (rev 273) @@ -265,9 +265,9 @@ for (;;) {} } +extern volatile unsigned char *power_reg; static void obp_abort(void) { - extern volatile unsigned char *power_reg; printk("abort, power off\n"); *power_reg = 1; @@ -277,8 +277,6 @@ static void obp_halt(void) { - extern volatile unsigned char *power_reg; - printk("halt, power off\n"); *power_reg = 1; printk("power off failed\n"); Modified: openbios-devel/arch/sparc64/elfload.c =================================================================== --- openbios-devel/arch/sparc64/elfload.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/arch/sparc64/elfload.c 2008-11-29 19:31:28 UTC (rev 273) @@ -307,7 +307,7 @@ Elf_phdr *phdr = NULL; unsigned long phdr_size; unsigned long checksum_offset; - unsigned short checksum; + unsigned short checksum = 0; Elf_Bhdr *boot_notes = NULL; int retval = -1; int image_retval; Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/arch/sparc64/openbios.c 2008-11-29 19:31:28 UTC (rev 273) @@ -58,14 +58,12 @@ static const struct hwdef hwdefs[] = { { - .pci.cfg_addr = PCI_CONFIG, - .pci.cfg_data = 0, - .pci.cfg_base = 0x80000000ULL, - .pci.cfg_len = 0, - .pci.mem_base = 0, - .pci.mem_len = 0, - .pci.io_base = 0, - .pci.io_len = 0, + .pci = { + .cfg_addr = PCI_CONFIG, + .cfg_data = 0, + .cfg_base = 0x80000000ULL, + .cfg_len = 0, + }, .machine_id_low = 0, .machine_id_high = 255, }, Modified: openbios-devel/drivers/floppy.c =================================================================== --- openbios-devel/drivers/floppy.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/drivers/floppy.c 2008-11-29 19:31:28 UTC (rev 273) @@ -223,7 +223,7 @@ static void floppy_reset(void); -static int set_dor(int fdc, char mask, char data) +static int set_dor(char mask, char data) { unsigned char newdor,olddor; @@ -236,15 +236,6 @@ return olddor; } - -static void bounce_motor(void) -{ - /* Bounce the drive motor... */ - outb(fdc_state.dor & ~(0x10<<FD_DRIVE), FD_DOR); - outb(fdc_state.dor, FD_DOR); -} - - /* waits until the fdc becomes ready */ static int wait_til_ready(void) { @@ -408,7 +399,7 @@ #endif new_dor |= (1 << (drive + 4)); /* Spinup the selected drive */ new_dor |= drive; /* Select the drive for commands as well */ - set_dor(fdc, 0xc, new_dor); + set_dor(0xc, new_dor); mdelay(DRIVE_H1440_SPINUP); @@ -432,7 +423,7 @@ mask = 0xff; mask &= ~(1 << (drive +4)); /* Now clear the bit in the Digital Output Register */ - set_dor(0, mask, 0); + set_dor(mask, 0); } /* Set the FDC's data transfer rate on behalf of the specified drive. @@ -523,7 +514,6 @@ case 1: dtr = 300; if (fdc_state.version >= FDC_82078) { - unsigned char cmd[3]; /* chose the default rate table, not the one * where 1 = 2 Mbps */ cmd[0] = FD_DRIVESPEC; @@ -553,9 +543,6 @@ if (srt > 0xf) { srt = 0xf; } - if (srt < 0 ) { - srt = 0; - } hlt = (head_load_time*scale_dtr/2 + NOMINAL_DTR - 1)/NOMINAL_DTR; if (hlt < 0x01) @@ -726,7 +713,6 @@ if (success) drive_state[FD_DRIVE].track = track; else { - int i; printk_debug("seek failed\n"); printk_debug("nr = %d\n", nr); printk_debug("ST0 = %02x\n", reply[0]); @@ -906,21 +892,23 @@ return -1; } -int floppy_read(char *dest, unsigned long offset, unsigned long length) +static int floppy_read(char *dest, unsigned long offset, unsigned long length) { - int result, bytes_read;; + int fr_result, bytes_read;; + printk_debug("floppy_read\n"); bytes_read = 0; do { int max_errors = 3; do { - result = __floppy_read(dest + bytes_read, offset, length - bytes_read); + fr_result = __floppy_read(dest + bytes_read, offset, + length - bytes_read); if (max_errors-- == 0) { return (bytes_read)?bytes_read: -1; } - } while (result <= 0); - offset += result; - bytes_read += result; + } while (fr_result <= 0); + offset += fr_result; + bytes_read += fr_result; } while(bytes_read < length); return bytes_read; } @@ -1005,7 +993,7 @@ } /* get_fdc_version */ -int floppy_init(void) +static int floppy_init(void) { printk_debug("floppy_init\n"); fdc_state.in_sync = 0; @@ -1041,13 +1029,6 @@ fdc_state.in_sync = 1; } -void floppy_fini(void) -{ - /* Disable the floppy and the floppy drive controller */ - set_dor(0, 0, 0); -} - - static void ob_floppy_initialize(int *idx) { @@ -1068,7 +1049,7 @@ static void ob_floppy_open(int *idx) { - int ret=1, len; + int ret = 1; phandle_t ph; fword("my-unit"); Modified: openbios-devel/drivers/obio.c =================================================================== --- openbios-devel/drivers/obio.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/drivers/obio.c 2008-11-29 19:31:28 UTC (rev 273) @@ -831,7 +831,7 @@ ob_new_obio_device("eeprom", NULL); - nvram = (char *)ob_reg(base, offset, NVRAM_SIZE, 1); + nvram = (unsigned char *)ob_reg(base, offset, NVRAM_SIZE, 1); PUSH((unsigned long)nvram); fword("encode-int"); Modified: openbios-devel/drivers/vga.h =================================================================== --- openbios-devel/drivers/vga.h 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/drivers/vga.h 2008-11-29 19:31:28 UTC (rev 273) @@ -227,4 +227,8 @@ __u32 reserved[6]; /* Reserved for future compatibility */ }; +void vga_set_gmode (void); +void vga_set_amode (void); +void vga_font_load(unsigned char *vidmem, const unsigned char *font, int height, + int num_chars); #endif Modified: openbios-devel/fs/grubfs/dir.h =================================================================== --- openbios-devel/fs/grubfs/dir.h 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/grubfs/dir.h 2008-11-29 19:31:28 UTC (rev 273) @@ -137,11 +137,5 @@ #ifndef NULL #define NULL 0 #endif -extern DIR *opendir (); -extern struct direct *readdir (); -extern int telldir (); -extern void seekdir (); -#define rewinddir(dirp) seekdir((dirp), (long)0) -extern void closedir (); #endif /* not KERNEL */ #endif /* _BOOT_UFS_DIR_H_ */ Modified: openbios-devel/fs/grubfs/fsys_affs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_affs.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/grubfs/fsys_affs.c 2008-11-29 19:31:28 UTC (rev 273) @@ -56,7 +56,7 @@ unsigned long pb_Flags; unsigned long pb_Reserved1[2]; unsigned long pb_DevFlags; - unsigned char pb_DriveName[32]; + char pb_DriveName[32]; unsigned long pb_Reserved2[15]; unsigned long pb_Environment[20]; unsigned long pb_EReserved[12]; @@ -201,7 +201,7 @@ unsigned int filesize; }; -#warning "Big vs. little endian for configure needed" +//#warning "Big vs. little endian for configure needed" #define AROS_BE2LONG(l) \ ( \ ((((unsigned long)(l)) >> 24) & 0x000000FFUL) | \ @@ -240,7 +240,8 @@ int rootb; /* block number of root block */ int rdbb; /* block number of rdb block */ -void initCache() { +static void initCache(void) +{ int i; for (i=0;i<MAX_CACHE_BLOCKS;i++) @@ -251,7 +252,8 @@ } } -struct CacheBlock *getBlock(unsigned int block) { +static struct CacheBlock *getBlock(unsigned int block) +{ struct CacheBlock *freeblock; int i; @@ -278,7 +280,8 @@ return freeblock; } -unsigned int calcChkSum(unsigned short SizeBlock, unsigned int *buffer) { +static unsigned int calcChkSum(unsigned short SizeBlock, unsigned int *buffer) +{ unsigned int sum=0,count=0; for (count=0;count<SizeBlock;count++) @@ -337,7 +340,8 @@ return 1; } -int seek(unsigned long offset) { +static int seek(unsigned long offset) +{ struct CacheBlock *cblock; unsigned long block; unsigned long togo; @@ -391,7 +395,7 @@ { cblock = getBlock(fsysb->file.current.block); } -#warning "else shouldn't occour" + //#warning "else shouldn't occour" } size = 512; size -= fsysb->file.current.byte; @@ -405,7 +409,7 @@ extensionBlock(cblock)->filekey_table [fsysb->file.current.filekey] )+blockoffset, - fsysb->file.current.byte, size, (char *)((int)buf+readbytes) + fsysb->file.current.byte, size, (char *)((long)buf+readbytes) ); fsysb->file.current.byte += size; } @@ -418,7 +422,7 @@ extensionBlock(cblock)->filekey_table [fsysb->file.current.filekey] )+blockoffset, - fsysb->file.current.byte, size, (char *)((int)buf+readbytes) + fsysb->file.current.byte, size, (char *)((long)buf+readbytes) ); fsysb->file.current.byte = 0; fsysb->file.current.filekey--; @@ -432,7 +436,8 @@ return readbytes; } -unsigned char capitalch(unsigned char ch, unsigned char flags) { +static unsigned char capitalch(unsigned char ch, unsigned char flags) +{ if ((flags==0) || (flags==1)) return (unsigned char)((ch>='a') && (ch<='z') ? ch-('a'-'A') : ch); @@ -442,7 +447,8 @@ } // str2 is a BCPL string -int noCaseStrCmp(char *str1, char *str2, unsigned char flags) { +static int noCaseStrCmp(char *str1, char *str2, unsigned char flags) +{ unsigned char length; length=str2++[0]; @@ -456,7 +462,8 @@ return (*str1) ? 1 : -1; } -unsigned int getHashKey(char *name,unsigned int tablesize, unsigned char flags) { +static unsigned int getHashKey(char *name,unsigned int tablesize, unsigned char flags) +{ unsigned int length; length=0; @@ -467,7 +474,8 @@ return length%tablesize; } -grub_error_t getHeaderBlock(char *name, struct CacheBlock **dirh) { +static grub_error_t getHeaderBlock(char *name, struct CacheBlock **dirh) +{ int key; key = getHashKey(name, 72, 1); @@ -501,8 +509,8 @@ return 0; } -char *copyPart(char *src, char *dst) { - +static char *copyPart(char *src, char *dst) +{ while ((*src != '/') && (*src)) *dst++ = *src++; if (*src == '/') @@ -514,7 +522,8 @@ return src; } -grub_error_t findBlock(char *name, struct CacheBlock **dirh) { +static grub_error_t findBlock(char *name, struct CacheBlock **dirh) +{ char dname[32]; int block; @@ -571,7 +580,8 @@ return 0; } -void checkPossibility(char *filename, char *bstr) { +static void checkPossibility(char *filename, char *bstr) +{ #ifndef STAGE1_5 char cstr[32]; @@ -668,7 +678,7 @@ fname = filename; while (*fname) *current++ = *fname++; -#warning "TODO: add some more chars until posibilities differ" + //#warning "TODO: add some more chars until possibilities differ" if (print_possibilities>0) errnum = ERR_FILE_NOT_FOUND; return (print_possibilities<0); Modified: openbios-devel/fs/grubfs/fsys_ext2fs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/grubfs/fsys_ext2fs.c 2008-11-29 19:31:28 UTC (rev 273) @@ -587,7 +587,7 @@ log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode))); printf ("ext2fs_dir: inode table fsblock=%d\n", ino_blk); #endif /* E2DEBUG */ - if (!ext2_rdfsb (ino_blk, INODE)) + if (!ext2_rdfsb (ino_blk, (char *)INODE)) { return 0; } Modified: openbios-devel/fs/grubfs/fsys_vstafs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/grubfs/fsys_vstafs.c 2008-11-29 19:31:28 UTC (rev 273) @@ -30,8 +30,8 @@ #define FIRST_SECTOR ((struct first_sector *) FSYS_BUF) -#define FILE_INFO ((struct fs_file *) (int) FIRST_SECTOR + 8192) -#define DIRECTORY_BUF ((struct dir_entry *) (int) FILE_INFO + 512) +#define FILE_INFO ((struct fs_file *) (long) FIRST_SECTOR + 8192) +#define DIRECTORY_BUF ((struct dir_entry *) (long) FILE_INFO + 512) #define ROOT_SECTOR 1 @@ -39,7 +39,6 @@ * In f_sector we store the sector number in which the information about * the found file is. */ -extern int filepos; static int f_sector; int @@ -63,7 +62,7 @@ } static int curr_ext, current_direntry, current_blockpos; -static struct alloc *a; +static struct alloc *a1; static struct dir_entry * vstafs_readdir (long sector) @@ -78,9 +77,9 @@ return 0; } - a = FILE_INFO->blocks; + a1 = FILE_INFO->blocks; curr_ext = 0; - devread (a[curr_ext].a_start, 0, 512, (char *) DIRECTORY_BUF); + devread (a1[curr_ext].a_start, 0, 512, (char *) DIRECTORY_BUF); current_direntry = 11; current_blockpos = 0; @@ -93,7 +92,7 @@ if (current_direntry > 15) { current_direntry = 0; - if (++current_blockpos > (a[curr_ext].a_len - 1)) + if (++current_blockpos > (a1[curr_ext].a_len - 1)) { current_blockpos = 0; curr_ext++; @@ -101,8 +100,8 @@ if (curr_ext < FILE_INFO->extents) { - devread (a[curr_ext].a_start + current_blockpos, 0, - 512, (char *) DIRECTORY_BUF); + devread (a1[curr_ext].a_start + current_blockpos, 0, + 512, (char *) DIRECTORY_BUF); } else { @@ -188,35 +187,35 @@ int vstafs_read (char *addr, int len) { - struct alloc *a; + struct alloc *a2; int size, ret = 0, offset, curr_len = 0; - int curr_ext; + int curr_ext2; char extent; int ext_size; char *curr_pos; get_file_info (f_sector); size = FILE_INFO->len-VSTAFS_START_DATA; - a = FILE_INFO->blocks; + a2 = FILE_INFO->blocks; if (filepos > 0) { - if (filepos < a[0].a_len * 512 - VSTAFS_START_DATA) + if (filepos < a2[0].a_len * 512 - VSTAFS_START_DATA) { offset = filepos + VSTAFS_START_DATA; extent = 0; - curr_len = a[0].a_len * 512 - offset - filepos; + curr_len = a2[0].a_len * 512 - offset - filepos; } else { - ext_size = a[0].a_len * 512 - VSTAFS_START_DATA; + ext_size = a2[0].a_len * 512 - VSTAFS_START_DATA; offset = filepos - ext_size; extent = 1; do { curr_len -= ext_size; offset -= ext_size; - ext_size = a[extent+1].a_len * 512; + ext_size = a2[extent+1].a_len * 512; } while (extent < FILE_INFO->extents && offset>ext_size); } @@ -225,16 +224,16 @@ { offset = VSTAFS_START_DATA; extent = 0; - curr_len = a[0].a_len * 512 - offset; + curr_len = a2[0].a_len * 512 - offset; } curr_pos = addr; if (curr_len > len) curr_len = len; - for (curr_ext=extent; - curr_ext < FILE_INFO->extents; - curr_len = a[curr_ext].a_len * 512, curr_pos += curr_len, curr_ext++) + for (curr_ext2=extent; + curr_ext2 < FILE_INFO->extents; + curr_len = a2[curr_ext].a_len * 512, curr_pos += curr_len, curr_ext2++) { ret += curr_len; size -= curr_len; @@ -244,7 +243,7 @@ curr_len += size; } - devread (a[curr_ext].a_start,offset, curr_len, curr_pos); + devread (a2[curr_ext2].a_start,offset, curr_len, curr_pos); offset = 0; } Modified: openbios-devel/fs/grubfs/fsys_xfs.c =================================================================== --- openbios-devel/fs/grubfs/fsys_xfs.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/grubfs/fsys_xfs.c 2008-11-29 19:31:28 UTC (rev 273) @@ -97,7 +97,7 @@ return ino & XFS_INO_MASK(XFS_INO_OFFSET_BITS); } -static inline __const__ __uint16_t +static inline __uint16_t le16 (__uint16_t x) { #ifdef __i386__ @@ -110,7 +110,7 @@ #endif } -static inline __const__ __uint32_t +static inline __uint32_t le32 (__uint32_t x) { #ifdef __i386__ @@ -130,7 +130,7 @@ #endif } -static inline __const__ __uint64_t +static inline __uint64_t le64 (__uint64_t x) { __uint32_t h = x >> 32; @@ -195,7 +195,7 @@ } #undef offsetof -#define offsetof(t,m) ((int)&(((t *)0)->m)) +#define offsetof(t,m) ((long)&(((t *)0)->m)) static inline int btroot_maxrecs (void) Modified: openbios-devel/fs/hfsplus/btree.c =================================================================== --- openbios-devel/fs/hfsplus/btree.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/hfsplus/btree.c 2008-11-29 19:31:28 UTC (rev 273) @@ -38,7 +38,7 @@ * * return pointer after reading the structure */ -static void* btree_readnode(btree* bt, btree_node_desc* node, void *p) +static void* btree_readnode(btree_node_desc* node, void *p) { node->next = bswabU32_inc(p); node->prev = bswabU32_inc(p); @@ -53,7 +53,7 @@ * * return pointer after reading the structure */ -static void* btree_readhead(btree* bt, btree_head* head, void *p) +static void* btree_readhead(btree_head* head, void *p) { UInt32 *q; head->depth = bswabU16_inc(p); @@ -153,7 +153,7 @@ return NULL; // evil ... result->index = node_index; - btree_readnode(bt, &result->desc, p); + btree_readnode(&result->desc, p); e -> priority = result->desc.height * DEPTH_FACTOR; e -> index = node_index; @@ -229,10 +229,10 @@ HFSP_EXTENT_DATA, bt->cnid); if (!p) return -1; - p = btree_readnode(bt, &node, p); + p = btree_readnode(&node, p); if (node.kind != HFSP_NODE_HEAD) return -1; // should not happen ? - p = btree_readhead(bt, &bt->head, p); + p = btree_readhead(&bt->head, p); node_size = bt->head.node_size; bt->blkpernode = node_size / vol->blksize; Modified: openbios-devel/fs/hfsplus/hfsp_fs.c =================================================================== --- openbios-devel/fs/hfsplus/hfsp_fs.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/hfsplus/hfsp_fs.c 2008-11-29 19:31:28 UTC (rev 273) @@ -98,7 +98,7 @@ static int match_file( record *r, record *parent, const void *match_data, hfsp_file_t *pt ) { - unsigned char *p = (char*)match_data; + const char *p = (const char*)match_data; char name[256]; int ret=1; @@ -340,7 +340,7 @@ max -= t->pos - curpos; } size = (count-act_count > max)? max : count-act_count; - memcpy( buf + act_count, &buf2[add], size ); + memcpy( (char *)buf + act_count, &buf2[add], size ); curpos += blksize; act_count += size; Modified: openbios-devel/fs/hfsplus/unicode.c =================================================================== --- openbios-devel/fs/hfsplus/unicode.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/hfsplus/unicode.c 2008-11-29 19:31:28 UTC (rev 273) @@ -79,8 +79,8 @@ register UInt16 length1 = ustr1->strlen; register UInt16 length2 = ustr2->strlen; register const UInt16* lowerCaseTable = gLowerCaseTable; - register UInt16* str1 = ustr1->name; - register UInt16* str2 = ustr2->name; + register const UInt16* str1 = ustr1->name; + register const UInt16* str2 = ustr2->name; while (1) { // Set default values for c1, c2 in case there are no more valid chars Modified: openbios-devel/fs/hfsplus/volume.c =================================================================== --- openbios-devel/fs/hfsplus/volume.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/fs/hfsplus/volume.c 2008-11-29 19:31:28 UTC (rev 273) @@ -115,7 +115,7 @@ * ToDo: add more consitency checks. */ static int -volume_readbuf(volume * vol, hfsp_vh* vh, void* p) +volume_readbuf(volume * vol, hfsp_vh* vh, char * p) { if( (vh->signature = bswabU16_inc(p)) != HFSP_VOLHEAD_SIG) HFSP_ERROR(-1, "This is not a HFS+ volume"); @@ -168,7 +168,7 @@ { UInt16 signature; char buf[vol->blksize]; - void *p = buf; + char *p = buf; if( volume_readinbuf(vol, buf, 2) ) // Wrapper or volume header starts here return -1; Modified: openbios-devel/include/ofmem.h =================================================================== --- openbios-devel/include/ofmem.h 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/include/ofmem.h 2008-11-29 19:31:28 UTC (rev 273) @@ -29,10 +29,4 @@ extern void ofmem_release( ulong virt, ulong size ); extern ulong ofmem_translate( ulong virt, ulong *ret_mode ); -/* allocations from the private pool */ -extern void *malloc( int size ); -extern void free( void *ptr ); -extern void *realloc( void *ptr, size_t size ); - - #endif /* _H_OFMEM */ Modified: openbios-devel/include/openbios/firmware_abi.h =================================================================== --- openbios-devel/include/openbios/firmware_abi.h 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/include/openbios/firmware_abi.h 2008-11-29 19:31:28 UTC (rev 273) @@ -139,7 +139,7 @@ } static inline uint32_t -OpenBIOS_set_var(uint8_t *nvram, uint32_t addr, const unsigned char *str) +OpenBIOS_set_var(uint8_t *nvram, uint32_t addr, const char *str) { uint32_t len; Modified: openbios-devel/libc/diskio.c =================================================================== --- openbios-devel/libc/diskio.c 2008-11-29 16:24:51 UTC (rev 272) +++ openbios-devel/libc/diskio.c 2008-11-29 19:31:28 UTC (rev 273) @@ -108,7 +108,7 @@ push_str( filename ); call_package( fdp->reopen_xt, fdp->ih ); - ret = (POP() == -1)? 0:-1; + ret = (POP() == (ucell)-1)? 0 : -1; return ret; } @@ -121,7 +121,7 @@ if( lookup_xt(fdp->ih, "open-nwrom", &fdp->open_nwrom_xt) ) return -1; call_package( fdp->open_nwrom_xt, fdp->ih ); - return (POP() == -1)? 0:-1; + return (POP() == (ucell)-1)? 0 : -1; } ihandle_t
[View Less]
1
0
0
0
r272 - in openbios-devel: arch/sparc64 drivers kernel modules
by svn@openbios.org
29 Nov '08
29 Nov '08
Author: blueswirl Date: 2008-11-29 17:24:51 +0100 (Sat, 29 Nov 2008) New Revision: 272 Modified: openbios-devel/arch/sparc64/aoutload.c openbios-devel/arch/sparc64/elfload.c openbios-devel/arch/sparc64/linux_load.c openbios-devel/arch/sparc64/openbios.c openbios-devel/drivers/floppy.c openbios-devel/kernel/cross.h openbios-devel/modules/client.c Log: Fix most print format warnings Modified: openbios-devel/arch/sparc64/aoutload.c ============================================
…
[View More]
======================= --- openbios-devel/arch/sparc64/aoutload.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/aoutload.c 2008-11-29 16:24:51 UTC (rev 272) @@ -106,11 +106,11 @@ if (N_MAGIC(ehdr) == NMAGIC) { if ((unsigned long)lfile_read((void *)start, ehdr.a_text) != ehdr.a_text) { - printf("Can't read program text segment (size 0x%lx)\n", ehdr.a_text); + printf("Can't read program text segment (size 0x%x)\n", ehdr.a_text); goto out; } if ((unsigned long)lfile_read((void *)(start + N_DATADDR(ehdr)), ehdr.a_data) != ehdr.a_data) { - printf("Can't read program data segment (size 0x%lx)\n", ehdr.a_data); + printf("Can't read program data segment (size 0x%x)\n", ehdr.a_data); goto out; } } else { Modified: openbios-devel/arch/sparc64/elfload.c =================================================================== --- openbios-devel/arch/sparc64/elfload.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/elfload.c 2008-11-29 16:24:51 UTC (rev 272) @@ -145,7 +145,7 @@ for (i = 0; i < phnum; i++) { if (phdr[i].p_type != PT_LOAD) continue; - debug("segment %d addr:%#lx file:%#lx mem:%#lx ", + debug("segment %d addr:%#llx file:%#llx mem:%#llx ", i, addr_fixup(phdr[i].p_paddr), phdr[i].p_filesz, phdr[i].p_memsz); file_seek(offset + phdr[i].p_offset); debug("loading... "); @@ -377,7 +377,7 @@ //debug("current time: %lu\n", currticks()); - debug("entry point is %#lx\n", addr_fixup(ehdr.e_entry)); + debug("entry point is %#llx\n", addr_fixup(ehdr.e_entry)); printf("Jumping to entry point...\n"); #if 0 Modified: openbios-devel/arch/sparc64/linux_load.c =================================================================== --- openbios-devel/arch/sparc64/linux_load.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/linux_load.c 2008-11-29 16:24:51 UTC (rev 272) @@ -574,7 +574,7 @@ ctx = switch_to(ctx); /* It's impossible but... */ - printf("Returned with o0=%#lx\n", ctx->regs[REG_O0]); + printf("Returned with o0=%#llx\n", ctx->regs[REG_O0]); return ctx->regs[REG_O0]; } Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/arch/sparc64/openbios.c 2008-11-29 16:24:51 UTC (rev 272) @@ -598,7 +598,7 @@ cmdline_size = size; boot_device = nv_info.boot_devices[0]; - printk("kernel addr %lx size %lx\n", kernel_image, kernel_size); + printk("kernel addr %llx size %llx\n", kernel_image, kernel_size); if (size) printk("kernel cmdline %s\n", obio_cmdline); Modified: openbios-devel/drivers/floppy.c =================================================================== --- openbios-devel/drivers/floppy.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/drivers/floppy.c 2008-11-29 16:24:51 UTC (rev 272) @@ -938,7 +938,7 @@ if ((bytes = result(reply_buffer, MAX_REPLIES)) <= 0x00) return FDC_NONE; /* No FDC present ??? */ if ((bytes==1) && (reply_buffer[0] == 0x80)){ - printk_info("FDC %d is an 8272A\n"); + printk_info("FDC is an 8272A\n"); return FDC_8272A; /* 8272a/765 don't know DUMPREGS */ } if (bytes != 10) { Modified: openbios-devel/kernel/cross.h =================================================================== --- openbios-devel/kernel/cross.h 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/kernel/cross.h 2008-11-29 16:24:51 UTC (rev 272) @@ -43,8 +43,8 @@ #define target_ulong(value) (target_long(value)) #if BITS==32 -#define target_ucell(value) (target_long(value)) -#define target_cell(value) (target_long(value)) +#define target_ucell(value) ((ucell)target_long(value)) +#define target_cell(value) ((cell)target_long(value)) #elif BITS==64 #ifdef NATIVE_BITWIDTH_LARGER_THAN_HOST_BITWIDTH #define target_ucell(value) ( ((ucell)target_long((value)&0xffffffff))<<32 ) @@ -108,9 +108,14 @@ #ifdef NATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH #define pointer2cell(x) ((ucell)(x)) #define cell2pointer(x) ((u8 *)(x)) +#if BITS==32 #define FMT_CELL_x "x" #define FMT_CELL_d "d" +#else +#define FMT_CELL_x "lx" +#define FMT_CELL_d "ld" #endif +#endif #ifdef NATIVE_BITWIDTH_SMALLER_THAN_HOST_BITWIDTH extern unsigned long base_address; Modified: openbios-devel/modules/client.c =================================================================== --- openbios-devel/modules/client.c 2008-11-29 13:20:42 UTC (rev 271) +++ openbios-devel/modules/client.c 2008-11-29 16:24:51 UTC (rev 272) @@ -97,7 +97,7 @@ if( (val=POP()) ) { dstackcnt = dstacksave; if( val == -1 ) - printk("Unimplemented service %s ([%d] -- [%d])\n", + printk("Unimplemented service %s ([%ld] -- [%ld])\n", pb->service, pb->nargs, pb->nret ); return -1; }
[View Less]
1
0
0
0
r271 - openbios-devel/drivers
by svn@openbios.org
29 Nov '08
29 Nov '08
Author: blueswirl Date: 2008-11-29 14:20:42 +0100 (Sat, 29 Nov 2008) New Revision: 271 Modified: openbios-devel/drivers/pci.c Log: Restore r257 (mostly) Modified: openbios-devel/drivers/pci.c =================================================================== --- openbios-devel/drivers/pci.c 2008-11-29 13:18:32 UTC (rev 270) +++ openbios-devel/drivers/pci.c 2008-11-29 13:20:42 UTC (rev 271) @@ -16,12 +16,12 @@ #include "openbios/config.h" #include "openbios/bindings.h" #include "
…
[View More]
openbios/kernel.h" +#include "openbios/pci.h" #include "libc/byteorder.h" #include "libc/vsprintf.h" #include "openbios/drivers.h" #include "timer.h" -#include "openbios/pci.h" #include "pci.h" #define set_bool_property(ph, name) set_property(ph, name, NULL, 0); @@ -56,16 +56,1231 @@ { "close", ob_pci_close }, }; -static int ob_pci_add_properties(pci_addr addr) +/* PCI devices database */ +typedef struct pci_class_t pci_class_t; +typedef struct pci_subclass_t pci_subclass_t; +typedef struct pci_iface_t pci_iface_t; +typedef struct pci_dev_t pci_dev_t; + +typedef struct pci_config_t pci_config_t; + +struct pci_config_t { + char path[64]; + uint32_t regions[7]; + uint32_t sizes[7]; +}; + +struct pci_iface_t { + uint8_t iface; + const char *name; + const char *type; + const pci_dev_t *devices; + int (*config_cb)(const pci_config_t *config); + const void *private; +}; + +struct pci_subclass_t { + uint8_t subclass; + const char *name; + const char *type; + const pci_dev_t *devices; + const pci_iface_t *iface; + int (*config_cb)(const pci_config_t *config); + const void *private; +}; + +struct pci_class_t { + const char *name; + const char *type; + const pci_subclass_t *subc; +}; + +struct pci_dev_t { + uint16_t vendor; + uint16_t product; + const char *type; + const char *name; + const char *model; + const char *compat; + int acells; + int scells; + int icells; + int (*config_cb)(const pci_config_t *config); + const void *private; +}; + +/* Current machine description */ + +typedef struct pci_bridge_t pci_bridge_t; + +/* Low level access helpers */ +struct pci_ops_t { + uint8_t (*config_readb)(pci_bridge_t *bridge, + uint8_t bus, uint8_t devfn, uint8_t offset); + void (*config_writeb)(pci_bridge_t *bridge, + uint8_t bus, uint8_t devfn, + uint8_t offset, uint8_t val); + uint16_t (*config_readw)(pci_bridge_t *bridge, + uint8_t bus, uint8_t devfn, uint8_t offset); + void (*config_writew)(pci_bridge_t *bridge, + uint8_t bus, uint8_t devfn, + uint8_t offset, uint16_t val); + uint32_t (*config_readl)(pci_bridge_t *bridge, + uint8_t bus, uint8_t devfn, uint8_t offset); + void (*config_writel)(pci_bridge_t *bridge, + uint8_t bus, uint8_t devfn, + uint8_t offset, uint32_t val); +}; + +static const pci_subclass_t undef_subclass[] = { +#if 0 + { + 0x00, "misc undefined", NULL, NULL, NULL, + NULL, NULL, + }, +#endif + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static int ide_config_cb2 (const pci_config_t *config) { +#if 0 + ide_init(config->path, + config->regions[0] & ~0x0000000F, + config->regions[1] & ~0x0000000F, + config->regions[2] & ~0x0000000F, + config->regions[3] & ~0x0000000F); +#endif + return 0; +} + +static const pci_dev_t ide_devices[] = { + { + 0x1095, 0x0646, /* CMD646 IDE controller */ + "pci-ide", "pci-ata", NULL, NULL, + 0, 0, 0, + ide_config_cb2, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + +static const pci_subclass_t mass_subclass[] = { + { + 0x00, "SCSI bus controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x01, "IDE controller", "ide", ide_devices, NULL, + NULL, NULL, + }, + { + 0x02, "Floppy disk controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x03, "IPI bus controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x04, "RAID controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x05, "ATA controller", "ata", NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc mass-storage controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_dev_t eth_devices[] = { + { 0x10EC, 0x8029, + NULL, "NE2000", "NE2000 PCI", NULL, + 0, 0, 0, + NULL, "ethernet", + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + +static void eth_config_cb (const pci_config_t *config) +{ + phandle_t ph; + cell props[12]; + int i; + + ph = find_dev(config->path); + + set_property(ph, "network-type", "ethernet", 9); + set_property(ph, "removable", "network", 8); + set_property(ph, "category", "net", 4); + + for (i = 0; i < 7; i++) + { + props[i*2] = config->regions[i]; + props[i*2 + 1] = config->sizes[i]; + } + set_property(ph, "reg", props, i * 2 * sizeof(cell)); +} + +static const pci_subclass_t net_subclass[] = { + { + 0x00, "ethernet controller", NULL, eth_devices, NULL, + eth_config_cb, "ethernet", + }, + { + 0x01, "token ring controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "FDDI controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x03, "ATM controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x04, "ISDN controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x05, "WordFip controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x06, "PICMG 2.14 controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc network controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_dev_t vga_devices[] = { + { + 0x1002, 0x5046, + NULL, "ATY", "ATY Rage128", "VGA", + 0, 0, 0, + NULL, NULL, + }, + { + 0x1234, 0x1111, + NULL, "QEMU,VGA", "Qemu VGA", "VGA", + 0, 0, 0, + NULL, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + +/* VGA configuration */ + +static int vga_config_cb (const pci_config_t *config) +{ +#if 0 + if (config->regions[0] != 0x00000000) + vga_vbe_init(config->path, config->regions[0], config->sizes[0], + config->regions[1], config->sizes[1]); +#endif + return 0; +} + +static const struct pci_iface_t vga_iface[] = { + { + 0x00, "VGA controller", NULL, + vga_devices, &vga_config_cb, NULL, + }, + { + 0x01, "8514 compatible controller", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_subclass_t displ_subclass[] = { + { + 0x00, "display controller", NULL, NULL, vga_iface, + NULL, NULL, + }, + { + 0x01, "XGA display controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "3D display controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc display controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t media_subclass[] = { + { + 0x00, "video device", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x01, "audio device", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "computer telephony device", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc multimedia device", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t mem_subclass[] = { + { + 0x00, "RAM controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x01, "flash controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_dev_t grackle_fake_bridge = { + 0xFFFF, 0xFFFF, + "pci", "pci-bridge", "DEC,21154", "DEC,21154.pci-bridge", + -1, -1, -1, + NULL, NULL, +}; + +static const pci_dev_t uninorth_agp_fake_bridge = { + 0xFFFF, 0xFFFF, + "uni-north-agp", "uni-north-agp", NULL, "uni-north-agp", + -1, -1, -1, + NULL, NULL, +}; + +static const pci_dev_t uninorth_fake_bridge = { + 0xFFFF, 0xFFFF, + "uni-north", "uni-north", NULL, "uni-north", + -1, -1, -1, + NULL, NULL, +}; + + +static const pci_dev_t hbrg_devices[] = { + { + 0x106B, 0x0020, NULL, + "pci", "AAPL,UniNorth", "uni-north", + 3, 2, 1, + NULL, &uninorth_agp_fake_bridge, + }, + { + 0x106B, 0x001F, NULL, + "pci", "AAPL,UniNorth", "uni-north", + 3, 2, 1, + NULL, &uninorth_fake_bridge, + }, + { + 0x106B, 0x001E, NULL, + "pci", "AAPL,UniNorth", "uni-north", + 3, 2, 1, + NULL, &uninorth_fake_bridge, + }, + { + 0x1057, 0x0002, "pci", + "pci", "MOT,MPC106", "grackle", + 3, 2, 1, + NULL, &grackle_fake_bridge, + }, + { + 0x1057, 0x4801, NULL, + "pci-bridge", "PREP Host PCI Bridge - Motorola Raven", NULL, + 3, 2, 1, + NULL, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + +static const pci_dev_t PCIbrg_devices[] = { + { + 0x1011, 0x0026, NULL, + "pci-bridge", NULL, NULL, + 3, 2, 1, + NULL, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + +static const pci_subclass_t bridg_subclass[] = { + { + 0x00, "PCI host bridge", NULL, hbrg_devices, NULL, + NULL, NULL, + }, + { + 0x01, "ISA bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "EISA bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x03, "MCA bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x04, "PCI-to-PCI bridge", NULL, PCIbrg_devices, NULL, + NULL, NULL, + }, + { + 0x05, "PCMCIA bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x06, "NUBUS bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x07, "cardbus bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x08, "raceway bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x09, "semi-transparent PCI-to-PCI bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x0A, "infiniband-to-PCI bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc PCI bridge", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_iface_t serial_iface[] = { + { + 0x00, "XT serial controller", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "16450 serial controller", NULL, + NULL, NULL, NULL, + }, + { + 0x02, "16550 serial controller", NULL, + NULL, NULL, NULL, + }, + { + 0x03, "16650 serial controller", NULL, + NULL, NULL, NULL, + }, + { + 0x04, "16750 serial controller", NULL, + NULL, NULL, NULL, + }, + { + 0x05, "16850 serial controller", NULL, + NULL, NULL, NULL, + }, + { + 0x06, "16950 serial controller", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_iface_t par_iface[] = { + { + 0x00, "parallel port", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "bi-directional parallel port", NULL, + NULL, NULL, NULL, + }, + { + 0x02, "ECP 1.x parallel port", NULL, + NULL, NULL, NULL, + }, + { + 0x03, "IEEE 1284 controller", NULL, + NULL, NULL, NULL, + }, + { + 0xFE, "IEEE 1284 device", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_iface_t modem_iface[] = { + { + 0x00, "generic modem", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "Hayes 16450 modem", NULL, + NULL, NULL, NULL, + }, + { + 0x02, "Hayes 16550 modem", NULL, + NULL, NULL, NULL, + }, + { + 0x03, "Hayes 16650 modem", NULL, + NULL, NULL, NULL, + }, + { + 0x04, "Hayes 16750 modem", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_subclass_t comm_subclass[] = { + { + 0x00, "serial controller", NULL, NULL, serial_iface, + NULL, NULL, + }, + { + 0x01, "parallel port", NULL, NULL, par_iface, + NULL, NULL, + }, + { + 0x02, "multiport serial controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x03, "modem", NULL, NULL, modem_iface, + NULL, NULL, + }, + { + 0x04, "GPIB controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x05, "smart card", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc communication device", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_iface_t pic_iface[] = { + { + 0x00, "8259 PIC", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "ISA PIC", NULL, + NULL, NULL, NULL, + }, + { + 0x02, "EISA PIC", NULL, + NULL, NULL, NULL, + }, + { + 0x10, "I/O APIC", NULL, + NULL, NULL, NULL, + }, + { + 0x20, "I/O APIC", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_iface_t dma_iface[] = { + { + 0x00, "8237 DMA controller", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "ISA DMA controller", NULL, + NULL, NULL, NULL, + }, + { + 0x02, "EISA DMA controller", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_iface_t tmr_iface[] = { + { + 0x00, "8254 system timer", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "ISA system timer", NULL, + NULL, NULL, NULL, + }, + { + 0x02, "EISA system timer", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_iface_t rtc_iface[] = { + { + 0x00, "generic RTC controller", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "ISA RTC controller", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_dev_t sys_devices[] = { + /* IBM MPIC controller */ + { + 0x1014, 0x0002, + "open-pic", "MPIC", NULL, "chrp,open-pic", + 0, 0, 2, + NULL, NULL, + }, + /* IBM MPIC2 controller */ + { + 0x1014, 0xFFFF, + "open-pic", "MPIC2", NULL, "chrp,open-pic", + 0, 0, 2, + NULL, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + +static const pci_subclass_t sys_subclass[] = { + { + 0x00, "PIC", NULL, NULL, pic_iface, + NULL, NULL, + }, + { + 0x01, "DMA controller", NULL, NULL, dma_iface, + NULL, NULL, + }, + { + 0x02, "system timer", NULL, NULL, tmr_iface, + NULL, NULL, + }, + { + 0x03, "RTC controller", NULL, NULL, rtc_iface, + NULL, NULL, + }, + { + 0x04, "PCI hotplug controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc system peripheral", NULL, sys_devices, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t inp_subclass[] = { + { + 0x00, "keyboard controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x01, "digitizer", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "mouse controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x03, "scanner controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x04, "gameport controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc input device", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t dock_subclass[] = { + { + 0x00, "generic docking station", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc docking station", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t cpu_subclass[] = { + { + 0x00, "i386 processor", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x01, "i486 processor", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "pentium processor", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x10, "alpha processor", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x20, "PowerPC processor", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x30, "MIPS processor", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x40, "co-processor", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_iface_t usb_iface[] = { + { + 0x00, "UHCI USB controller", NULL, + NULL, NULL, NULL, + }, + { + 0x10, "OHCI USB controller", NULL, + NULL, NULL, NULL, + }, + { + 0x20, "EHCI USB controller", NULL, + NULL, NULL, NULL, + }, + { + 0x80, "misc USB controller", NULL, + NULL, NULL, NULL, + }, + { + 0xFE, "USB device", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_iface_t ipmi_iface[] = { + { + 0x00, "IPMI SMIC interface", NULL, + NULL, NULL, NULL, + }, + { + 0x01, "IPMI keyboard interface", NULL, + NULL, NULL, NULL, + }, + { + 0x02, "IPMI block transfer interface", NULL, + NULL, NULL, NULL, + }, + { + 0xFF, NULL, NULL, + NULL, NULL, NULL, + }, +}; + +static const pci_subclass_t ser_subclass[] = { + { + 0x00, "Firewire bus controller", "ieee1394", NULL, NULL, + NULL, NULL, + }, + { + 0x01, "ACCESS bus controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "SSA controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x03, "USB controller", "usb", NULL, usb_iface, + NULL, NULL, + }, + { + 0x04, "fibre channel controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x05, "SMBus controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x06, "InfiniBand controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x07, "IPMI interface", NULL, NULL, ipmi_iface, + NULL, NULL, + }, + { + 0x08, "SERCOS controller", NULL, NULL, ipmi_iface, + NULL, NULL, + }, + { + 0x09, "CANbus controller", NULL, NULL, ipmi_iface, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t wrl_subclass[] = { + { + 0x00, "IRDA controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x01, "consumer IR controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x10, "RF controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x11, "bluetooth controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x12, "broadband controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc wireless controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t sat_subclass[] = { + { + 0x01, "satellite TV controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x02, "satellite audio controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x03, "satellite voice controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x04, "satellite data controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t crypt_subclass[] = { + { + 0x00, "cryptographic network controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x10, "cryptographic entertainment controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc cryptographic controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_subclass_t spc_subclass[] = { + { + 0x00, "DPIO module", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x01, "performances counters", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x10, "communication synchronisation", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x20, "management card", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0x80, "misc signal processing controller", NULL, NULL, NULL, + NULL, NULL, + }, + { + 0xFF, NULL, NULL, NULL, NULL, + NULL, NULL, + }, +}; + +static const pci_class_t pci_classes[] = { + /* 0x00 */ + { "undefined", NULL, undef_subclass, }, + /* 0x01 */ + { "mass-storage controller", NULL, mass_subclass, }, + /* 0x02 */ + { "network controller", "network", net_subclass, }, + /* 0x03 */ + { "display controller", "display", displ_subclass, }, + /* 0x04 */ + { "multimedia device", NULL, media_subclass, }, + /* 0x05 */ + { "memory controller", "memory-controller", mem_subclass, }, + /* 0x06 */ + { "PCI bridge", "pci", bridg_subclass, }, + /* 0x07 */ + { "communication device", NULL, comm_subclass,}, + /* 0x08 */ + { "system peripheral", NULL, sys_subclass, }, + /* 0x09 */ + { "input device", NULL, inp_subclass, }, + /* 0x0A */ + { "docking station", NULL, dock_subclass, }, + /* 0x0B */ + { "processor", NULL, cpu_subclass, }, + /* 0x0C */ + { "serial bus controller", NULL, ser_subclass, }, + /* 0x0D */ + { "wireless controller", NULL, wrl_subclass, }, + /* 0x0E */ + { "intelligent I/O controller", NULL, NULL, }, + /* 0x0F */ + { "satellite communication controller", NULL, sat_subclass, }, + /* 0x10 */ + { "cryptographic controller", NULL, crypt_subclass, }, + /* 0x11 */ + { "signal processing controller", NULL, spc_subclass, }, +}; + +phandle_t pic_handle; +static int macio_config_cb (const pci_config_t *config) +{ + char buf[64]; + phandle_t ph; + cell props[2]; + + sprintf(buf, "%s/interrupt-controller", config->path); + REGISTER_NAMED_NODE(ob_pci_node, buf); + + ph = find_dev(buf); + set_property(ph, "device_type", "interrupt-controller", 21); + set_property(ph, "compatible", "heathrow\0mac-risc", 18); + set_int_property(ph, "#interrupt-cells", 1); + props[0]= 0x10; + props[1]= 0x20; + set_property(ph, "reg", &props, sizeof(props)); + pic_handle = ph; + +#if 0 + cuda_init(config->path, config->regions[0]); + macio_nvram_init(config->path, config->regions[0]); + ide_init(config->path, + config->regions[0] + 0x1f000, + config->regions[0] + 0x1f000 + 0x1000, + config->regions[0] + 0x1f000 + 0x2000, + config->regions[0] + 0x1f000 + 0x3000); +#endif +#if 0 + OF_finalize_pci_macio(device->common.OF_private, + device->regions[0] & ~0x0000000F, device->sizes[0], + private_data); +#endif + return 0; +} + +static const pci_dev_t misc_pci[] = { + /* Paddington Mac I/O */ + { + 0x106B, 0x0017, + "mac-io", "mac-io", "AAPL,343S1211", "paddington\1heathrow", + 1, 1, 1, + &macio_config_cb, NULL, + }, + /* KeyLargo Mac I/O */ + { + 0x106B, 0x0022, + "mac-io", "mac-io", "AAPL,Keylargo", "Keylargo", + 1, 1, 2, + &macio_config_cb, NULL, + }, + { + 0xFFFF, 0xFFFF, + NULL, NULL, NULL, NULL, + -1, -1, -1, + NULL, NULL, + }, +}; + +static const pci_dev_t *pci_find_device (uint8_t class, uint8_t subclass, + uint8_t iface, uint16_t vendor, + uint16_t product) +{ + int (*config_cb)(pci_config_t *config); + const pci_class_t *pclass; + const pci_subclass_t *psubclass; + const pci_iface_t *piface; + const pci_dev_t *dev; + const void *private; + pci_dev_t *new; + const char *name, *type; + + name = "unknown"; + type = "unknown"; + config_cb = NULL; + private = NULL; + + if (class == 0x00 && subclass == 0x01) { + /* Special hack for old style VGA devices */ + class = 0x03; + subclass = 0x00; + } else if (class == 0xFF) { + /* Special case for misc devices */ + dev = misc_pci; + goto find_device; + } + if (class > (sizeof(pci_classes) / sizeof(pci_class_t))) { + name = "invalid PCI device"; + type = "invalid"; + goto bad_device; + } + pclass = &pci_classes[class]; + name = pclass->name; + type = pclass->type; + for (psubclass = pclass->subc; ; psubclass++) { + if (psubclass->subclass == 0xFF) + goto bad_device; + if (psubclass->subclass == subclass) { + if (psubclass->name != NULL) + name = psubclass->name; + if (psubclass->type != NULL) + type = psubclass->type; + if (psubclass->config_cb != NULL) { + config_cb = psubclass->config_cb; + } + if (psubclass->private != NULL) + private = psubclass->private; + if (psubclass->iface != NULL) + break; + dev = psubclass->devices; + goto find_device; + } + } + for (piface = psubclass->iface; ; piface++) { + if (piface->iface == 0xFF) { + dev = psubclass->devices; + break; + } + if (piface->iface == iface) { + if (piface->name != NULL) + name = piface->name; + if (piface->type != NULL) + type = piface->type; + if (piface->config_cb != NULL) { + config_cb = piface->config_cb; + } + if (piface->private != NULL) + private = piface->private; + dev = piface->devices; + break; + } + } + find_device: + for (;; dev++) { + if (dev->vendor == 0xFFFF && dev->product == 0xFFFF) { + goto bad_device; + } + if (dev->vendor == vendor && dev->product == product) { + if (dev->name != NULL) + name = dev->name; + if (dev->type != NULL) + type = dev->type; + if (dev->config_cb != NULL) { + config_cb = dev->config_cb; + } + if (dev->private != NULL) + private = dev->private; + new = malloc(sizeof(pci_dev_t)); + if (new == NULL) + return NULL; + new->vendor = vendor; + new->product = product; + new->type = type; + new->name = name; + new->model = dev->model; + new->compat = dev->compat; + new->config_cb = config_cb; + new->private = private; + + return new; + } + } + bad_device: + printk("Cannot manage '%s' PCI device type '%s':\n %x %x (%x %x %x)\n", + name, type, vendor, product, class, subclass, iface); + + return NULL; +} + +#define set_bool_property(ph, name) set_property(ph, name, NULL, 0); + + +static void ob_pci_add_properties(pci_addr addr, const pci_dev_t *pci_dev, + const pci_config_t *config) +{ phandle_t dev=get_cur_dev(); int status,id; + uint16_t vendor_id, device_id; + uint8_t rev; + vendor_id = pci_config_read16(addr, PCI_VENDOR_ID); + device_id = pci_config_read16(addr, PCI_DEVICE_ID); + rev = pci_config_read8(addr, PCI_REVISION_ID); + /* create properties as described in 2.5 */ - set_int_property(dev, "vendor-id", pci_config_read16(addr, PCI_VENDOR_ID)); - set_int_property(dev, "device-id", pci_config_read16(addr, PCI_DEVICE_ID)); - set_int_property(dev, "revision-id", pci_config_read8(addr, PCI_REVISION_ID)); + printk("%s\n", pci_dev->name); + set_int_property(dev, "vendor-id", vendor_id); + set_int_property(dev, "device-id", device_id); + set_int_property(dev, "revision-id", rev); set_int_property(dev, "interrupts", pci_config_read8(addr, PCI_INTERRUPT_LINE)); @@ -95,14 +1310,32 @@ set_int_property(dev, "cache-line-size", pci_config_read16(addr, PCI_CACHE_LINE_SIZE)); + if (pci_dev->type) { + push_str(pci_dev->type); + fword("encode-string"); + push_str("device_type"); + fword("property"); + } + if (pci_dev->model) { + push_str(pci_dev->model); + fword("encode-string"); + push_str("model"); + fword("property"); + } + push_str(pci_dev->name); + fword("encode-string"); + push_str("class"); + fword("property"); + if (pci_dev->config_cb) + pci_dev->config_cb(config); } -static int ob_pci_add_reg(pci_addr addr) +static void ob_pci_add_reg(pci_addr addr) { PUSH(0); PUSH(0); - PUSH(addr&(~0x80000000u)); + PUSH(addr&(~arch->cfg_base)); fword("pci-addr-encode"); PUSH(0); PUSH(0); @@ -112,118 +1345,6 @@ fword("property"); } -static int ob_pci_add_class(pci_addr addr) -{ - unsigned int class; - char *strc; - - class=pci_config_read16(addr, PCI_CLASS_DEVICE); - switch (class) { - case 0x001: strc="display"; break; - case 0x100: strc="scsi"; break; - case 0x101: strc="ide"; break; - case 0x102: strc="fdc"; break; - case 0x103: strc="ipi"; break; - case 0x104: strc="raid"; break; - case 0x200: strc="ethernet"; break; - case 0x201: strc="token-ring"; break; - case 0x202: strc="fddi"; break; - case 0x203: strc="atm"; break; - case 0x400: strc="video"; break; - case 0x401: strc="sound"; break; - case 0x500: strc="memory"; break; - case 0x501: strc="flash"; break; - case 0x600: strc="host"; break; - case 0x601: strc="isa"; break; - case 0x602: strc="eisa"; break; - case 0x603: strc="mca"; break; - case 0x604: strc="pci"; break; - case 0x605: strc="pcmcia"; break; - case 0x606: strc="nubus"; break; - case 0x607: strc="cardbus"; break; - case 0x680: strc="pmu"; break; /* not in pci binding */ - case 0x700: strc="serial"; break; - case 0x701: strc="parallel"; break; - case 0x703: strc="modem"; break; /* not in pci binding */ - case 0x800: strc="interrupt-controller"; break; - case 0x801: strc="dma-controller"; break; - case 0x802: strc="timer"; break; - case 0x803: strc="rtc"; break; - case 0x900: strc="keyboard"; break; - case 0x901: strc="pen"; break; - case 0x902: strc="mouse"; break; - case 0xC00: strc="firewire"; break; - case 0xC01: strc="access-bus"; break; - case 0xC02: strc="ssa"; break; - case 0xC03: strc="usb"; break; - case 0xC04: strc="fibre-channel"; break; - default: - switch (class>>8) { - case 0x3: strc="display"; break; - case 0xA: strc="dock"; break; - case 0xB: strc="cpu"; break; - default:strc="unknown"; break; - } - } - if ((class>>8) == 0x03) { - push_str(strc); - fword("encode-string"); - push_str("device_type"); - fword("property"); - } - push_str(strc); - fword("encode-string"); - push_str("class"); - fword("property"); - - -#ifdef CONFIG_DEBUG_PCI - printk("%s\n", strc); -#endif -} - -static void -pci_enable_rom(pci_addr dev) -{ - u32 rom_addr; - - rom_addr=pci_config_read32(dev, PCI_ROM_ADDRESS); - rom_addr |= PCI_ROM_ADDRESS_ENABLE; - pci_config_write32(dev, PCI_ROM_ADDRESS, rom_addr); -} - -static void -pci_disable_rom(pci_addr dev) -{ - u32 rom_addr; - - rom_addr=pci_config_read32(dev, PCI_ROM_ADDRESS); - rom_addr &= ~PCI_ROM_ADDRESS_ENABLE; - pci_config_write32(dev, PCI_ROM_ADDRESS, rom_addr); -} - - -static void ob_pci_scan_rom(pci_addr addr) -{ - unsigned long rom_addr=pci_config_read32(addr,PCI_ROM_ADDRESS); - unsigned char *walk; - - rom_addr &= PCI_ROM_ADDRESS_MASK; - if(rom_addr) { - printk(" ROM found at 0x%lx\n",rom_addr); - pci_enable_rom(addr); - walk=phys_to_virt((unsigned char *)rom_addr); - if (walk[0]!=0x55 || walk[1]!=0xaa) { - printk("no pci rom\n"); - goto rom_err; - } - -rom_err: - pci_disable_rom(addr); - } - -} - #ifdef CONFIG_XBOX static char pci_xbox_blacklisted (int bus, int devnum, int fn) { @@ -263,14 +1384,92 @@ } #endif -static void ob_scan_pci_bus(int bus, char *path) +static void +ob_pci_configure(pci_arch_t *addr, pci_config_t *config, uint32_t *mem_base, + uint32_t *io_base) + { + uint32_t smask, omask, amask, size, reloc, min_align; + uint32_t *base; + pci_addr config_addr; + int reg; + + omask = 0x00000000; + for (reg = 0; reg < 7; reg++) { + + config->regions[reg] = 0x00000000; + config->sizes[reg] = 0x00000000; + + if ((omask & 0x0000000f) == 0x4) { + /* 64 bits memory mapping */ + continue; + } + + if (reg == 6) + config_addr = PCI_ROM_ADDRESS; + else + config_addr = PCI_BASE_ADDR_0 + reg * 4; + + /* get region size */ + + pci_config_write32(addr, config_addr, 0xffffffff); + smask = pci_config_read32(addr, config_addr); + if (smask == 0x00000000 || smask == 0xffffffff) + continue; + + if (smask & 0x00000001 && reg != 6) { + /* I/O space */ + base = *io_base; + min_align = 1 << 7; + amask = 0x00000001; + pci_config_write16(addr, PCI_COMMAND, + pci_config_read16(addr, + PCI_COMMAND) | + PCI_COMMAND_IO); + } else { + /* Memory Space */ + base = *mem_base; + min_align = 1 << 16; + amask = 0x0000000F; + if (reg == 6) { + smask |= 1; /* ROM */ + } + pci_config_write16(addr, PCI_COMMAND, + pci_config_read16(addr, + PCI_COMMAND) | + PCI_COMMAND_MEMORY); + } + omask = smask & amask; + smask &= ~amask; + size = (~smask) + 1; + config->sizes[reg] = size; + reloc = base; + if (size < min_align) + size = min_align; + reloc = (reloc + size -1) & ~(size - 1); + if (*io_base == base) { + *io_base = reloc + size; + reloc -= arch->io_base; + } else { + *mem_base = reloc + size; + } + pci_config_write32(addr, config_addr, reloc | omask); + config->regions[reg] = reloc; +printk("region %08x size %08x\n", config->regions[reg], config->sizes[reg]); + } +} + +static void ob_scan_pci_bus(int bus, unsigned long *mem_base, + unsigned long *io_base, const char *path) +{ int devnum, fn, is_multi, vid, did; unsigned int htype; pci_addr addr; - char * nodetemp = "%s/pci%x,%x"; - char nodebuff[32]; phandle_t dnode, dbus; + pci_config_t config; + const pci_dev_t *pci_dev; + uint32_t ccode; + uint8_t class, subclass, iface, rev; for (devnum = 0; devnum < 32; devnum++) { is_multi = 0; @@ -279,13 +1478,21 @@ if (pci_xbox_blacklisted (bus, devnum, fn)) continue; #endif - addr = PCI_ADDR(bus, devnum, fn); vid = pci_config_read16(addr, PCI_VENDOR_ID); did = pci_config_read16(addr, PCI_DEVICE_ID); if (vid==0xffff || vid==0) continue; + + ccode = pci_config_read16(addr, PCI_CLASS_DEVICE); + class = ccode >> 8; + subclass = ccode; + iface = pci_config_read8(addr, PCI_CLASS_PROG); + rev = pci_config_read8(addr, PCI_REVISION_ID); + + pci_dev = pci_find_device(class, subclass, iface, vid, did); + #ifdef CONFIG_DEBUG_PCI printk("%x:%x.%x - %x:%x - ", bus, devnum, fn, vid, did); @@ -297,35 +1504,49 @@ activate_device(path); dbus=get_cur_dev(); - sprintf(nodebuff, nodetemp, path, vid, did); + if (pci_dev == NULL || pci_dev->name == NULL) + sprintf(config.path, "%s/pci%x,%x", path, vid, did); + else + sprintf(config.path, "%s/%s", path, pci_dev->name); #ifdef CONFIG_DEBUG_PCI - printk("%s - ", nodebuff); + printk("%s - ", config.path); #endif - REGISTER_NAMED_NODE(ob_pci_node, nodebuff); - dnode=find_dev(nodebuff); + REGISTER_NAMED_NODE(ob_pci_node, config.path); + dnode=find_dev(config.path); activate_dev( dnode ); - - ob_pci_add_properties(addr); + ob_pci_configure(addr, &config, mem_base, io_base); +{ + int irq_pin, irq_line; + static const uint8_t heathrow_pci_irqs[4] = { 0x15, 0x16, 0x17, 0x18 }; + irq_pin = pci_config_read8(addr, PCI_INTERRUPT_PIN); + if (irq_pin > 0) { + irq_pin = (devnum + irq_pin - 1) & 3; + irq_line = heathrow_pci_irqs[irq_pin]; + } +} + ob_pci_add_properties(addr, pci_dev, &config); ob_pci_add_reg(addr); - ob_pci_add_class(addr); - ob_pci_scan_rom(addr); device_end(); - activate_dev( dbus ); + } } } - int ob_pci_init(void) { - char *path="/pci"; - int bus; + int bus; + unsigned long mem_base, io_base; printk("Initializing PCI devices...\n"); - + /* brute force bus scan */ - for (bus=0; bus<0x100; bus++) { - ob_scan_pci_bus(bus, path); + + /* Find all PCI bridges */ + + mem_base = arch->mem_base; + io_base = arch->io_base; + for (bus = 0; bus<0x100; bus++) { + ob_scan_pci_bus(bus, &mem_base, &io_base, "/pci"); } return 0; }
[View Less]
1
0
0
0
r270 - in openbios-devel: arch/ppc/qemu arch/sparc64 drivers include/openbios include/ppc include/sparc64
by svn@openbios.org
29 Nov '08
29 Nov '08
Author: blueswirl Date: 2008-11-29 14:18:32 +0100 (Sat, 29 Nov 2008) New Revision: 270 Modified: openbios-devel/arch/ppc/qemu/init.c openbios-devel/arch/sparc64/openbios.c openbios-devel/drivers/pci.c openbios-devel/drivers/pci.h openbios-devel/include/openbios/pci.h openbios-devel/include/ppc/pci.h openbios-devel/include/sparc64/pci.h Log: Use pci_arch_t also on Sparc64 (but disable PCI probing for now, hangs) Modified: openbios-devel/arch/ppc/qemu/init.c ================
…
[View More]
=================================================== --- openbios-devel/arch/ppc/qemu/init.c 2008-11-29 13:10:17 UTC (rev 269) +++ openbios-devel/arch/ppc/qemu/init.c 2008-11-29 13:18:32 UTC (rev 270) @@ -61,7 +61,6 @@ 0xfe000000, 0x00800000, 0xfd000000, 0x01000000, }, }; -pci_arch_t *arch; uint32_t isa_io_base; void Modified: openbios-devel/arch/sparc64/openbios.c =================================================================== --- openbios-devel/arch/sparc64/openbios.c 2008-11-29 13:10:17 UTC (rev 269) +++ openbios-devel/arch/sparc64/openbios.c 2008-11-29 13:18:32 UTC (rev 270) @@ -16,6 +16,8 @@ #include "openbios/nvram.h" #include "sys_info.h" #include "openbios.h" +#include "openbios/pci.h" +#include "asm/pci.h" #include "libc/byteorder.h" #define cpu_to_be16(x) __cpu_to_be16(x) #include "openbios/firmware_abi.h" @@ -30,6 +32,10 @@ #define BIOS_CFG_CMD 0x510 #define BIOS_CFG_DATA 0x511 +#define APB_SPECIAL_BASE 0x1fe00000000ULL +#define PCI_CONFIG (APB_SPECIAL_BASE + 0x1000000ULL) +#define APB_MEM_BASE 0x1ff00000000ULL + static unsigned char intdict[256 * 1024]; // XXX @@ -45,6 +51,26 @@ static uint8_t idprom[32]; +struct hwdef { + pci_arch_t pci; + uint8_t machine_id_low, machine_id_high; +}; + +static const struct hwdef hwdefs[] = { + { + .pci.cfg_addr = PCI_CONFIG, + .pci.cfg_data = 0, + .pci.cfg_base = 0x80000000ULL, + .pci.cfg_len = 0, + .pci.mem_base = 0, + .pci.mem_len = 0, + .pci.io_base = 0, + .pci.io_len = 0, + .machine_id_low = 0, + .machine_id_high = 255, + }, +}; + struct cpudef { unsigned long iu_version; const char *name; @@ -818,9 +844,26 @@ static void arch_init( void ) { + unsigned int i; + uint8_t qemu_machine_type; + const struct hwdef *hwdef; + + outw(__cpu_to_le16(FW_CFG_MACHINE_ID), BIOS_CFG_CMD); + qemu_machine_type = inb(BIOS_CFG_DATA); + + for (i = 0; i < sizeof(hwdefs) / sizeof(struct hwdef); i++) { + if (hwdefs[i].machine_id_low <= qemu_machine_type && + hwdefs[i].machine_id_high >= qemu_machine_type) { + hwdef = &hwdefs[i]; + break; + } + } + if (!hwdef) + for(;;); // Internal inconsistency, hang + modules_init(); #ifdef CONFIG_DRIVER_PCI - ob_pci_init(); + //ob_pci_init(); #endif #ifdef CONFIG_DRIVER_IDE setup_timers(); Modified: openbios-devel/drivers/pci.c =================================================================== --- openbios-devel/drivers/pci.c 2008-11-29 13:10:17 UTC (rev 269) +++ openbios-devel/drivers/pci.c 2008-11-29 13:18:32 UTC (rev 270) @@ -29,6 +29,8 @@ /* DECLARE data structures for the nodes. */ DECLARE_UNNAMED_NODE( ob_pci_node, INSTALL_OPEN, 2*sizeof(int) ); +pci_arch_t *arch; + static void ob_pci_open(int *idx) { Modified: openbios-devel/drivers/pci.h =================================================================== --- openbios-devel/drivers/pci.h 2008-11-29 13:10:17 UTC (rev 269) +++ openbios-devel/drivers/pci.h 2008-11-29 13:18:32 UTC (rev 270) @@ -54,8 +54,6 @@ #define PCI_MIN_GNT 0x3e /* 8 bits */ #define PCI_MAX_LAT 0x3f /* 8 bits */ -typedef uint32_t pci_addr; - typedef struct { u16 signature; u8 reserved[0x16]; Modified: openbios-devel/include/openbios/pci.h =================================================================== --- openbios-devel/include/openbios/pci.h 2008-11-29 13:10:17 UTC (rev 269) +++ openbios-devel/include/openbios/pci.h 2008-11-29 13:18:32 UTC (rev 270) @@ -1,22 +1,26 @@ #ifndef _H_PCI #define _H_PCI +typedef uint32_t pci_addr; + typedef struct pci_arch_t pci_arch_t; struct pci_arch_t { - char * name; - uint16_t vendor_id; - uint16_t device_id; - uint32_t cfg_addr; - uint32_t cfg_data; - uint32_t cfg_base; - uint32_t cfg_len; - uint32_t mem_base; - uint32_t mem_len; - uint32_t io_base; - uint32_t io_len; - uint32_t rbase; - uint32_t rlen; + const char * name; + uint16_t vendor_id; + uint16_t device_id; + unsigned long cfg_addr; + unsigned long cfg_data; + unsigned long cfg_base; + unsigned long cfg_len; + unsigned long mem_base; + unsigned long mem_len; + unsigned long io_base; + unsigned long io_len; + unsigned long rbase; + unsigned long rlen; }; +extern pci_arch_t *arch; + #endif /* _H_PCI */ Modified: openbios-devel/include/ppc/pci.h =================================================================== --- openbios-devel/include/ppc/pci.h 2008-11-29 13:10:17 UTC (rev 269) +++ openbios-devel/include/ppc/pci.h 2008-11-29 13:18:32 UTC (rev 270) @@ -3,7 +3,7 @@ #include "asm/io.h" -#if !(PCI_CONFIG_1 || PCI_CONFIG_2) +#if !(defined(PCI_CONFIG_1) || defined(PCI_CONFIG_2)) #define PCI_CONFIG_1 1 /* default */ #endif @@ -11,8 +11,6 @@ /* PCI Configuration Mechanism #1 */ -extern pci_arch_t *arch; - #define PCI_ADDR(bus, dev, fn) \ ((pci_addr) (arch->cfg_base \ | (uint32_t) (bus) << 16 \ Modified: openbios-devel/include/sparc64/pci.h =================================================================== --- openbios-devel/include/sparc64/pci.h 2008-11-29 13:10:17 UTC (rev 269) +++ openbios-devel/include/sparc64/pci.h 2008-11-29 13:18:32 UTC (rev 270) @@ -11,10 +11,8 @@ /* PCI Configuration Mechanism #1 */ -/* Have pci_addr in the same format as the values written to 0xcf8 - * so register accesses can be made easy. */ #define PCI_ADDR(bus, dev, fn) \ - ((pci_addr) (0x80000000u \ + ((pci_addr) (arch->cfg_base \ | (uint32_t) (bus) << 16 \ | (uint32_t) (dev) << 11 \ | (uint32_t) (fn) << 8)) @@ -23,46 +21,47 @@ #define PCI_DEV(pcidev) ((uint8_t) ((pcidev) >> 11) & 0x1f) #define PCI_FN(pcidev) ((uint8_t) ((pcidev) >> 8) & 7) -#define APB_SPECIAL_BASE 0x1fe00000000ULL -#define PCI_CONFIG (APB_SPECIAL_BASE + 0x1000000ULL) -#define APB_MEM_BASE 0x1ff00000000ULL - static inline uint8_t pci_config_read8(pci_addr dev, uint8_t reg) { - out_le32((void *)PCI_CONFIG, dev | (reg & ~3)); - return in_8((void *)(APB_MEM_BASE | (reg & 3))); + uint8_t res; + out_le32((unsigned *)arch->cfg_addr, dev | (reg & ~3)); + res = in_8((unsigned char*)(arch->cfg_data + (reg & 3))); + return res; } static inline uint16_t pci_config_read16(pci_addr dev, uint8_t reg) { - out_le32((void *)PCI_CONFIG, dev | (reg & ~3)); - return in_le16((void *)(APB_MEM_BASE | (reg & 2))); + uint16_t res; + out_le32((unsigned *)arch->cfg_addr, dev | (reg & ~3)); + res = in_le16((unsigned short*)(arch->cfg_data + (reg & 2))); + return res; } static inline uint32_t pci_config_read32(pci_addr dev, uint8_t reg) { - out_le32((void *)PCI_CONFIG, dev | reg); - return in_le32((void *)(APB_MEM_BASE | reg)); + uint32_t res; + out_le32((unsigned *)arch->cfg_addr, dev | reg); + res = in_le32((unsigned *)(arch->cfg_data + reg)); + return res; } static inline void pci_config_write8(pci_addr dev, uint8_t reg, uint8_t val) { - out_le32((void *)PCI_CONFIG, dev | (reg & ~3)); - out_8((void *)(APB_MEM_BASE | (reg & 3)), val); + out_le32((unsigned *)arch->cfg_addr, dev | (reg & ~3)); + out_8((unsigned char*)(arch->cfg_data + (reg & 3)), val); } static inline void pci_config_write16(pci_addr dev, uint8_t reg, uint16_t val) { - out_le32((void *)PCI_CONFIG, dev | (reg & ~3)); - out_le16((void *)(APB_MEM_BASE | (reg & 2)), val); + out_le32((unsigned *)arch->cfg_addr, dev | (reg & ~3)); + out_le16((unsigned short *)(arch->cfg_data + (reg & 2)), val); } static inline void pci_config_write32(pci_addr dev, uint8_t reg, uint32_t val) { - out_le32((void *)PCI_CONFIG, dev | reg); - out_le32((void *)(APB_MEM_BASE | reg), val); + out_le32((unsigned *)arch->cfg_addr, dev | reg); + out_le32((unsigned *)(arch->cfg_data + reg), val); } - #else /* !PCI_CONFIG_1 */ #error PCI Configuration Mechanism is not specified or implemented #endif
[View Less]
1
0
0
0
r269 - openbios-devel/kernel
by svn@openbios.org
29 Nov '08
29 Nov '08
Author: blueswirl Date: 2008-11-29 14:10:17 +0100 (Sat, 29 Nov 2008) New Revision: 269 Modified: openbios-devel/kernel/bootstrap.c Log: Fix some warnings Modified: openbios-devel/kernel/bootstrap.c =================================================================== --- openbios-devel/kernel/bootstrap.c 2008-11-28 20:28:23 UTC (rev 268) +++ openbios-devel/kernel/bootstrap.c 2008-11-29 13:10:17 UTC (rev 269) @@ -411,7 +411,7 @@ static void builddefer(char *name) { fcreate(name, DODFR); /*
…
[View More]
see dict.h for DODFR and other CFA ids */ - writecell(0); + writecell((ucell)0); writecell((ucell)findword("(semis)")); } @@ -611,7 +611,7 @@ writecell(LIT); writecell(pointer2cell(dict) + loco); writecell(LIT); - writecell(cnt); + writecell((ucell)cnt); writecell(DOBRANCH); loco = cnt + sizeof(cell) - 1; loco &= ~(sizeof(cell) - 1);
[View Less]
1
0
0
0
← Newer
1
2
3
4
5
6
7
Older →
Jump to page:
1
2
3
4
5
6
7
Results per page:
10
25
50
100
200