Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1420757
| From | Matt Fleming <matt@codeblueprint.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC PATCH v1 10/18] x86/efi: Access EFI related tables in the clear |
| Date | 2016-06-13 14:10 +0200 |
| Message-ID | <rJyQO-65Z-13@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <rCJHk-366-35@gated-at.bofh.it> <rCMOS-4RW-5@gated-at.bofh.it> <rHIAV-7fu-11@gated-at.bofh.it> <rHIAV-7fu-9@gated-at.bofh.it> <rJyQO-65Z-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, 09 Jun, at 11:16:40AM, Tom Lendacky wrote:
>
> So maybe something along the lines of an enum that would have entries
> (initially) like KERNEL_DATA (equal to zero) and EFI_DATA. Others could
> be added later as needed.
Sure, that works for me, though maybe BOOT_DATA would be more
applicable considering the devicetree case too.
> Would you then want to allow the protection attributes to be updated
> by architecture specific code through something like a __weak function?
> In the x86 case I can add this function as a non-SME specific function
> that would initially just have the SME-related mask modification in it.
Would we need a new function? Couldn't we just have a new
FIXMAP_PAGE_* constant? e.g. would something like this work?
---
enum memremap_owner {
KERNEL_DATA = 0,
BOOT_DATA,
};
void __init *
early_memremap(resource_size_t phys_addr, unsigned long size,
enum memremap_owner owner)
{
pgprot_t prot;
switch (owner) {
case BOOT_DATA:
prot = FIXMAP_PAGE_BOOT;
break;
case KERNEL_DATA: /* FALLTHROUGH */
default:
prot = FIXMAP_PAGE_NORMAL;
}
return (__force void *)__early_ioremap(phys_addr, size, prot);
}
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [RFC PATCH v1 10/18] x86/efi: Access EFI related tables in the clear Matt Fleming <matt@codeblueprint.co.uk> - 2016-06-13 14:10 +0200 Re: [RFC PATCH v1 10/18] x86/efi: Access EFI related tables in the clear Matt Fleming <matt@codeblueprint.co.uk> - 2016-06-13 14:40 +0200
csiph-web