diff options
| -rw-r--r-- | meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch b/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch index 7ccdab0f22..3be18986fc 100644 --- a/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch +++ b/meta-oe/recipes-devtools/pmtools/pmtools/pmtools-switch-to-dynamic-buffer-for-huge-ACPI-table.patch | |||
| @@ -18,22 +18,41 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com> | |||
| 18 | madt/madt.c | 18 +++++++++++++++++- | 18 | madt/madt.c | 18 +++++++++++++++++- |
| 19 | 1 file changed, 17 insertions(+), 1 deletion(-) | 19 | 1 file changed, 17 insertions(+), 1 deletion(-) |
| 20 | 20 | ||
| 21 | diff --git a/madt/madt.c b/madt/madt.c | ||
| 22 | index aed965c..8770cd5 100644 | ||
| 23 | --- a/madt/madt.c | 21 | --- a/madt/madt.c |
| 24 | +++ b/madt/madt.c | 22 | +++ b/madt/madt.c |
| 25 | @@ -51,7 +51,9 @@ get_next_entry(acpi_table_entry_header * entry_header) | 23 | @@ -34,14 +34,16 @@ typedef unsigned long long u64; |
| 24 | //#include <sys/mman.h> | ||
| 25 | #include <stdio.h> // fread | ||
| 26 | #include <stdlib.h> // malloc | ||
| 27 | +#include <string.h> // memset/memcpy | ||
| 28 | |||
| 29 | #include "./tables.c" | ||
| 30 | |||
| 31 | int verbose = 0; | ||
| 32 | /* | ||
| 33 | -/* read standard input | ||
| 34 | + * read standard input | ||
| 35 | * write decoded madt to standard output | ||
| 36 | */ | ||
| 37 | +size_t | ||
| 38 | get_next_entry(acpi_table_entry_header * entry_header) | ||
| 39 | { | ||
| 40 | size_t retval; | ||
| 41 | @@ -51,9 +53,11 @@ get_next_entry(acpi_table_entry_header * | ||
| 26 | return retval; | 42 | return retval; |
| 27 | } | 43 | } |
| 28 | 44 | ||
| 29 | -u8 buffer[1024]; | 45 | -u8 buffer[1024]; |
| 30 | + | 46 | |
| 47 | -main() | ||
| 31 | +u8 buf[1024]; | 48 | +u8 buf[1024]; |
| 32 | +u8 *buffer = buf; | 49 | +u8 *buffer = buf; |
| 33 | 50 | +int | |
| 34 | main() | 51 | +main(int argc, char *argv[]) |
| 35 | { | 52 | { |
| 36 | @@ -75,6 +77,17 @@ main() | 53 | size_t retval; |
| 54 | struct acpi_table_madt *madt_header; | ||
| 55 | @@ -75,6 +79,17 @@ main() | ||
| 37 | 56 | ||
| 38 | if (verbose) printf("header.length %d\n", madt_header->header.length); | 57 | if (verbose) printf("header.length %d\n", madt_header->header.length); |
| 39 | 58 | ||
| @@ -51,7 +70,7 @@ index aed965c..8770cd5 100644 | |||
| 51 | acpi_table_print((void*)&(buffer[bytes_read]), 0); | 70 | acpi_table_print((void*)&(buffer[bytes_read]), 0); |
| 52 | 71 | ||
| 53 | bytes_read = sizeof(struct acpi_table_madt); | 72 | bytes_read = sizeof(struct acpi_table_madt); |
| 54 | @@ -118,6 +131,9 @@ done: | 73 | @@ -118,6 +133,9 @@ done: |
| 55 | printf("Checksum 0x%x != 0; 0x%x in header ERROR\n", csum, | 74 | printf("Checksum 0x%x != 0; 0x%x in header ERROR\n", csum, |
| 56 | madt_header->header.checksum); | 75 | madt_header->header.checksum); |
| 57 | 76 | ||
| @@ -61,6 +80,3 @@ index aed965c..8770cd5 100644 | |||
| 61 | return 0; | 80 | return 0; |
| 62 | } | 81 | } |
| 63 | 82 | ||
| 64 | -- | ||
| 65 | 1.8.1.2 | ||
| 66 | |||
