===================================================================
@@ -94,28 +94,6 @@ unsigned long acpi_fill_madt(unsigned lo
extern void get_bus_conf(void);
-static void update_ssdtx(void *ssdtx, int i)
-{
- uint8_t *PCI;
- uint8_t *HCIN;
- uint8_t *UID;
-
- PCI = ssdtx + 0x32;
- HCIN = ssdtx + 0x39;
- UID = ssdtx + 0x40;
-
- if (i < 7) {
- *PCI = (uint8_t) ('4' + i - 1);
- } else {
- *PCI = (uint8_t) ('A' + i - 1 - 6);
- }
- *HCIN = (uint8_t) i;
- *UID = (uint8_t) (i + 3);
-
- /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
===================================================================
@@ -94,28 +94,6 @@ unsigned long acpi_fill_madt(unsigned lo
extern void get_bus_conf(void);
-static void update_ssdtx(void *ssdtx, int i)
-{
- uint8_t *PCI;
- uint8_t *HCIN;
- uint8_t *UID;
-
- PCI = ssdtx + 0x32;
- HCIN = ssdtx + 0x39;
- UID = ssdtx + 0x40;
-
- if (i < 7) {
- *PCI = (uint8_t) ('4' + i - 1);
- } else {
- *PCI = (uint8_t) ('A' + i - 1 - 6);
- }
- *HCIN = (uint8_t) i;
- *UID = (uint8_t) (i + 3);
-
- /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
===================================================================
@@ -87,7 +87,6 @@ unsigned long write_acpi_tables(unsigned
acpi_srat_t *srat;
acpi_rsdt_t *rsdt;
acpi_mcfg_t *mcfg;
- acpi_hpet_t *hpet;
acpi_madt_t *madt;
acpi_fadt_t *fadt;
acpi_facs_t *facs;
@@ -122,7 +121,7 @@ unsigned long write_acpi_tables(unsigned
current += dsdt->length;
memcpy(dsdt, &AmlCode, dsdt->length);
dsdt->checksum = 0; /* Don't trust iasl to get this right. */
- dsdt->checksum = acpi_checksum(dsdt, dsdt->length);
+ dsdt->checksum = acpi_checksum((void*)dsdt, dsdt->length);
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt,
dsdt->length);
printk(BIOS_DEBUG, "ACPI: * FADT\n");
===================================================================
@@ -137,7 +137,7 @@ unsigned long write_acpi_tables(unsigned
current += dsdt->length;
memcpy(dsdt, &AmlCode, dsdt->length);
dsdt->checksum = 0; /* Don't trust iasl to get this right. */
- dsdt->checksum = acpi_checksum(dsdt, dsdt->length);
+ dsdt->checksum = acpi_checksum((void*)dsdt, dsdt->length);
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt,
dsdt->length);
printk(BIOS_DEBUG, "ACPI: * FADT\n");
===================================================================
@@ -147,7 +147,7 @@ unsigned long write_acpi_tables(unsigned
current += dsdt->length;
memcpy(dsdt, &AmlCode, dsdt->length);
dsdt->checksum = 0; /* Don't trust iasl to get this right. */
- dsdt->checksum = acpi_checksum(dsdt, dsdt->length);
+ dsdt->checksum = acpi_checksum((void*)dsdt, dsdt->length);
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt,
dsdt->length);
printk(BIOS_DEBUG, "ACPI: * FADT\n");
===================================================================
@@ -50,7 +50,7 @@ unsigned long acpi_fill_mcfg(unsigned lo
return current;
}
-void acpi_create_intel_hpet(acpi_hpet_t * hpet)
+static void acpi_create_intel_hpet(acpi_hpet_t * hpet)
{
#define HPET_ADDR 0xfed00000ULL
acpi_header_t *header = &(hpet->header);
@@ -91,7 +91,6 @@ unsigned long acpi_fill_madt(unsigned lo
{
unsigned int irq_start = 0;
device_t dev = 0;
- struct resource* res = NULL;
unsigned char bus_isa;
/* Local Apic */
@@ -141,7 +140,6 @@ unsigned long acpi_fill_srat(unsigned lo
unsigned long write_acpi_tables(unsigned long start)
{
unsigned long current;
- int i;
acpi_rsdp_t *rsdp;
acpi_rsdt_t *rsdt;
acpi_hpet_t *hpet;
===================================================================
@@ -94,28 +94,6 @@ unsigned long acpi_fill_madt(unsigned lo
extern void get_bus_conf(void);
-static void update_ssdtx(void *ssdtx, int i)
-{
- uint8_t *PCI;
- uint8_t *HCIN;
- uint8_t *UID;
-
- PCI = ssdtx + 0x32;
- HCIN = ssdtx + 0x39;
- UID = ssdtx + 0x40;
-
- if (i < 7) {
- *PCI = (uint8_t) ('4' + i - 1);
- } else {
- *PCI = (uint8_t) ('A' + i - 1 - 6);
- }
- *HCIN = (uint8_t) i;
- *UID = (uint8_t) (i + 3);
-
- /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
===================================================================
@@ -94,28 +94,6 @@ unsigned long acpi_fill_madt(unsigned lo
extern void get_bus_conf(void);
-static void update_ssdtx(void *ssdtx, int i)
-{
- uint8_t *PCI;
- uint8_t *HCIN;
- uint8_t *UID;
-
- PCI = ssdtx + 0x32;
- HCIN = ssdtx + 0x39;
- UID = ssdtx + 0x40;
-
- if (i < 7) {
- *PCI = (uint8_t) ('4' + i - 1);
- } else {
- *PCI = (uint8_t) ('A' + i - 1 - 6);
- }
- *HCIN = (uint8_t) i;
- *UID = (uint8_t) (i + 3);
-
- /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
===================================================================
@@ -94,28 +94,6 @@ unsigned long acpi_fill_madt(unsigned lo
extern void get_bus_conf(void);
-static void update_ssdtx(void *ssdtx, int i)
-{
- uint8_t *PCI;
- uint8_t *HCIN;
- uint8_t *UID;
-
- PCI = ssdtx + 0x32;
- HCIN = ssdtx + 0x39;
- UID = ssdtx + 0x40;
-
- if (i < 7) {
- *PCI = (uint8_t) ('4' + i - 1);
- } else {
- *PCI = (uint8_t) ('A' + i - 1 - 6);
- }
- *HCIN = (uint8_t) i;
- *UID = (uint8_t) (i + 3);
-
- /* FIXME: need to update the GSI id in the ssdtx too */
-
-}
-
unsigned long acpi_fill_ssdt_generator(unsigned long current, const char *oem_table_id) {
k8acpi_write_vars();
amd_model_fxx_generate_powernow(pm_base + 8, 6, 1);
===================================================================
@@ -42,8 +42,6 @@ unsigned long write_acpi_tables(unsigned
unsigned long current;
acpi_rsdp_t *rsdp;
acpi_rsdt_t *rsdt;
- acpi_hpet_t *hpet;
- acpi_madt_t *madt;
acpi_fadt_t *fadt;
acpi_facs_t *facs;
acpi_header_t *dsdt;
@@ -79,7 +77,7 @@ unsigned long write_acpi_tables(unsigned
current += dsdt->length;
memcpy(dsdt, &AmlCode, dsdt->length);
dsdt->checksum = 0; // don't trust intel iasl compiler to get this right
- dsdt->checksum = acpi_checksum(dsdt,dsdt->length);
+ dsdt->checksum = acpi_checksum((void*)dsdt,dsdt->length);
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
printk(BIOS_DEBUG, "ACPI: * FADT\n");
===================================================================
@@ -80,7 +80,7 @@ unsigned long acpi_create_madt_lapic_nmi
unsigned long acpi_fill_madt(unsigned long current)
{
- unsigned int gsi_base = 0x18;
+ /* unsigned int gsi_base = 0x18; */
/* Create all subtables for processors. */
current = acpi_create_madt_lapics(current);
@@ -122,9 +122,7 @@ unsigned long write_acpi_tables(unsigned
{
unsigned long current;
acpi_rsdp_t *rsdp;
- acpi_srat_t *srat;
acpi_rsdt_t *rsdt;
- acpi_mcfg_t *mcfg;
acpi_hpet_t *hpet;
acpi_madt_t *madt;
acpi_fadt_t *fadt;
@@ -158,11 +156,11 @@ unsigned long write_acpi_tables(unsigned
printk(BIOS_DEBUG, "ACPI: * DSDT\n");
dsdt = (acpi_header_t *) current;
- memcpy(dsdt, &AmlCode, sizeof(acpi_header_t));
+ memcpy(dsdt, &AmlCode_dsdt, sizeof(acpi_header_t));
current += dsdt->length;
- memcpy(dsdt, &AmlCode, dsdt->length);
+ memcpy(dsdt, &AmlCode_dsdt, dsdt->length);
dsdt->checksum = 0; /* Don't trust iasl to get this right. */
- dsdt->checksum = acpi_checksum(dsdt, dsdt->length);
+ dsdt->checksum = acpi_checksum((void*)dsdt, dsdt->length);
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n", dsdt, dsdt->length);
printk(BIOS_DEBUG, "ACPI: * FADT\n");
@@ -182,7 +180,7 @@ unsigned long write_acpi_tables(unsigned
/* NO MCFG in VX855, no PCI-E. */
printk(BIOS_DEBUG, "ACPI: * HPET\n");
- hpet = (acpi_mcfg_t *) current;
+ hpet = (acpi_hpet_t *) current;
acpi_create_hpet(hpet);
current += hpet->header.length;
acpi_add_table(rsdp, hpet);
===================================================================
@@ -126,7 +126,6 @@ unsigned long write_acpi_tables(unsigned
unsigned long current;
acpi_rsdp_t *rsdp;
acpi_rsdt_t *rsdt;
- acpi_xsdt_t *xsdt;
acpi_madt_t *madt;
acpi_fadt_t *fadt;
acpi_facs_t *facs;
@@ -165,7 +164,7 @@ unsigned long write_acpi_tables(unsigned
current += dsdt->length;
memcpy(dsdt, &AmlCode, dsdt->length);
dsdt->checksum = 0; // don't trust intel iasl compiler to get this right
- dsdt->checksum = acpi_checksum(dsdt,dsdt->length);
+ dsdt->checksum = acpi_checksum((void*)dsdt,dsdt->length);
printk(BIOS_DEBUG, "ACPI: * DSDT @ %p Length %x\n",dsdt,dsdt->length);
printk(BIOS_DEBUG, "ACPI: * FADT\n");
===================================================================
@@ -52,7 +52,7 @@ unsigned long acpi_fill_mcfg(unsigned lo
}
-void acpi_create_via_hpet(acpi_hpet_t * hpet)
+static void acpi_create_via_hpet(acpi_hpet_t * hpet)
{
#define HPET_ADDR 0xfe800000ULL
acpi_header_t *header = &(hpet->header);
acpi_again.diff changes the code to copy the header first. more.diff gets rid of some other warnings in the same files. I had to use: p = &AmlPtr[0]; Should I have used a different type for p besides unsigned char *? Signed-off-by: Myles Watson <mylesgw@gmail.com> Thanks, Myles