@@ -660,6 +660,17 @@ static void __init trim_platform_memory_ranges(void)
660
660
661
661
static void __init trim_bios_range (void )
662
662
{
663
+ /*
664
+ * A special case is the first 4Kb of memory;
665
+ * This is a BIOS owned area, not kernel ram, but generally
666
+ * not listed as such in the E820 table.
667
+ *
668
+ * This typically reserves additional memory (64KiB by default)
669
+ * since some BIOSes are known to corrupt low memory. See the
670
+ * Kconfig help text for X86_RESERVE_LOW.
671
+ */
672
+ e820__range_update (0 , PAGE_SIZE , E820_TYPE_RAM , E820_TYPE_RESERVED );
673
+
663
674
/*
664
675
* special case: Some BIOSes report the PC BIOS
665
676
* area (640Kb -> 1Mb) as RAM even though it is not.
@@ -717,15 +728,6 @@ early_param("reservelow", parse_reservelow);
717
728
718
729
static void __init trim_low_memory_range (void )
719
730
{
720
- /*
721
- * A special case is the first 4Kb of memory;
722
- * This is a BIOS owned area, not kernel ram, but generally
723
- * not listed as such in the E820 table.
724
- *
725
- * This typically reserves additional memory (64KiB by default)
726
- * since some BIOSes are known to corrupt low memory. See the
727
- * Kconfig help text for X86_RESERVE_LOW.
728
- */
729
731
memblock_reserve (0 , ALIGN (reserve_low , PAGE_SIZE ));
730
732
}
731
733
0 commit comments