Muti-bin related functions and settings

Source: Internet
Author: User
Tags deprecated
This function saves the number of. Bin files to be downloaded and their addresses and sizes.
This function saves the number of. binfiles to be downloaded, their addresses, and sizes.
Sentence:
Void oemmultibinnotify (
Const pmultibininfo pinfo
);
Parameters:
Pinfo
[In] contains information about the downloaded. Bin files.
Return Value:
None
Note:
The number of. Bin files to be downloaded and their addresses and sizes are necessary to successfully cache all the OS images in Ram, if they are destined for flash memory.
If the number of. binfiles to be downloaded and their address and size target address are flash memory, it is necessary for them to successfully cache the operating system image files in Ram.
G_poemmultibinnotify is a function pointer. you can assign the address of a custom bin using Y routine that the blcommon code then callat the appropriate time through this function pointer. the following code example shows how you can perform this routine.
G_poemmultibinnotify is a function pointer. You can allocate the address of a custom bin notification routine. The blcommon code of this routine is then called through this function pointer at the appropriate time. The following code example shows how you execute this routine.

Bool oemmultibinnotify (const pmultibininfo pinfo );
G_poemmultibinnotify = oemmultibinnotify;
Requirements:
Header blcommon. h
Library blcommon. Lib
Windows Embedded ce Windows CE. Net 4.2 and later

========================================================== ===========================------------- ==============
Adding support for multiple-bin image notification

Platform builder and the blcommon library support downloading multiple. Bin files during the same download session. This is useful when developing a multi-bin run-time image.
Platform builder and the blcommon library support multi-bind File Download in the unified download phase. This is useful when you develop multi-bin runtime image files.

The blcommon library can contain y third-party code about each. BIN file to be downloaded, And the. BIN file's address and length, through a function pointer.
The blcommon library can identify the address and length of the third-party code about each. binfile to be downloaded, and use a function pointer to download it.

This information is useful when deciding how to temporarily cache a multi-bin run-time image in Ram before writing it to flash memory. For more information, see oemmultibinnotify.
This information is useful when deciding how to temporarily cache an image file for multi-bin running in Ram and write it into flash memory. For more messages, refer to oemmultibinnotify.

The following code example shows an implementation of oemmultibinnotify.
The following code example shows the implementation of oemmultibinnotify.
Void oemmultibinnotify (const pmultibininfo pinfo)
{
Byte ncount;

If (! Pinfo |! Pinfo-> dwnumregions)
{
Edbgoutputdebugstring ("Warning: oemmultibinnotify: Invalid bin region Descriptor (s). \ r \ n ");
Return;
}

G_dwminimagestart = pinfo-> region [0]. dwregionstart;

Edbgoutputdebugstring ("\ r \ ndownload BIN file information: \ r \ n ");
Edbgoutputdebugstring ("----------------------------------------------------- \ r \ n ");
For (ncount = 0; ncount <pinfo-> dwnumregions; ncount ++)
{
Edbgoutputdebugstring ("[% d]: base address = 0x % x length = 0x % x \ r \ n", ncount, pinfo-> region [ncount]. dwregionstart, pinfo-> region [ncount]. dwregionlength );
If (pinfo-> region [ncount]. dwregionstart <g_dwminimagestart)
{
G_dwminimagestart = pinfo-> region [ncount]. dwregionstart;
If (g_dwminimagestart = 0)
{
Edbgoutputdebugstring ("Warning: oemmultibinnotify: bad start address for region (% d). \ r \ n", ncount );
Return;
}
}
}

Memcpy (lpbyte) & g_binregioninfo, (lpbyte) pinfo, sizeof (multibininfo ));
}

When using blcommon during boot loader initialization, for example, oemdebuginit, the multi-bin notification function pointer shoshould be assigned to the OEM's notification routine.

For example, to have blcommon call oemmultibinwing y to validate the image signature, you shocould do the following in oemdebuginit.
Use blcommon during boot loader initialization. For example, oemdebuginit, the multi-bin notification function pointer should be assigned to the OEM notification routine.
For example, to make blcommon call to oemmultibinnotify to make the Image Signature valid, you can make the following settings in oemdebuginit:
G_poemmultibinnotify = oemmultibinnotify;

Bytes -----------------------------------------------------------------------------------------------------------------

This function verifies that the address provided is in valid memory.
This function verifies the addresses in the valid memory.
Sentence:
Bool oemverifymemory (
DWORD dwstartaddr,
DWORD dwlength
);
Parameters:
Dwstartaddr
[In] address to be verified.

Dwlength
[In] length of the address, in bytes.
Return Value:
True indicates success. False indicates failure.
Note:
G_poemverifymemory is a function pointer. an OEM can assign the address of a custom verify memory routine that the blcommon code then callat the appropriate time through this function pointer. the following code example shows how you can perform this routine.
G_poemverifymemory is a function pointer. The OEM can assign a custom memory verification routine, which is implemented by calling blcommon code through this function pointer at an appropriate time. The following code example shows that you can execute this routine.

Bool oemverifymemory (DWORD dwstartaddr, DWORD dwlength );
G_poemverifymemory = oemverifymemory;
Requirements:
Header blcommon. h
Library blcommon. Lib
Windows Embedded ce Windows CE. Net 4.2 and later

Bytes -----------------------------------------------------------------------------------------------------------

Mount settings can be located anywhere along a multi-level hierarchy of registry keys starting at HKEY_LOCAL_MACHINE \ SYSTEM \ storagemanager \ profiles. the scope of the Mount setting narrows at each level in the same manner as variable scope in a C ++ program. at any particle level, Storage Manager combines the applicable settings to generate the proper Mount settings for a specific instance of a mounted file. settings at a lower level in the hierarchy override values that might have been set at a higher level.
Mount can be located anywhere in HKEY_LOCAL_MACHINE \ SYSTEM \ storagemanager \ profiles together with multiple registered key values. The Mount range can be set in the same way as the visible range at each level in the C ++ program. At any specific level, Storage Manager can use appropriate settings to mount a specific instance in a Mount area. A lower-level setting may have a higher priority than a higher-level setting.

* Mount settings under the base profile key (in the basic file key value)
Settings at [HKLM \ System \ storagemanager \ profiles] pertain to all file systems on all profile-based storage devices; that is, any file system with a block device. note that this excludes autoload file systems.
In the [HKLM \ System \ storagemanager \ profiles] partition, all file systems on all file storage devices have Block devices. Note that the autoload file system is excluded.

* Mount settings under a specific profile key (specified file key value)
Settings at [HKLM \ System \ storagemanager \ profiles \ <myprofilename>], pertain to all mounted instances of all file systems on storage devices reporting the profile <myprofilename>.
Set in [HKLM \ System \ storagemanager \ profiles \ <myprofilename>], and record the <myprofilename> file for the partitions of instances mounted to all file systems on the storage device.

* Mount settings under a file system sub-key of a profile specific key (a subkey of a file system under a given file system key value)
Settings under a file system sub-key, [HKLM \ System \ storagemanager \ profiles \ <myprofilename >\< myfilesystemname>], pertain to only mounted instances of <myfilesystemname> on storage devices reporting the profile <myprofilename>.
Set in a file system sub-key, [HKLM \ System \ storagemanager \ profiles \ <myprofilename >\< myfilesystemname>], only
Partitions of the <myfilesystemname> instance record profile <myprofilename> mounted on the storage device.
* Mount settings under a partition sub-key of a profile specific key (a partition sub-key under the key value of a given file system)
Settings at [HKLM \ System \ storagemanager \ profiles \ <myprofilename >\< mypartitionname>], pertain to only the partition named <mypartitionname> when mounted on devices reporting the profile <myprofilename>.
On the [HKLM \ System \ storagemanager \ profiles \ <myprofilename> \ <mypartitionname>] Page, set the partition to only <mypartitionname>. When the file <myprofilename> is mounted to the device.

For versions of Windows Embedded ce earlier than Windows CE 5.0, you can place Mount settings in the mountflags value. mountflags value use bitwise OR combinations to specify how the partition shocould be mounted. values for mountflags and its replacements can be set at the profiles level, and also within an individual profile.
For versions earlier than Windows CE 5.0, you can set the Mount value in the mountflags value. Mountflags values use bitwise OR combined to determine how partitions are loaded. The value of mountflags and its alternative values can be set at the profiles level, or under each profiles.

For Windows CE 5.0 and later, the mountflags registry flag has been deprecated. replacement values are simpler: each replacement value can be DWORD: 1, indicating that the setting is turned on, or DWORD: 0, indicating that the setting is turned off.
For Windows CE 5.0 and later versions, flag of the mountflags registry is no longer recommended. Replace with a simpler value: Each alternative value can be set to DWORD: 1, indicating that the setting is enabled, or DWORD: 0, indicating that the setting is disabled.

The following table provides summary descriptions of flags for setting Mount values.
The following table provides a brief description of the Mount value and its attributes.

Flag description

"Mountflags" indicates how the partition is mounted.
This value has been deprecated for Windows CE 5.0 and later. It is recommended that you use the replacement registry keys listed below to indicate partition Mount values.
Specifies how a partition is mounted.
This value is not recommended for Windows CE 5.0 and later. It is recommended to use the registry key value of the Mount value of the Flag partition listed below.

"Mounthidden" specifies a hidden file system. set to 1 to enable.

Replaces "mountflags" = DWORD: 1
Specify a hidden file system and set enable 1. Replace the "mountflags" = DWORD: 1

"Mountasbootable" specifies that the file system may contain in the system registry. The first mounted partition on the store gets the hive. set to 1 to enable.

Replaces "mountflags" = DWORD: 2
Clarified the system registry that may be included in the file system. The first Mount partition on the storage device is based on the cell. Set 1 to enable. Replaced the previous: "mountflags" = DWORD: 2
"Mountasroot" specifies to mount as the root of the file system. set to 1 to enable.

Replaces "mountflags" = DWORD: 4
Specify the root of the file system. Set 1 to enable. Replace the previous version of "mountflags" = DWORD: 4
"Mountasrom" specifies to mount as an external ROM file system. set to 1 to enable.

Replaces "mountflags" = DWORD: 10
Specify mounting as an extended ROM file system, set 1 to enable, replace the previous version of "mountflags" = DWORD: 10
"Mountsystem" treats all files and subdirectories as system files. set to 1 to enable.

Replaces "mountflags" = DWORD: 20
Regard all files and sub-paths as system files. Set 1 to replace the old version of "mountflags" = DWORD: 20
"Mountpermanent" indicates this volume can never be dismounted. set to 1 to enable.

Replaces "mountflags" = DWORD: 40
It is pointed out that this partition can never be mounted. Set 1 to enable. Replace the previous version of "mountflags" = DWORD: 40
"Mountasnetwork" indicates this volume has es all UNC paths. set to 1 to enable.

Replaces "mountflags" = DWORD: 80
It indicates that this partition receives all UNC paths and sets 1 to enable. Replace the previous version of "mountflags" = DWORD: 80

The following table shows examples of typical replacements for deprecated mountflags values:
The following table shows the typical values of mountflags that do not favor use:
Deprecated value: replacement values description

"Mountflags" = DWORD: 6 "mountasbootable" = DWORD: 1 "mountasroot" = DWORD: 1

Mounts the partition at the root as a bootable partition.
Mount a partition in the root directory as a pilot Partition Table

"Mountflags" = DWORD: 11 "mounthidden" = DWORD: 1 "mountasrom" = DWORD: 1

Mounts the partition as Rom, and makes the partition not visible to users.
Mount a partition as the Rom, and make the partition invisible to users.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.