On 08/28/14 16:59, Ard Biesheuvel wrote:
> On 28 August 2014 16:52, Peter Maydell <[email protected]> wrote:
>> On 28 August 2014 15:30, Laszlo Ersek <[email protected]> wrote:
>>> So we got, in the NOR-mapped FD file:
>>>
>>> address 0: jump instruction to 4K, otherwise a bunch of emptiness
>>> (according to erase polarity!)
>>
>> Ideally this should be a proper complete vector table with
>> handlers for all the exception vectors. In particular it is a
>> nice touch if exceptions for things like invalid accesses
>> and undefined instructions end up in some sort of panic-abort
>> function that dumps a diagnostic message to the UART.
>> This isn't necessary for proper operation but it's handy if
>> you're trying to debug either UEFI itself or early kernel startup.
>> As a minimum you want to have them go somewhere sensible
>> (like a jump-to-self instruction) so that we definitely don't just
>> try to reenter UEFI at its start point (an effect that is more
>> likely in 32-bit ARM where the all-zeroes instruction is a NOP).
>>
>
> Fortunately, the NOR images are padded with 0xff, so that is covered.
Yes, 0xFF corresponds to ErasePolarity = 1.
>
>> Does UEFI install a proper vector table at some point in
>> bootup by writing to the vector base address register? If
>> not then providing a sensible initial set of vectors is even
>> more important.
>>
>
> It does install a proper vector table, and contains exception handling
> code to at least produce some meaningful output (register dump), at
> least on debug builds.
I'm glad that I didn't just post gibberish! :)
> However, putting a vector table in that particular place is
> troublesome, as the whole point of having the region is to avoid
> putting a Firmware Volume (FV) there. And having to code the whole
> vector table in hex inside the DATA = { } is not a great prospect
> either.
I think that the exception vector table simply doesn't *belong* in the
flash.
Thanks,
Laszlo
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel