summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/io/pci/pci_boot.c
diff options
context:
space:
mode:
authorDana Myers <Dana.Myers@Sun.COM>2008-10-15 19:26:19 -0400
committerDana Myers <Dana.Myers@Sun.COM>2008-10-15 19:26:19 -0400
commitdb2bae3047e71d795bde12e3baa621f4b6cc8930 (patch)
tree6f7ced35318bced4805171292ec76a5229f3e78a /usr/src/uts/intel/io/pci/pci_boot.c
parent25351652d920ae27c5a56c199da581033ce763f6 (diff)
downloadillumos-joyent-db2bae3047e71d795bde12e3baa621f4b6cc8930.tar.gz
6464695 acpica: update to Intel ACPI CA 20080829
6747548 acpica: must check size of buffers returned from AcpiEvaluateObject() --HG-- rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsfield.c => usr/src/uts/intel/io/acpica/dispatcher/dsfield.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsinit.c => usr/src/uts/intel/io/acpica/dispatcher/dsinit.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmethod.c => usr/src/uts/intel/io/acpica/dispatcher/dsmethod.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmthdat.c => usr/src/uts/intel/io/acpica/dispatcher/dsmthdat.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsobject.c => usr/src/uts/intel/io/acpica/dispatcher/dsobject.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsopcode.c => usr/src/uts/intel/io/acpica/dispatcher/dsopcode.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsutils.c => usr/src/uts/intel/io/acpica/dispatcher/dsutils.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswexec.c => usr/src/uts/intel/io/acpica/dispatcher/dswexec.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswload.c => usr/src/uts/intel/io/acpica/dispatcher/dswload.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswscope.c => usr/src/uts/intel/io/acpica/dispatcher/dswscope.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswstate.c => usr/src/uts/intel/io/acpica/dispatcher/dswstate.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconfig.c => usr/src/uts/intel/io/acpica/executer/exconfig.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconvrt.c => usr/src/uts/intel/io/acpica/executer/exconvrt.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/excreate.c => usr/src/uts/intel/io/acpica/executer/excreate.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exdump.c => usr/src/uts/intel/io/acpica/executer/exdump.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfield.c => usr/src/uts/intel/io/acpica/executer/exfield.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfldio.c => usr/src/uts/intel/io/acpica/executer/exfldio.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmisc.c => usr/src/uts/intel/io/acpica/executer/exmisc.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmutex.c => usr/src/uts/intel/io/acpica/executer/exmutex.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exnames.c => usr/src/uts/intel/io/acpica/executer/exnames.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg1.c => usr/src/uts/intel/io/acpica/executer/exoparg1.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg2.c => usr/src/uts/intel/io/acpica/executer/exoparg2.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg3.c => usr/src/uts/intel/io/acpica/executer/exoparg3.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg6.c => usr/src/uts/intel/io/acpica/executer/exoparg6.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exprep.c => usr/src/uts/intel/io/acpica/executer/exprep.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exregion.c => usr/src/uts/intel/io/acpica/executer/exregion.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresnte.c => usr/src/uts/intel/io/acpica/executer/exresnte.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresolv.c => usr/src/uts/intel/io/acpica/executer/exresolv.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresop.c => usr/src/uts/intel/io/acpica/executer/exresop.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstore.c => usr/src/uts/intel/io/acpica/executer/exstore.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstoren.c => usr/src/uts/intel/io/acpica/executer/exstoren.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstorob.c => usr/src/uts/intel/io/acpica/executer/exstorob.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exsystem.c => usr/src/uts/intel/io/acpica/executer/exsystem.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exutils.c => usr/src/uts/intel/io/acpica/executer/exutils.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psargs.c => usr/src/uts/intel/io/acpica/parser/psargs.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c => usr/src/uts/intel/io/acpica/parser/psloop.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psopcode.c => usr/src/uts/intel/io/acpica/parser/psopcode.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psparse.c => usr/src/uts/intel/io/acpica/parser/psparse.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psscope.c => usr/src/uts/intel/io/acpica/parser/psscope.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/pstree.c => usr/src/uts/intel/io/acpica/parser/pstree.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psutils.c => usr/src/uts/intel/io/acpica/parser/psutils.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/pswalk.c => usr/src/uts/intel/io/acpica/parser/pswalk.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psxface.c => usr/src/uts/intel/io/acpica/parser/psxface.c
Diffstat (limited to 'usr/src/uts/intel/io/pci/pci_boot.c')
-rw-r--r--usr/src/uts/intel/io/pci/pci_boot.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/usr/src/uts/intel/io/pci/pci_boot.c b/usr/src/uts/intel/io/pci/pci_boot.c
index b59724ca9b..761c8f9499 100644
--- a/usr/src/uts/intel/io/pci/pci_boot.c
+++ b/usr/src/uts/intel/io/pci/pci_boot.c
@@ -246,30 +246,27 @@ static int
pci_bbn_present(int bus)
{
ACPI_HANDLE hdl;
- ACPI_BUFFER rb;
int rv;
/* no dip means no _BBN */
if (pci_bus_res[bus].dip == NULL)
return (0);
- rv = acpica_get_handle(pci_bus_res[bus].dip, &hdl);
- if (rv != AE_OK)
- return (-1);
-
- rb.Length = ACPI_ALLOCATE_BUFFER;
-
- rv = AcpiEvaluateObject(hdl, "_BBN", NULL, &rb);
-
- if (rb.Length > 0)
- AcpiOsFree(rb.Pointer);
+ rv = -1; /* default return value in case of error below */
+ if (ACPI_SUCCESS(acpica_get_handle(pci_bus_res[bus].dip, &hdl))) {
+ switch (AcpiEvaluateObject(hdl, "_BBN", NULL, NULL)) {
+ case AE_OK:
+ rv = 1;
+ break;
+ case AE_NOT_FOUND:
+ rv = 0;
+ break;
+ default:
+ break;
+ }
+ }
- if (rv == AE_OK)
- return (1);
- else if (rv == AE_NOT_FOUND)
- return (0);
- else
- return (-1);
+ return (rv);
}
/*
@@ -309,8 +306,8 @@ pci_bus_renumber()
return (1);
/* get the FADT */
- if (AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&fadt) != AE_OK)
+ if (AcpiGetTable(ACPI_SIG_FADT, 1, (ACPI_TABLE_HEADER **)&fadt) !=
+ AE_OK)
return (0);
/* compare OEM Table ID to "SUNm31" */