-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2014-05-28 18:14:34 -0400, Jung-uk Kim wrote:
> However, it had to be done from AcpiEvGpeInitialize() in
> sys/contrib/dev/acpica/components/events/evgpeinit.c, IMHO.
>
> ACPI_STATUS AcpiEvGpeInitialize ( void) { ... if
> (AcpiGbl_FADT.Gpe1BlockLength && ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> HERE!!! AcpiGbl_FADT.XGpe1Block.Address) { ...
Please see the attached patch (not tested). Probably, this is what
you really meant to test.
Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)
iQEcBAEBAgAGBQJThnPaAAoJEHyflib82/FGKbcIAIfNGtaEDNhEuGUTTr7wSgCE
DIAIt/QdTeICyOiR8t9r8SrOKrnrloPohKTqtujhkliiAN7bKbjodeN3+/50H7a9
Ura6075gCtds/6Im/hOiFMyclWBA88HR+lUpct3RJD9Ag70qcfEQloIiVI1pkm2U
X1YRRgS0liUbG4NKoZuAl2xPxyO+DS+jC7FKO/Ti4Bl4buM+R/lO0fvAj6ZZoRQ4
JnLGsOPMrmPLDfug6dZSCruG8rcetrh+0PYVn3En4ecZ8rzsY+IW5qR+57+8rcXX
Jh9JsWyS0eYiGP62yOKzdj+9GSH85MJJC0fvtOgYe42eA8UU3bf8GAD5Vynl+gU=
=4thP
-----END PGP SIGNATURE-----
Index: sys/contrib/dev/acpica/components/events/evgpeinit.c
===================================================================
--- sys/contrib/dev/acpica/components/events/evgpeinit.c (리ë¹ì 266821)
+++ sys/contrib/dev/acpica/components/events/evgpeinit.c (ìì
ì¬ë³¸)
@@ -128,12 +128,19 @@ AcpiEvGpeInitialize (
* If EITHER the register length OR the block address are zero, then that
* particular block is not supported.
*/
- if (AcpiGbl_FADT.Gpe0BlockLength &&
- AcpiGbl_FADT.XGpe0Block.Address)
+ if ((AcpiGbl_FADT.Gpe0Block && AcpiGbl_FADT.Gpe0BlockLength) ||
+ (AcpiGbl_FADT.XGpe0Block.Address && AcpiGbl_FADT.XGpe0Block.BitWidth))
{
/* GPE block 0 exists (has both length and address > 0) */
- RegisterCount0 = (UINT16) (AcpiGbl_FADT.Gpe0BlockLength / 2);
+ if (AcpiGbl_FADT.XGpe0Block.Address && AcpiGbl_FADT.XGpe0Block.BitWidth)
+ {
+ RegisterCount0 = ACPI_DIV_8 (AcpiGbl_FADT.XGpe0Block.BitWidth) / 2;
+ }
+ else
+ {
+ RegisterCount0 = AcpiGbl_FADT.Gpe0BlockLength / 2;
+ }
GpeNumberMax = (RegisterCount0 * ACPI_GPE_REGISTER_WIDTH) - 1;
/* Install GPE Block 0 */
@@ -149,12 +156,19 @@ AcpiEvGpeInitialize (
}
}
- if (AcpiGbl_FADT.Gpe1BlockLength &&
- AcpiGbl_FADT.XGpe1Block.Address)
+ if ((AcpiGbl_FADT.Gpe1Block && AcpiGbl_FADT.Gpe1BlockLength) ||
+ (AcpiGbl_FADT.XGpe1Block.Address && AcpiGbl_FADT.XGpe1Block.BitWidth))
{
/* GPE block 1 exists (has both length and address > 0) */
- RegisterCount1 = (UINT16) (AcpiGbl_FADT.Gpe1BlockLength / 2);
+ if (AcpiGbl_FADT.XGpe1Block.Address && AcpiGbl_FADT.XGpe1Block.BitWidth)
+ {
+ RegisterCount1 = ACPI_DIV_8 (AcpiGbl_FADT.XGpe1Block.BitWidth) / 2;
+ }
+ else
+ {
+ RegisterCount1 = AcpiGbl_FADT.Gpe1BlockLength / 2;
+ }
/* Check for GPE0/GPE1 overlap (if both banks exist) */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "[email protected]"