Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318788
b: refs/heads/master
c: 66be71f
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Jun 1, 2012
1 parent ebcb0eb commit e56c5ea
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd6f10a5f984e48cb56a39f2698cd58e7a33d56b
refs/heads/master: 66be71ff477389ff12c9c43dc6ee176cf8e1dd3a
32 changes: 25 additions & 7 deletions trunk/drivers/acpi/acpica/tbfadt.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@
ACPI_MODULE_NAME("tbfadt")

/* Local prototypes */
static ACPI_INLINE void
static void
acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
u8 space_id, u8 byte_width, u64 address);
u8 space_id,
u8 byte_width, u64 address, char *register_name);

static void acpi_tb_convert_fadt(void);

Expand Down Expand Up @@ -182,10 +183,25 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = {
*
******************************************************************************/

static ACPI_INLINE void
static void
acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
u8 space_id, u8 byte_width, u64 address)
u8 space_id,
u8 byte_width, u64 address, char *register_name)
{
u8 bit_width;

/* Bit width field in the GAS is only one byte long, 255 max */

bit_width = (u8)(byte_width * 8);

if (byte_width > 31) { /* (31*8)=248 */
ACPI_ERROR((AE_INFO,
"%s - 32-bit FADT register is too long (%u bytes, %u bits) "
"to convert to GAS struct - 255 bits max, truncating",
register_name, byte_width, (byte_width * 8)));

bit_width = 255;
}

/*
* The 64-bit Address field is non-aligned in the byte packed
Expand All @@ -196,7 +212,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,
/* All other fields are byte-wide */

generic_address->space_id = space_id;
generic_address->bit_width = (u8)ACPI_MUL_8(byte_width);
generic_address->bit_width = bit_width;
generic_address->bit_offset = 0;
generic_address->access_width = 0; /* Access width ANY */
}
Expand Down Expand Up @@ -456,7 +472,8 @@ static void acpi_tb_convert_fadt(void)
&acpi_gbl_FADT,
fadt_info_table
[i].length),
(u64) address32);
(u64) address32,
fadt_info_table[i].name);
}
}
}
Expand Down Expand Up @@ -670,7 +687,8 @@ static void acpi_tb_setup_fadt_registers(void)
source64->address +
(fadt_pm_info_table[i].
register_num *
pm1_register_byte_width));
pm1_register_byte_width),
"PmRegisters");
}
}
}

0 comments on commit e56c5ea

Please sign in to comment.