Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144371680
D3692.id8824.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
914 B
Referenced Files
None
Subscribers
None
D3692.id8824.diff
View Options
Index: sys/boot/efi/loader/copy.c
===================================================================
--- sys/boot/efi/loader/copy.c
+++ sys/boot/efi/loader/copy.c
@@ -41,7 +41,7 @@
#define EFI_STAGING_SIZE 32
#endif
-#define STAGE_PAGES ((EFI_STAGING_SIZE) * 1024 * 1024 / 4096)
+#define STAGE_PAGES EFI_SIZE_TO_PAGES((EFI_STAGING_SIZE) * 1024 * 1024)
EFI_PHYSICAL_ADDRESS staging, staging_end;
int stage_offset_set = 0;
@@ -59,7 +59,7 @@
(unsigned long)(status & EFI_ERROR_MASK));
return (status);
}
- staging_end = staging + STAGE_PAGES * 4096;
+ staging_end = staging + STAGE_PAGES * EFI_PAGE_SIZE;
#if defined(__aarch64__) || defined(__arm__)
/*
@@ -132,7 +132,7 @@
src = (uint64_t *)staging;
dst = (uint64_t *)(staging - stage_offset);
- last = (uint64_t *)(staging + STAGE_PAGES * EFI_PAGE_SIZE);
+ last = (uint64_t *)staging_end;
while (src < last)
*dst++ = *src++;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 2:38 AM (15 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28527492
Default Alt Text
D3692.id8824.diff (914 B)
Attached To
Mode
D3692: Use EFI page size constants instead of hardcoding 4096.
Attached
Detach File
Event Timeline
Log In to Comment