#include <sys/rman.h>
#include "acpi.h"
-#include "accommon.h"
#include "acpivar.h"
#include "acpi_cpu.h"
gas.Address = sc->cpu_p_blk + 4;
cx_ptr->rid = sc->cpu_parent->cpux_next_rid;
- cx_ptr->p_lvlx = acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->rid, &gas,
+ acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->type, &cx_ptr->rid, &gas, &cx_ptr->p_lvlx,
RF_SHAREABLE);
if (cx_ptr->p_lvlx != NULL) {
sc->cpu_parent->cpux_next_rid++;
gas.Address = sc->cpu_p_blk + 5;
cx_ptr->rid = sc->cpu_parent->cpux_next_rid;
- cx_ptr->p_lvlx = acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->rid, &gas,
- RF_SHAREABLE);
+ acpi_bus_alloc_gas(sc->cpu_dev, &cx_ptr->type, &cx_ptr->rid, &gas,
+ &cx_ptr->p_lvlx, RF_SHAREABLE);
if (cx_ptr->p_lvlx != NULL) {
sc->cpu_parent->cpux_next_rid++;
cx_ptr->type = ACPI_STATE_C3;
/* Allocate the control register for C2 or C3. */
cx_ptr->rid = sc->cpu_parent->cpux_next_rid;
- acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->rid, &cx_ptr->p_lvlx,
+ acpi_PkgGas(sc->cpu_dev, pkg, 0, &cx_ptr->type, &cx_ptr->rid, &cx_ptr->p_lvlx,
RF_SHAREABLE);
if (cx_ptr->p_lvlx) {
sc->cpu_parent->cpux_next_rid++;
if (val) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"acpi_cpu: PIIX4: reset BRLD_EN_BM\n"));
- AcpiWriteBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 0);
+ AcpiReadBitRegister(ACPI_BITREG_BUS_MASTER_RLD, 0);
}
break;
default:
return error;
}
if (bootverbose) {
- device_printf(dev, "control reg %jd %jx\n",
- (intmax_t)sc->pst_creg.pr_gas.SpaceId,
- (intmax_t)sc->pst_creg.pr_gas.Address);
+ device_printf(dev, "control reg %d %llx\n",
+ sc->pst_creg.pr_gas.SpaceId,
+ sc->pst_creg.pr_gas.Address);
}
/* Save and try allocating status register */
struct acpi_pst_res *res)
{
struct acpi_pst_softc *sc = device_get_softc(dev);
- int error;
+ int error, type;
/* Save GAS */
error = acpi_PkgRawGas(obj, idx, &res->pr_gas);
/* Allocate resource, if possible */
res->pr_rid = sc->pst_parent->cpux_next_rid;
- res->pr_res = acpi_bus_alloc_gas(dev, &res->pr_rid, &res->pr_gas, 0);
+ acpi_bus_alloc_gas(dev, &type, &res->pr_rid, &res->pr_gas, &res->pr_res, 0);
if (res->pr_res != NULL) {
sc->pst_parent->cpux_next_rid++;
res->pr_bt = rman_get_bustag(res->pr_res);