| 5ac44a55 | 22-May-2017 |
Simon Glass <sjg@chromium.org> |
bootstage: Init as early as possible
At present we don't allow use of bootstage before driver model is running. This means we cannot time the init of driver model itself.
Now that bootstage require
bootstage: Init as early as possible
At present we don't allow use of bootstage before driver model is running. This means we cannot time the init of driver model itself.
Now that bootstage requires its own board-specific timer, we can move its init to earlier in the sequence, both before and after relocation.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 03ecac31 | 22-May-2017 |
Simon Glass <sjg@chromium.org> |
bootstage: Use rec_count as the array index
At present bootstage has a large array with all possible bootstage IDs recorded. It adds times to the array element indexed by the ID. This is inefficient
bootstage: Use rec_count as the array index
At present bootstage has a large array with all possible bootstage IDs recorded. It adds times to the array element indexed by the ID. This is inefficient because many IDs are not used during boot. We can save space by only recording those IDs which actually have timestamps.
Update the array to use a record count, which increments with each addition of a new timestamp. This takes longer to record a time, since it may involve an array search. Such a search may be particularly expensive before relocation when the CPU is running slowly or the cache is off. But at that stage there should be very few records.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| cbcd6970 | 22-May-2017 |
Simon Glass <sjg@chromium.org> |
bootstage: Fix up code style and comments
There are several code style and comment nits. Fix them and also remove the comment about passing bootstage to the kernel being TBD. This is already support
bootstage: Fix up code style and comments
There are several code style and comment nits. Fix them and also remove the comment about passing bootstage to the kernel being TBD. This is already supported.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|
| b383d6c0 | 22-May-2017 |
Simon Glass <sjg@chromium.org> |
bootstage: Convert to use malloc()
At present bootstage uses the data section of the image to store its information. There are a few problems with this:
- It does not work on all boards (e.g. those
bootstage: Convert to use malloc()
At present bootstage uses the data section of the image to store its information. There are a few problems with this:
- It does not work on all boards (e.g. those which run from flash before relocation) - Allocated strings still point back to the pre-relocation data after relocation
Now that U-Boot has a pre-relocation malloc() we can use this instead, with a pointer to the data in global_data. Update bootstage to do this and set up an init routine to allocate the memory.
Now that we have a real init function, we can drop the fake 'reset' record and add a normal one instead.
Note that part of the problem with allocated strings remains. They are reallocated but this will only work where pre-relocation memory is accessible after relocation.
Signed-off-by: Simon Glass <sjg@chromium.org>
show more ...
|