Re: Porting to Snapdragon 8cx SoC

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
On 1/12/26 15:33, Mark Millard wrote:
> On 1/12/26 15:09, Mark Millard wrote:
>> On 1/12/26 12:57, Gabe Bauer wrote:
>>> Hello, community! I am reaching out because I have a Thinkpad X13s with
>>> a Snapdragon 8cx Gen 3 SoC. I have been unable to get any operating
>>> system to work so far on this machine. I have done a fair amount of
>>> coding and debugging in C. However, I have never ported an operating
>>> system before. I am in my senior year at university and I would like to
>>> undertake this as a project. I have an x86_64 machine running FreeBSD
>>> which I can use to help me in this endeavour. However, since I have
>>> never done this before, I lack the domain specific knowledge on what I
>>> will need in order to be successful. Any tips on how to get started
>>> would be greatly appreciated. Thank you very much!!
>>
>>
>> Well, the Windows Dev Kit 2023 used(/uses) a Snapdragon 8cx Gen 3 SoC
>> and has a UEFI/ACPI that FreeBSD boots just fine. But FreeBSD does not
>> support the 2 USB-C ports in the result. It does support the 3 USB-A
>> ports, including booting from USB-A ports. (Some UEFI configuration
>> required to make that the default. I leave the internal drive with
>> Windows 11 Pro, forming the local Windows on aarch64 example when booted
>> that way.)
>>
>> But, in the FreeBSD based Dev Kit 20023 context, the UEFI/ACPI that is
>> built-in has the Snapdragon 8cx Gen 3 SoC related magic in it instead of
>> in the FreeBSD kernel, if I understand right.
>>
>> The UEFI/ACPI source code is not public as far as I know.
>>
>>
>> The Snapdragon 8cx Gen 3 SoC presents as having:
>>
>> 4 Cortex-A78C
>> and
>> 4 Cortex-X1C
>>
>>
>> FreeBSD does report the following relative to the ACPI and what FreeBSD
>> does not handle:
>>
>> ACPI Error: AE_NOT_FOUND, While resolving a named reference package
>> element - \134_SB_.UBF0.PRT0 (20251212/dspkginit-605)
>> ACPI Error: AE_NOT_FOUND, While resolving a named reference package
>> element - \134_SB_.UBF0.PRT1 (20251212/dspkginit-605)
>> . . .
>> ACPI Warning: \134_SB.GPU0._CLS: Return Package is too small - found 1
>> elements, expected 3 (20251212/nsprepkg-511)
>> can't fetch resources for \134_SB_.ADC1 - AE_AML_INVALID_RESOURCE_TYPE
>> acpi0: Could not update all GPEs: AE_NOT_CONFIGURED
>>
>> The 2 "ACPI Error" messages may well be tied to the 2 USB-C ports.
>>
>>
> 
> Looking around, the following are the commits that reference the Windows
> Dev Kit 2023. The older ones may give hints at what was required to get
> the FreeBSD kernel to boot based on the UEFI/ACPI involved.
> 
> 
> Commit message
> Author	Age	Files	Lines
> Commit URL
> 
> lib/libmd: add optimised SHA1 implementations for aarch64
> Robert Clausecker	2025-05-14	2	-0/+514
> https://cgit.freebsd.org/src/commit/?id=f6210541f9e3c6cfda321e0ad98f277fb98a625b
> 
> libc/aarch64: fix strlen() when flush-to-zero is set
> Robert Clausecker	2025-01-16	1	-2/+1
> https://cgit.freebsd.org/src/commit/?id=521c1fe0e2002dfd7d8db86eb7144b7865229912
> 
> arm64: Enable the Hyper-V keyboard driver
> Andrew Turner	2023-06-21	1	-0/+2
> https://cgit.freebsd.org/src/commit/?id=3a1bfe881a24a76ff8d6406476461924a027ea8a
> 
> arm64: Disable PAC when booting on a Windows Dev Kit 2023
> Mark Johnston	2023-04-23	1	-1/+30
> https://cgit.freebsd.org/src/commit/?id=4b39a12830feaf2ac49b157ed079c04114b1a3ca
> 
> Add CPU Ident for Qualcomm Kryo 400 (used in MS Dev Kit)
> Allan Jude	2023-01-18	2	-1/+14
> https://cgit.freebsd.org/src/commit/?id=fd5e9210598cfafbecc05b5ec03da25483833f90
> 
> Add the fixed memory type to the pci ecam driver
> Andrew Turner	2023-01-18	1	-3/+20
> https://cgit.freebsd.org/src/commit/?id=896f556205c8d87ef842dc844752daa7d2385336
> 
> loader.efi: make sure kernel image is executable
> Robert Clausecker	2023-01-05	1	-4/+4
> https://cgit.freebsd.org/src/commit/?id=95fa2e0aee5b7259cf4bcdea7396c4dff3241173
> 
> Add Windows Dev Kit 2023 support to if_ure
> Andrew Turner	2023-01-04	2	-0/+2
> https://cgit.freebsd.org/src/commit/?id=e5b9b5ee8c3a4f3bff348cd94e3555e6b69585f6
> 
> Check for more XHCI ACPI IDs
> Andrew Turner	2023-01-04	1	-4/+7
> https://cgit.freebsd.org/src/commit/?
> id=8793196ca28f7b78f04ca479fe60b7d7af6b20e1
> 
> 

I see that last URL ended up split. Trying an alternate notation to see
if it avoids that:

<https://cgit.freebsd.org/src/commit/?id=e5b9b5ee8c3a4f3bff348cd94e3555e6b69585f6>


-- 
===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.