If MAB tool would form ACPI blob in the way where some of the tbales cross page size boundary current kernel can not map it correctly (table size < 4k case is allowed). We round up table to page size reaching PAGE_SIZE alignment. Kernel should handle with such case thus changes within acpi_map() function are needed.
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org --- scripts/mab/mab.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/scripts/mab/mab.c b/scripts/mab/mab.c index c9af2a5..d7356c7 100644 --- a/scripts/mab/mab.c +++ b/scripts/mab/mab.c @@ -49,7 +49,18 @@ int get_file_size(char *fname) err = stat(fname, &buf); if (err) printf("? cannot stat %s (%d)\n", fname, err); +#if 0 return (err == 0 ? buf.st_size : 0); +#else + /* + * XXX: Workaround for ACPI table mapping failure across page size + * boundary. Such case should be managed by kernel so this hack would + * not be necessary any more. We round up table to page size here + * reaching appropriate alignment. + */ +#define PAGE_SIZE 0x1000 + return (err == 0 ? PAGE_SIZE : 0); +#endif }
int valid_sig(char *sig)
On 07/18/2013 03:44 AM, Tomasz Nowicki wrote:
Signed-off-by: Tomasz Nowicki tomasz.nowicki@linaro.org
scripts/mab/mab.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
Acked-by: Al Stone al.stone@linaro.org
And IIRC, there's a separate JIRA card for fixing this for the long term, correct?