>>> On 26.08.16 at 16:21, <s.mun...@whatever-company.com> wrote:
> Hi,
> 
> 
>> At the very least we shouldn't overlap with the BDA (starting at
>> 0040:0000 and iirc covering up to 256 bytes, which is why DOS
>> never used any memory below 0050:0000).
> 
> Mmm, I misread the assembly the low limit applied to the multi boot
> value was 0x4000 and not 0x1000 ...
> 
> Would this logic be acceptable :
> 
> high_limit = 0xa0000
> low_limit  = 0x40000
> 
> if (MBI_MEMLIMITS available and >= low_limit)
>  -> use that - 64k
> 
> if (low_limit <= EBDA location < high_limit)
>  -> use that - 64k
> 
> if (BDA memory size >= low_limit)
>  -> use that - 64k
> 
> if all failed:
>  print_err("No low memory available")
> 
> (in pseudo code, didn't really want to code it in assembly if it's not
> acceptable :p)
> 
> 
> If that looks ok, I can write and test a patch implementing that.

I'm not sure. I'd like to see the current logic altered as little as
possible, and what you suggest above is more than that minimum.
Ideally you'd just cap things at the lower end, if they turn out too
small. But then again - all bets are off anyway when all three
values are unreasonably low. So another question: Can you
detect whether we get booted from Linux (i.e. do they provide
any kind of identification anywhere)?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to