[File] [PATCH] Magdir/intel BIOS (ia32) ROM; sub routines for PCI

Christos Zoulas christos at zoulas.com
Sat Apr 2 15:12:19 UTC 2022


Committed, thanks!

> On Mar 31, 2022, at 6:41 PM, Jörg Jenderek <joerg.jen.der.ek at gmx.net> wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Am 01.04.2022 um 00:26 schrieb Jörg Jenderek:
>> Hello,
>> 
>> some days ago i wanted to change the boot order on my old PI.
>> Therefore i installed package rpi-eeprom. Afterwards in sub
>> directory bootloader beneath /lib/firmware are files with names
>> like pieeprom*.bin.
> 
> 
>> ROM images for cards with PCI interface contain a section for
>> handling PCI Data. Often this structure is stored near the
>> beginning and it starts with 4 bytes ASCII signature PCIR. The
>> offset to this is always stored at well defined position. So now
>> show this information by lines like:
>>> (24.s)	string			=PCIR	\b;
>>>> 24	uleshort		x	at %#x PCI
>> After that string the vendor identification (ID) is stored as 2
>> byte integer. That can be shown by line like:
>>>> (24.s+4)	uleshort	x	ID=%4.4x
>> 
>> Luckily there exist the PCI ID Repository where the meaning of
>> these numbers is stored in table form as file pci.ids. So i look
>> in this file and transfer it manually as magic expression. There
>> exist some thousands of lines, but these numbers are reduced
>> because i "translate" only the manufacture ID and show device id
>> as hexadecimal number. Furthermore i also look for "standard"
>> (not exotic) hardware like ethernet network cards, mass storage
>> card and VGA compatible display cards. Furthermore i concentrate
>> only on market leading manufacturers. So in the end i get only a
>> dozen of lines that look like:
> 
>> 
>> Later i put these lines in a subroutine and in a new file
>> Magdir/pci.ids and just call it by line like:
>>>> (24.s+4)	use		PCI-vendor
> 
> 
>> Probably this is the same meaning as in PCI section. So what is
>> described here in samples by "device type 02-00-00" is described
>> in PCI section in readable form by text like "CLASS=2 network
>> controller ethernet". Later i replace it by line
>>>> (26.s+0x12)	use		PCI-class
>> This gives correct description "storage controller SCSI" for
>> 2975BIOS.BIN and adaptec1542.bin. Correct is also "network
>> controller ethernet" for efi-e1000.rom and efi-rtl8139.rom. With
>> best wishes Jörg Jenderek
>> 
>> 
> During my work on that patch for BIOS (ia32) ROM i out sourced some
> magic lines for handling PCI parts in sub routines and put these in
> a a new file Magdir/pci.ids. Unfortunatly i have forgot to append
> this new file. So here this now comes.
> 
> With best wishes
> Jörg Jenderek
> - --
> Jörg Jenderek (GMX)
> -----BEGIN PGP SIGNATURE-----
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
> 
> iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCYkYuEwAKCRCv8rHJQhrU
> 1uqAAJ9ypNfHuDWc7urZY3GprUiOM/oNrACgtB9nyYeInzq5Jcw/m+qexHn9EKI=
> =tFC7
> -----END PGP SIGNATURE-----
> <pci_ids.DEFANGED-0><pci_ids_sig.DEFANGED-1>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP
URL: <https://mailman.astron.com/pipermail/file/attachments/20220402/a8a621c1/attachment.asc>


More information about the File mailing list