Re: Small tweak to get ACPI watchdog working (iTCO)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On 1/29/20 5:07 PM, Cameron Ferguson wrote:
>> I don't understand where this 0x10000 comes from. x86 I/O ports are 16-bits.
> 
> In order to write to ACPI addres 0x460, I can do this:
> 
>     *(unsigned *)(0x10460) = 0;
> This works fine on x86.

In the code you sent last time, it said that your addresses
are IORESOURCE_IO. These are I/O ports, not memory-mapped ports,
so you can't dereference a pointer and access them, but instead you
have to use port I/O instruction, which in barebox and Linux is
the out[bwl] family of functions.

> Barebox is missing the function "acpi_get_table". I briefly looked
> into copying it from the Linux kernel but after a few minutes I just
> decided to copy the hex values and hard-code them into my program.

barebox passes the table to the drivers, look in the acpi-test.c
example, how it gets the sdt pointer. That should be the one you
are after.                                                              

> I'm still tinkering about with this. Still no joy. Here's what I have now:

That's too much code to read through.. I suspect you are just clobbering random
memory, when you should be writing I/O ports instead.

Cheers
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux