Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firmware: Update dagu/elish/enuma touch firmware [1/2] #18

Conversation

Aquarius223
Copy link

No description provided.

* Just to facilitate the subsequent update of the new nt36523 firmware
  Also reduces the amount of firmware change diff generation.

Change-Id: I323d3e1173d748d351919c1281806c91f203aed7
* Avoid large differences in subsequent updates and merges.

Change-Id: Ib1a0fa27fbbb3c29bd86cfd66e5b0a4aaf5546b1
Signed-off-by: ZhaoYueNan <amktiao030215@gmail.com>
* Dump Touchscreen Pen Firmware from OS1.0.2.0.TKYCNXM
  This fixes various issues with the Xiaomi Smart Pen.

* k81/k81a enuma/elish firmware feature code:
  00 0a 02 00 00 00 00 00 00 2a 02 00 cb 94 d0 20
  (The number of lines per bin firmware is 12287)

* Firmware order in firmware in the stock kernel:
  novatek_ts_fw_k81.bin novatek_ts_mp_k81.bin
  novatek_nt36523_k81_fw01.bin novatek_nt36523_k81_mp01.bin
  novatek_nt36523_k81a_fw02.bin novatek_nt36523_k81a_mp02.bin
  novatek_nt36523_k81a_fw01.bin novatek_nt36523_k81a_mp01.bin
  novatek_nt36523_k81a_mp01_pen.bin novatek_nt36523_k81a_mp02_pen.bin
  novatek_nt36523_k81a_fw01_pen.bin novatek_nt36523_k81a_fw02_pen.bin
  novatek_nt36523_k81_fw01_pen.bin novatek_nt36523_k81_mp01_pen.bin

Change-Id: I32fbf7c101b00f5e7518449a0d409c762716c13c
[zhaoyuenan: Convert the firmware to dos2unix to avoid large diffs]
(ci-merge-commit: cbc92d824c65f93b58727da56f7501ab39824a79)
Signed-off-by: zhaoyuenan <amktiao030215@gmail.com>
* L81 dagu firmware feature code:
  1. 00 00 00 00 00 00 00 00 00 04 00 00 00 00 87 75
  2. 00 01 00 00 00 00 00 00 00 fc 03 00 00 00 87 79
     00 00 00 00 0f 00 00 00 53 00 00 00 xx xx xx xx
  (he number of lines per bin firmware is 16320)

Change-Id: I1975453acb98fdfe26901c21a8607996893ab083
Signed-off-by: ZhaoYueNan <amktiao030215@gmail.com>
@liyafe1997
Copy link
Owner

liyafe1997 commented Dec 25, 2024

Thanks!
Is these firmware binaries come from Xiaomi Opensource?

@Aquarius223
Copy link
Author

Thanks! Is these firmware binaries come from Xiaomi Opensource?

dump自小米官方HyperOS内核, 小米开源只停留在MIUI13时期的固件 (滑稽)

@liyafe1997 liyafe1997 changed the base branch from android14-lineage21-mod to android14-lineage21-mod-test-newfw December 26, 2024 16:48
@liyafe1997 liyafe1997 merged commit 449e9c5 into liyafe1997:android14-lineage21-mod-test-newfw Dec 26, 2024
@liyafe1997
Copy link
Owner

感谢!

Aquarius223 pushed a commit to sticpaper/kernel_xiaomi_sm8250_mod-mod that referenced this pull request Jan 19, 2025
[ Upstream commit c145eea2f75ff7949392aebecf7ef0a81c1f6c14 ]

mwifiex_get_priv_by_id() returns the priv pointer corresponding to
the bss_num and bss_type, but without checking if the priv is actually
currently in use.
Unused priv pointers do not have a wiphy attached to them which can
lead to NULL pointer dereferences further down the callstack.  Fix
this by returning only used priv pointers which have priv->bss_mode
set to something else than NL80211_IFTYPE_UNSPECIFIED.

Said NULL pointer dereference happened when an Accesspoint was started
with wpa_supplicant -i mlan0 with this config:

