tk_ref_ver

Reference Version Information

[C Language Interface]

ER ercd = tk_ref_ver ( T_RVER *pk_rver ) ;

[Parameters]

T_RVER*	pk_rver	Start address of packet for version information


[Return Parameters]


ER	ercd	Error code


pk_rver detail:


	UH	maker	µT-Kernel maker code


	UH	prid	µT-Kernel ID


	UH	spver	Specification version


	UH	prver	µT-Kernel version


	UH	prno[4]	µT-Kernel products management information

[Error Codes]

E_OK	Normal completion


E_PAR	Parameter error (the address of the return parameter packet cannot be used)

[Description]

Gets information about the µT-Kernel version in use, returning that information in the packet specified in pk_rver. The following information can be obtained.

maker is the vendor code of the µT-Kernel implementing vendor. The maker field has the format shown in Figure 4.11.



Figure 4.11: maker Field Format

prid is a number indicating the µT-Kernel type. The prid format is shown in Figure 4.12.

Assignment of values to prid is left up to the vendor implementing the µT-Kernel. Note, however, that this is the only number distinguishing product types, and that vendors should give careful thought to how they assign these numbers, doing so in a systematic way. In that way, the combination of maker code and prid becomes a unique identifier of the µT-Kernel type.



Figure 4.12: prid Field Format

The upper 4 bits of spver give the TRON specification series. The low 12 bits indicate the µT-Kernel specification version implemented. The format of spver is shown in Figure 4.13.

If, for example, a product conforms to the µT-Kernel specification Ver 1.02.xx, spver is as follows.

MAGIC = 0x6 (µT-Kernel)

SpecVerS = 0x102 (Ver 1.02)

Spver = 0x6102

If a product implements the µT-Kernel specification draft version Ver 1.B0.xx, spver is as follows.

MAGIC = 0x6 (µT-Kernel)

SpecVerS = 0x1B0 (Ver 1.B0)

Spver = 0x61B0



MAGIC: number for distinguishing OS series

0×0 common to TRON (TAD, etc.)

0×1 reserved

0×2 reserved

0×3 reserved

0×4 reserved

0×5 reserved

0×6 µT-Kernel

0×7 T-Kernel

SpecVer: The version of the TRON specification on which the product is based. This is given as a three-digit packed-format BCD code. In the case of a draft version, the letter A, B, or C may appear in the second digit. In this case, the corresponding hexadecimal form of A, B, or C is inserted.

Figure 4.13: spver Field Format

prver is the version number of the µT-Kernel implementation. The specific values assigned to prver are left to the vendor implementing the µT-Kernel to decide. prno is a return parameter for use in indicating µT-Kernel product management information, product number, etc. The specific meaning of values set in prno is left to the vendor implementing the µT-Kernel to decide.

[Additional Notes]

The format of the packet and structure members for getting version information is mostly uniform across the various TRON specifications, but the CPU information and variation descriptors are not specified. The value obtained by tk_ref_ver in SpecVer is the first three digits of the specification version number. The numbers after that indicate minor revisions such as those issued to correct misprints and the like, and are not obtained by tk_ref_ver. For the purpose of matching to the specification contents, the first three numbers of the specification version are sufficient.

An OS implementing a draft version may have A, B, or C as the second number of SpecVer. It must be noted that in such cases the specification order of release may not correspond exactly to higher and lower SpecVer values. For example, specifications may be released in the following order:

Ver 1.A1 ( Ver 1.A2 ( Ver 1.B1 ( Ver 1.C1 ( Ver 1.00 ( Ver 1.01 ( …

In this example, when going from Ver 1.Cx to Ver 1.00, SpecVer goes from a higher to a lower value.

[Difference with T-Kernel 1.00.00]

The assignment of MAGIC for spver, the member of T_RVER, is different. This is because the policy and the naming scheme of system call, etc. are different between the OS specifications in previous TRON systems and those in a T-Kernel system, so that it is determined not to be managed in the same system.

Comments

Click here to Post a Comment