64-bit kernel registration tty device

Source: Internet
Author: User

In a 64-bit system, when registering a tty device, you must note that android runs in el0 and 32-Bit mode, and the kernel runs in el1 and 64-Bit mode, not only does the kernel need to enable the config_compat option, but IOCTL called by many Android upper-layer applications must also provide the corresponding compat_ioctl () function in the underlying driver module;

When registering the TTY callback function, 32-bit registers the ioctl callback function. 64-bit registers the compat_ioctl callback. An error callback is registered when the eCall tool is added a few days ago, as a result, the kernel function cannot be successfully called through the serial port and cannot be accessed into the CTL callback. At the same time, the kernel must process get_user and copy_from_user when receiving parameters transmitted by the user State, in the 64-bit kernel, the pointer is 8 bytes, and the user-state pointer is 4 bytes. You need to adapt it. For details, refer to the kernel code, the kernel is widely used.

64-bit kernel registration tty device

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.