[File] [PATCH] Magdir/intel BIOS (ia32) ROM; sub routines for PCI
Jörg Jenderek
joerg.jen.der.ek at gmx.net
Thu Mar 31 22:41:23 UTC 2022
-----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-----
-------------- next part --------------
#------------------------------------------------------------------------------
# $$
# pci.ids: file(1) magic for PCI specific informations
#
# Vendor identification (ID) https://pci-ids.ucw.cz/v2.2/pci.ids
# show hexadecimal PCI vendor identification in human readable text form
0 name PCI-vendor
# ID vendor name
#>0 uleshort =0x0f00 fOO
>0 uleshort =0x1000 Broadcom
>0 uleshort =0x1002 AMD/ATI
>0 uleshort =0x1013 Cirrus Logic
>0 uleshort =0x1014 IBM
>0 uleshort =0x1022 AMD
>0 uleshort =0x1050 Winbond
>0 uleshort =0x105a Promise
>0 uleshort =0x1095 Silicon
>0 uleshort =0x10EC Realtek
>0 uleshort =0x10de NVIDIA
>0 uleshort =0x1106 VIA
# Woodward McCoach, Inc.
>0 uleshort =0x1231 Woodward
#
>0 uleshort =0x1234 Bochs
>0 uleshort =0x15ad VMware
>0 uleshort =0x1af4 Virtio
>0 uleshort =0x1b36 QEMU
>0 uleshort =0x1de1 Tekram
# maybe also Promise?
#>0 uleshort =0x4289 Promise
#>0 uleshort =0x66a1 FOO
>0 uleshort =0x8086 Intel
>0 uleshort =0x9004 Adaptec
# also Adaptec; but no example
>0 uleshort =0x9005 Adaptec
# for unknown/missing manufactors
>0 default x UNKNOWN
>>0 uleshort x (%#4.4x)
# https://blog.ladsai.com/pci-configuration-space-class-code.html
# Base class code https://wiki.osdev.org/PCI
# show hexadecimal PCI class+sub+ProgIF identification in human readable text form
0 name PCI-class
#>0 ubyte x CLASS=%x
>0 ubyte x
# Device was built prior definition of the class code field
>>0 ubyte 0x00 PRIOR
# Any device except for VGA-Compatible devices like: 2975BIOS.BIN Trm3x5.bin
# BUT also NVidia44.bin vgabios-stdvga-bin.rom
#>>>0 ubyte 0x00 NOT VGA
# VGA-Compatible Device; NO EXAMPLE found here!!
#>>>0 ubyte 0x01 VGA
# like 4243.bin
#>>>0 ubyte 0x04 SUB_CLASS_4
>>0 ubyte 0x01 storage controller
# device sub-type and its definition is dependent upon the base-type code
>>>1 ubyte 0x00 SCSI
>>>1 ubyte 0x01 IDE
>>>1 ubyte 0x02 Floppy
>>>1 ubyte 0x03 IPI
>>>0 ubyte 0x04 RAID
>>>1 ubyte 0x05 ATA
>>>1 ubyte 0x06 SATA
>>>1 ubyte 0x07 SAS
>>>1 ubyte 0x08 NVM
# 4650_sr5.bin "PROMISE" "FT TX4650 Ary X"
>>>1 ubyte 0x80 OTHER
>>0 ubyte 0x02 network controller
>>>1 ubyte 0x00 ethernet
>>>1 ubyte 0x01 token ring
>>>1 ubyte 0x02 FDDI
>>>1 ubyte 0x03 ATM
>>>1 ubyte 0x04 ISDN
>>>1 ubyte 0x05 WorldFip
# PICMG 2.14 Multi Computing
>>>1 ubyte 0x06 PICMG
>>>1 ubyte 0x80 OTHER
>>0 ubyte 0x03 display controller
>>0 ubyte 0x04 multimedia controller
>>0 ubyte 0x05 memory controller
>>0 ubyte 0x06 bridge device
# Simple Communication Controllers
>>0 ubyte 0x07 communication controller
# Base System Peripherals
>>0 ubyte 0x08 base peripheral
# Input Devices
>>0 ubyte 0x09 input device
# Docking Stations
>>0 ubyte 0x0A docking station
>>0 ubyte 0x0B processor
>>0 ubyte 0x0C serial bus controller
>>0 ubyte 0x0D wireless controller
# Intelligent I/O Controllers
>>0 ubyte 0x0E I/O controller
# Satellite Communication Controllers
>>0 ubyte 0x0F satellite controller
# Encryption/Decryption Controllers
>>0 ubyte 0x10 encryption controller
# Data Acquisition and Signal Processing Controllers
>>0 ubyte 0x11 signal controller
# Processing Accelerator
>>0 ubyte 0x12 processing accelerator
# Non-Essential Instrumentation
>>0 ubyte 0x13 non-essential
# reserved or unassigned
>>0 default x
# device does not fit any defined class; Unassigned Class (Vendor specific)
>>>0 ubyte 0xFF UNASSIGNED
# THIS SHOULD NOT HAPPEN! BUT CLASS=8f for Promise 4650_sr5.bin 8660_sr5.bin
>>>0 default x RESERVED
>>>>0 ubyte x (%#x)
# Prog IF of PCI class code?
# defines the specific device programming interface
>2 ubyte >0 \b, ProgIF=%u
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pci.ids.sig
Type: application/octet-stream
Size: 1674 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220401/6ddb1497/attachment.obj>
More information about the File
mailing list