Ross Philipson wrote onĀ 2013-04-30:
> We have been looking at the code in tboot.c that sets the tboot memory
> area to E820_UNUSABLE when it detects that the next module is not Linux.
> Specifically this code:
> 
> uint32_t mem_type = is_kernel_linux() ? E820_RESERVED : E820_UNUSABLE;
> 
> And this commit:
> 
> http://hg.code.sf.net/p/tboot/code/rev/b170b7b39e5c
> 
> It seems to make sense to set the region to reserved but we do not
> understand why the region is set to unusable in the other case. Can
> someone explain the reasoning behind this?



> 
> Also, the check for is_kernel_linux() relies on it not being an elf
> image but this doesn't seem very correct. Not being an elf image does
> not imply it is a Linux kernel. Are you relying on the fact that only
> Linux and Xen are used with tboot at the moment?
> 
> Thanks,
> Ross Philipson

In ACPI spec:

AddressRangeReserved defined as: This range of addresses is in use or
reserved by the system and is not to be included in the allocatable memory
pool of the operating system's memory manager.
AddressRangeUnusable: This range of addresses contains memory in which
errors have been detected. This range must not be used by OSPM.

Only Unusable AddressRange is forbidden to be used by OS. So we set tboot
memory as E820_UNUSABLE for both Linux kernel & Xen cases in the beginning.
But in Linux case, we then found some issues so we had to reset the type to
RESERVED to fix that issue.

That is all I can recall now.

As to the check for is_kernel_linux(), yes, we currently only support Xen &
Linux kernel, so we just differentiate them by the elf property. It might
need to be changed in the future.

Jimmy

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
tboot-devel mailing list
tboot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tboot-devel

Reply via email to