Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151959351
D3692.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
929 B
Referenced Files
None
Subscribers
None
D3692.diff
View Options
Index: head/sys/boot/efi/loader/copy.c
===================================================================
--- head/sys/boot/efi/loader/copy.c
+++ head/sys/boot/efi/loader/copy.c
@@ -41,7 +41,7 @@
#define EFI_STAGING_SIZE 48
#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
Sun, Apr 12, 6:59 PM (1 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31305812
Default Alt Text
D3692.diff (929 B)
Attached To
Mode
D3692: Use EFI page size constants instead of hardcoding 4096.
Attached
Detach File
Event Timeline
Log In to Comment