network={
        ssid="somessid"
        mode=2
        frequency=2412
        key_mgmt=WPA-PSK WPA-PSK-SHA256
        proto=RSN
        group=CCMP
        pairwise=CCMP
        psk="12345678"
}

When waiting for the AP to be established, interrupting wpa_supplicant
with <ctrl-c> and starting it again this happens:

| Unable to handle kernel NULL pointer dereference at virtual address 0000000000000140
| Mem abort info:
|   ESR = 0x0000000096000004
|   EC = 0x25: DABT (current EL), IL = 32 bits
|   SET = 0, FnV = 0
|   EA = 0, S1PTW = 0
|   FSC = 0x04: level 0 translation fault
| Data abort info:
|   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
|   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
|   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
| user pgtable: 4k pages, 48-bit VAs, pgdp=0000000046d96000
| [0000000000000140] pgd=0000000000000000, p4d=0000000000000000
| Internal error: Oops: 0000000096000004 [liyafe1997#1] PREEMPT SMP
| Modules linked in: caam_jr caamhash_desc spidev caamalg_desc crypto_engine authenc libdes mwifiex_sdio
+mwifiex crct10dif_ce cdc_acm onboard_usb_hub fsl_imx8_ddr_perf imx8m_ddrc rtc_ds1307 lm75 rtc_snvs
+imx_sdma caam imx8mm_thermal spi_imx error imx_cpufreq_dt fuse ip_tables x_tables ipv6
| CPU: 0 PID: 8 Comm: kworker/0:1 Not tainted 6.9.0-00007-g937242013fce-dirty liyafe1997#18
| Hardware name: somemachine (DT)
| Workqueue: events sdio_irq_work
| pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
| pc : mwifiex_get_cfp+0xd8/0x15c [mwifiex]
| lr : mwifiex_get_cfp+0x34/0x15c [mwifiex]
| sp : ffff8000818b3a70
| x29: ffff8000818b3a70 x28: ffff000006bfd8a5 x27: 0000000000000004
| x26: 000000000000002c x25: 0000000000001511 x24: 0000000002e86bc9
| x23: ffff000006bfd996 x22: 0000000000000004 x21: ffff000007bec000
| x20: 000000000000002c x19: 0000000000000000 x18: 0000000000000000
| x17: 000000040044ffff x16: 00500072b5503510 x15: ccc283740681e517
| x14: 0201000101006d15 x13: 0000000002e8ff43 x12: 002c01000000ffb1
| x11: 0100000000000000 x10: 02e8ff43002c0100 x9 : 0000ffb100100157
| x8 : ffff000003d20000 x7 : 00000000000002f1 x6 : 00000000ffffe124
| x5 : 0000000000000001 x4 : 0000000000000003 x3 : 0000000000000000
| x2 : 0000000000000000 x1 : 0001000000011001 x0 : 0000000000000000
| Call trace:
|  mwifiex_get_cfp+0xd8/0x15c [mwifiex]
|  mwifiex_parse_single_response_buf+0x1d0/0x504 [mwifiex]
|  mwifiex_handle_event_ext_scan_report+0x19c/0x2f8 [mwifiex]
|  mwifiex_process_sta_event+0x298/0xf0c [mwifiex]
|  mwifiex_process_event+0x110/0x238 [mwifiex]
|  mwifiex_main_process+0x428/0xa44 [mwifiex]
|  mwifiex_sdio_interrupt+0x64/0x12c [mwifiex_sdio]
|  process_sdio_pending_irqs+0x64/0x1b8
|  sdio_irq_work+0x4c/0x7c
|  process_one_work+0x148/0x2a0
|  worker_thread+0x2fc/0x40c
|  kthread+0x110/0x114
|  ret_from_fork+0x10/0x20
| Code: a94153f3 a8c37bfd d50323bf d65f03c0 (f940a000)
| ---[ end trace 0000000000000000 ]---

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240703072409.556618-1-s.hauer@pengutronix.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants