lkml.org 
[lkml]   [2018]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] firmware: make sure builtin firmware is page alignment
Date
when firmware is in filesystem, request_firmware will load it,
and copy it to vmalloc memory, that is page align memory.

but when firmware is builtin, it is 8 bytes or 4 bytes alignment.

make sure builtin firmware is page algnment, that can simplify algorithm
to handle firmware.

Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
Signed-off-by: Li, Ting <ting.li@intel.com>
---
firmware/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/firmware/Makefile b/firmware/Makefile
index 29641383e136..d7bfce56378f 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -16,10 +16,11 @@ quiet_cmd_fwbin = MK_FW $@
firmware/%.gen.S,%,$@))))"; \
ASM_WORD=$(if $(CONFIG_64BIT),.quad,.long); \
ASM_ALIGN=$(if $(CONFIG_64BIT),3,2); \
+ ASM_FW_ALIGN=12; \
PROGBITS=$(if $(CONFIG_ARM),%,@)progbits; \
echo "/* Generated by firmware/Makefile */" > $@;\
echo " .section .rodata" >>$@;\
- echo " .p2align $${ASM_ALIGN}" >>$@;\
+ echo " .p2align $${ASM_FW_ALIGN}" >>$@;\
echo "_fw_$${FWSTR}_bin:" >>$@;\
echo " .incbin \"$(2)\"" >>$@;\
echo "_fw_end:" >>$@;\
--
2.18.0
\
 
 \ /
  Last update: 2018-08-03 03:47    [W:0.049 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site