Why does system report less memory in UEFI mode than in legacy BIOS?











up vote
0
down vote

favorite












I noticed that on a machine, if the firmware is configured in UEFI mode instead of Legacy BIOS, the operating system reports slightly less total memory (this is on Linux, but that shouldn't make a difference?). The difference is very small, about 3.5 MB, but I wonder, where does this memory go?



My understanding is that the Legacy BIOS compatibility mode is not actually a "real" BIOS, but rather a compatibility shim layer that the firmware loads to make it look to the OS like it's using a BIOS. All the UEFI code is still there. So there should be no difference, or if there is one, the difference should be the other way since the BIOS compatibility code uses a tiny bit of memory.










share|improve this question


















  • 1




    Speculation : The UEFI might be loading 'extra' software. Some user application or some vendor specific thing. Or maybe it's just the graphical drivers to run to the UEFI look?
    – Ricardo S.
    20 hours ago






  • 2




    It could be that there are two things going on here. Aside from the BIOS shim taking up some memory there could be a UEFI shim that offers secure boot services (amongst others) to the operating system in order to provide the trusted execution platform facilities. It might be that this environment is 4MB, but the BIOS environment is only 512KB, which would account for the difference. Not certain, hence only a comment...
    – Mokubai
    19 hours ago















up vote
0
down vote

favorite












I noticed that on a machine, if the firmware is configured in UEFI mode instead of Legacy BIOS, the operating system reports slightly less total memory (this is on Linux, but that shouldn't make a difference?). The difference is very small, about 3.5 MB, but I wonder, where does this memory go?



My understanding is that the Legacy BIOS compatibility mode is not actually a "real" BIOS, but rather a compatibility shim layer that the firmware loads to make it look to the OS like it's using a BIOS. All the UEFI code is still there. So there should be no difference, or if there is one, the difference should be the other way since the BIOS compatibility code uses a tiny bit of memory.










share|improve this question


















  • 1




    Speculation : The UEFI might be loading 'extra' software. Some user application or some vendor specific thing. Or maybe it's just the graphical drivers to run to the UEFI look?
    – Ricardo S.
    20 hours ago






  • 2




    It could be that there are two things going on here. Aside from the BIOS shim taking up some memory there could be a UEFI shim that offers secure boot services (amongst others) to the operating system in order to provide the trusted execution platform facilities. It might be that this environment is 4MB, but the BIOS environment is only 512KB, which would account for the difference. Not certain, hence only a comment...
    – Mokubai
    19 hours ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I noticed that on a machine, if the firmware is configured in UEFI mode instead of Legacy BIOS, the operating system reports slightly less total memory (this is on Linux, but that shouldn't make a difference?). The difference is very small, about 3.5 MB, but I wonder, where does this memory go?



My understanding is that the Legacy BIOS compatibility mode is not actually a "real" BIOS, but rather a compatibility shim layer that the firmware loads to make it look to the OS like it's using a BIOS. All the UEFI code is still there. So there should be no difference, or if there is one, the difference should be the other way since the BIOS compatibility code uses a tiny bit of memory.










share|improve this question













I noticed that on a machine, if the firmware is configured in UEFI mode instead of Legacy BIOS, the operating system reports slightly less total memory (this is on Linux, but that shouldn't make a difference?). The difference is very small, about 3.5 MB, but I wonder, where does this memory go?



My understanding is that the Legacy BIOS compatibility mode is not actually a "real" BIOS, but rather a compatibility shim layer that the firmware loads to make it look to the OS like it's using a BIOS. All the UEFI code is still there. So there should be no difference, or if there is one, the difference should be the other way since the BIOS compatibility code uses a tiny bit of memory.







memory bios uefi






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 21 hours ago









janneb

945612




945612








  • 1




    Speculation : The UEFI might be loading 'extra' software. Some user application or some vendor specific thing. Or maybe it's just the graphical drivers to run to the UEFI look?
    – Ricardo S.
    20 hours ago






  • 2




    It could be that there are two things going on here. Aside from the BIOS shim taking up some memory there could be a UEFI shim that offers secure boot services (amongst others) to the operating system in order to provide the trusted execution platform facilities. It might be that this environment is 4MB, but the BIOS environment is only 512KB, which would account for the difference. Not certain, hence only a comment...
    – Mokubai
    19 hours ago














  • 1




    Speculation : The UEFI might be loading 'extra' software. Some user application or some vendor specific thing. Or maybe it's just the graphical drivers to run to the UEFI look?
    – Ricardo S.
    20 hours ago






  • 2




    It could be that there are two things going on here. Aside from the BIOS shim taking up some memory there could be a UEFI shim that offers secure boot services (amongst others) to the operating system in order to provide the trusted execution platform facilities. It might be that this environment is 4MB, but the BIOS environment is only 512KB, which would account for the difference. Not certain, hence only a comment...
    – Mokubai
    19 hours ago








1




1




Speculation : The UEFI might be loading 'extra' software. Some user application or some vendor specific thing. Or maybe it's just the graphical drivers to run to the UEFI look?
– Ricardo S.
20 hours ago




Speculation : The UEFI might be loading 'extra' software. Some user application or some vendor specific thing. Or maybe it's just the graphical drivers to run to the UEFI look?
– Ricardo S.
20 hours ago




2




2




It could be that there are two things going on here. Aside from the BIOS shim taking up some memory there could be a UEFI shim that offers secure boot services (amongst others) to the operating system in order to provide the trusted execution platform facilities. It might be that this environment is 4MB, but the BIOS environment is only 512KB, which would account for the difference. Not certain, hence only a comment...
– Mokubai
19 hours ago




It could be that there are two things going on here. Aside from the BIOS shim taking up some memory there could be a UEFI shim that offers secure boot services (amongst others) to the operating system in order to provide the trusted execution platform facilities. It might be that this environment is 4MB, but the BIOS environment is only 512KB, which would account for the difference. Not certain, hence only a comment...
– Mokubai
19 hours ago










1 Answer
1






active

oldest

votes

















up vote
2
down vote













The big difference ultimately ends up being that UEFI almost invariably needs more reserved memory, because:




  • It has more interfaces than the legacy BIOS. Examples include the much more complex RTC interface, the EFI variable interface, and the EFI capsule loader interface.

  • It's usually a lot more code than the legacy BIOS, largely to support the extra ABI's.

  • It runs in protected or long mode (instead of real mode like legacy BIOS), which can access all the system's memory, which in turn makes the developers a lot lazier about memory efficiency.


Most well written CSM interfaces (the legacy BIOS functionality in most UEFI implementations) will actually unload most or all of the UEFI code that isn't needed when you boot in legacy mode, so all that extra reserved memory gets freed up.






share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1374948%2fwhy-does-system-report-less-memory-in-uefi-mode-than-in-legacy-bios%23new-answer', 'question_page');
    }
    );

    Post as a guest
































    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    The big difference ultimately ends up being that UEFI almost invariably needs more reserved memory, because:




    • It has more interfaces than the legacy BIOS. Examples include the much more complex RTC interface, the EFI variable interface, and the EFI capsule loader interface.

    • It's usually a lot more code than the legacy BIOS, largely to support the extra ABI's.

    • It runs in protected or long mode (instead of real mode like legacy BIOS), which can access all the system's memory, which in turn makes the developers a lot lazier about memory efficiency.


    Most well written CSM interfaces (the legacy BIOS functionality in most UEFI implementations) will actually unload most or all of the UEFI code that isn't needed when you boot in legacy mode, so all that extra reserved memory gets freed up.






    share|improve this answer

























      up vote
      2
      down vote













      The big difference ultimately ends up being that UEFI almost invariably needs more reserved memory, because:




      • It has more interfaces than the legacy BIOS. Examples include the much more complex RTC interface, the EFI variable interface, and the EFI capsule loader interface.

      • It's usually a lot more code than the legacy BIOS, largely to support the extra ABI's.

      • It runs in protected or long mode (instead of real mode like legacy BIOS), which can access all the system's memory, which in turn makes the developers a lot lazier about memory efficiency.


      Most well written CSM interfaces (the legacy BIOS functionality in most UEFI implementations) will actually unload most or all of the UEFI code that isn't needed when you boot in legacy mode, so all that extra reserved memory gets freed up.






      share|improve this answer























        up vote
        2
        down vote










        up vote
        2
        down vote









        The big difference ultimately ends up being that UEFI almost invariably needs more reserved memory, because:




        • It has more interfaces than the legacy BIOS. Examples include the much more complex RTC interface, the EFI variable interface, and the EFI capsule loader interface.

        • It's usually a lot more code than the legacy BIOS, largely to support the extra ABI's.

        • It runs in protected or long mode (instead of real mode like legacy BIOS), which can access all the system's memory, which in turn makes the developers a lot lazier about memory efficiency.


        Most well written CSM interfaces (the legacy BIOS functionality in most UEFI implementations) will actually unload most or all of the UEFI code that isn't needed when you boot in legacy mode, so all that extra reserved memory gets freed up.






        share|improve this answer












        The big difference ultimately ends up being that UEFI almost invariably needs more reserved memory, because:




        • It has more interfaces than the legacy BIOS. Examples include the much more complex RTC interface, the EFI variable interface, and the EFI capsule loader interface.

        • It's usually a lot more code than the legacy BIOS, largely to support the extra ABI's.

        • It runs in protected or long mode (instead of real mode like legacy BIOS), which can access all the system's memory, which in turn makes the developers a lot lazier about memory efficiency.


        Most well written CSM interfaces (the legacy BIOS functionality in most UEFI implementations) will actually unload most or all of the UEFI code that isn't needed when you boot in legacy mode, so all that extra reserved memory gets freed up.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 8 hours ago









        Austin Hemmelgarn

        2,31918




        2,31918






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1374948%2fwhy-does-system-report-less-memory-in-uefi-mode-than-in-legacy-bios%23new-answer', 'question_page');
            }
            );

            Post as a guest




















































































            Popular posts from this blog

            Сан-Квентин

            8-я гвардейская общевойсковая армия

            Алькесар