summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2014-02-19common/build_aml.c : add dbg2 and spcr tables to signaturesGraeme Gregory
Add these two tables which are supported by ACPICA tools so mab understands these tables also. Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Acked-by: Al Stone <al.stone@linaro.org>
2014-02-19tools/bfapei/.gitignore : add ignore for bfapei executeableGraeme Gregory
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Acked-by: Al Stone <al.stone@linaro.org>
2014-02-19tools/.gitignore : ignore all object filesGraeme Gregory
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Acked-by: Al Stone <al.stone@linaro.org>
2014-01-10apei: Follow up lately kernel changes.Tomasz Nowicki
Since 3.13 kernel birngs a lot of new features and APEI structure refines, we need to update our tool to make it works with APEI blob. Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2014-01-10acpi, apei: More detailed info regarding memory error.Tomasz Nowicki
We create blob with memory error example as a proof it really works. This commits only add more detailed info so output message will looks prettier. Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-11-19acpi: Be sure ACPI structure are packed with 1 byte alignment.Tomasz Nowicki
2013-11-18Convert the bfapei tool to the BSD license.Al Stone
This has been discussed with the copyright owner; he is aware of the change and in agreement with it. Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-11-18Convert all tool common files to BSD license.Al Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-11-18Convert the mab project to a BSD license.Al Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-11-18Change the cab tool to the BSD license.Al Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-10-10acpi, apei, einj: Relace constant value with defines.Tomasz Nowicki
2013-09-23bfapei: Expand bfapei tool to EINJ table testing.Tomasz Nowicki
bfapei now can create blob for EINJ driver as well. Blob for EINJ driver need to be combined with blob for HEST driver since EINJ is designed to set status flag for Error Status Block pointed from HEST table. This way EINJ driver can be tested in easy way. Note that SCI must be triggered in the next step so GHES driver start to parse error. This could be done using SCI emulate mechanism. Logic path: 1. Create Error Status Block (ESB information related to given error, pointed by HEST) 2. Create pretended registers (blob for EINJ) that instruct kernel to set status flag in ESB. 3. Trigger error using debugfs 4. Emulate SCI HOWTO: Enter to acpi tool repository: # make PADDR=0x<physical address> APEI=einj <platform>.acpi Boot target: Print available error list: # cat /sys/kernel/debug/apei/einj/available_error_type 0x00000008 Memory Correctable Set given error type: # echo 0x00000008 > /sys/kernel/debug/apei/einj/error_type Confirm error was really set: # cat /sys/kernel/debug/apei/einj/error_type 0x8 Inject error (here status flag for ESB is set) # echo 0x00000008 > /sys/kernel/debug/apei/einj/error_inject Emulate SCI (notification of HED device with 0x80 value) # echo "HED 128" > /sys/kernel/debug/acpi/sci_notify ACPI: ACPI device name is <HED>, event code is <128> ACPI: Notify event is queued {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2 {1}[Hardware Error]: APEI generic hardware error status {1}[Hardware Error]: severity: 1, fatal {1}[Hardware Error]: section: 0, severity: 0, recoverable {1}[Hardware Error]: flags: 0x00 {1}[Hardware Error]: section_type: memory error Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-09-23bfapei: Move common functionality to separate function.Tomasz Nowicki
Since every type of test allocate and expand buffer using the same algorithm, lets move common code to bfapei_expand_buf helper function. Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-09-09Suppress compiler warnings, file comment headers cleanup.Tomasz Nowicki
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-09-09bfapei: Move generic ACPI structures to separated file, remove duplicated ↵Tomasz Nowicki
defines.
2013-09-09bfapei: Add tool that can create blobs for APEI table testing.Tomasz Nowicki
Similar to mab and cab, bfapei "Blob For APEI" create blob which can be passed to the kernel by special u-boot commands for debugging purposes. It enable testing of APEI without any h/w interaction. The idea is to set physical region aside so kernel could reference to it. Once blob is filling with appropriate value we can pretend registers, storage etc. Currently bfapei is able to create blob to test tables like: o HEST - kernel need to trigger error, related error info is ready to read root@localhost:~# echo 1 > /sys/kernel/debug/apei/einj/error_inject {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2 {1}[Hardware Error]: APEI generic hardware error status {1}[Hardware Error]: severity: 1, fatal {1}[Hardware Error]: section: 0, severity: 0, recoverable {1}[Hardware Error]: flags: 0x00 {1}[Hardware Error]: section_type: memory error o BERT - kernel check list of errors (boot process) pointed from BERT, any errors with status flag set is printed out [...] [Hardware Error]: Error record from previous boot: {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2 {1}[Hardware Error]: APEI generic hardware error status {1}[Hardware Error]: severity: 1, fatal {1}[Hardware Error]: section: 0, severity: 0, recoverable {1}[Hardware Error]: flags: 0x00 {1}[Hardware Error]: section_type: memory error [...] O ERST - appropriate registers are set so when there is kernel panic ERST driver dump log to region reserved within the blob, once kernel back to life it can mount pstore file system and read logs (files) for more details panic! [...] root@localhost:~# mount -t pstore - /sys/fs/pstore root@localhost:~# ll /sys/fs/pstore/ total 0 drwxr-xr-x 2 root root 0 Sep 5 15:19 ./ drwxr-xr-x 4 root root 0 Jan 1 1970 ../ -r--r--r-- 1 root root 29374 Sep 5 14:01 dmesg-erst-0 HOWTO: Add appropriate flag to make command: make PADDR=0x42010000 APEI=<einj|bert|erst> exynos5250-arndale.acpi Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-09-06map, cab: Reorganize building process and tree hierarchy.Tomasz Nowicki
o move common code to separate direction so others application can reuse it o appropriate changes around Makefile files o minor changes regarding compilator worrnings Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
2013-08-26cab: add a gitignore for binary resultGraeme Gregory
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Acked-by: Al Stone <al.stone@linaro.org>
2013-08-26cab (check-ACPI-blob): new tool that looks for errors in an ACPI blob.Al Stone
While trying to hunt down what appeared to be structural errors in an ACPI blob, I got tired of double checking pointers and load addresses by hand (and having to double check my lousy arithmetic). So, cab will search a blob for tables using brute force to determine where tables actually are, and then compare those locations with where all the table pointers say they should be, reporting any discrepancies found. Cab will also double check all table headers looking for invalid checksums, and table revision levels older than current ACPI 5.0 spec dictates. If you can think of additional checks on tables, please add them. Changes from v1: -- Clean up whitespace issues found by checkpatch Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-26mab: update Changelog and version number for this patch seriesAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Naresh Bhat <naresh.bhat@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-26mab: print out physical address when being verboseAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Naresh Bhat <naresh.bhat@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-26mab: add option to NOT use a blob header, if neededAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Naresh Bhat <naresh.bhat@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-26mab: print out the correct offset in the blobAl Stone
Fixing this also simplified the use of BLOB_HEADER_SIZE so that the code is a bit more readable now. Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Naresh Bhat <naresh.bhat@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-26mab: set both checksums in the RSDP, not just oneAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Naresh Bhat <naresh.bhat@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-26mab: use 32- or 64-bit FACS addresses in the FADT, not bothAl Stone
When doing relocation cleanup in the FADT, we need to use _either_ the 32- or 64-bit addresses, and not both (which is what we currently do); add a -f option to tell mab to use 32-bit in the FADT, and default to 64-bit otherwise. NB: 64-bit is always the safe choice but 32-bit needs to be allowed for those that use it to ensure they use addresses < 4GB for loadable tables. Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Naresh Bhat <naresh.bhat@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-26mab: Makefile needs to rebuild if .h changes and use CFLAGS properlyAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Naresh Bhat <naresh.bhat@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-13mab: update version number (and comment it better)Al Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-13mab: report an XSDT error regardless of whether we're verbose or notAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-13mab: add in a Changelog to improve documentationAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-13mab: if -p <paddr> is not given, we would segfault; die more gracefully nowAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-13mab: minor cleanup of usage outputAl Stone
Signed-off-by: Al Stone <al.stone@linaro.org> Acked-by: Graeme Gregory <graeme.gregory@linaro.org>
2013-08-08mab: prevent tables crossing 4K boundariesGraeme Gregory
Tables crossing pages is currently causing issues on armv7 devices, for now get mab to fixup addresses so we do not cross a page boundary with a table. Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Acked-by: Al Stone <al.stone@linaro.org>
2013-08-08mab: remove uneeded malloc which just leaks memoryGraeme Gregory
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Acked-by: Al Stone <al.stone@linaro.org>
2013-08-02mab: add ability to locate blob in physical space.Graeme Gregory
Add a new argument -p <paddr> which takes the physical address of the final location of the blob in physical memory. If this is supplied mab will then fixup the addresses in the tables to point to correct physical locations and further fixups in the kernel are no longer needed. This produces table blobs that are more like what we can expect from firmware. Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org> Acked-by: Al Stone <al.stone@linaro.org>
2013-07-29mab: initial import of mabGraeme Gregory
mab is Make Arm Blob and is used to create the blob which can be passed to the kernel by special u-boot or grub2 commands for debugging purposes. Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>