diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-09-14 20:23:54 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-09-18 20:48:34 -0400 |
commit | 9dea59025f8aa3742ff5b27d1772e1651066ffb9 (patch) | |
tree | 98df1ab2466f14dffee39a7a56db813db6ad3aef /src/fw | |
parent | 41639f80b6405563bf36844f3aeab1b6fe912ec6 (diff) | |
download | seabios-9dea59025f8aa3742ff5b27d1772e1651066ffb9.tar.gz |
Move malloc code from pmm.c to new files malloc.c and malloc.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/fw')
-rw-r--r-- | src/fw/acpi.c | 1 | ||||
-rw-r--r-- | src/fw/biostables.c | 1 | ||||
-rw-r--r-- | src/fw/coreboot.c | 1 | ||||
-rw-r--r-- | src/fw/csm.c | 5 | ||||
-rw-r--r-- | src/fw/mptable.c | 1 | ||||
-rw-r--r-- | src/fw/paravirt.c | 1 | ||||
-rw-r--r-- | src/fw/pciinit.c | 1 | ||||
-rw-r--r-- | src/fw/shadow.c | 1 | ||||
-rw-r--r-- | src/fw/smbios.c | 1 | ||||
-rw-r--r-- | src/fw/xen.c | 1 |
10 files changed, 12 insertions, 2 deletions
diff --git a/src/fw/acpi.c b/src/fw/acpi.c index f94a6fb8..8ad3673e 100644 --- a/src/fw/acpi.c +++ b/src/fw/acpi.c @@ -15,6 +15,7 @@ #include "config.h" // CONFIG_* #include "paravirt.h" // RamSize #include "dev-q35.h" +#include "malloc.h" // free #include "romfile.h" // romfile_loadint #include "string.h" // memset #include "x86.h" // readl diff --git a/src/fw/biostables.c b/src/fw/biostables.c index cd58ff91..06cd864f 100644 --- a/src/fw/biostables.c +++ b/src/fw/biostables.c @@ -8,6 +8,7 @@ #include "util.h" // dprintf #include "hw/pci.h" // struct pir_header #include "acpi.h" // struct rsdp_descriptor +#include "malloc.h" // malloc_fseg #include "mptable.h" // MPTABLE_SIGNATURE #include "smbios.h" // struct smbios_entry_point #include "string.h" // memcpy diff --git a/src/fw/coreboot.c b/src/fw/coreboot.c index ba65dc60..9971f824 100644 --- a/src/fw/coreboot.c +++ b/src/fw/coreboot.c @@ -14,6 +14,7 @@ #include "config.h" // CONFIG_* #include "acpi.h" // find_acpi_features #include "hw/pci.h" // pci_probe_devices +#include "malloc.h" // free #include "paravirt.h" // PlatformRunningOn #include "romfile.h" // romfile_findprefix #include "stacks.h" // yield diff --git a/src/fw/csm.c b/src/fw/csm.c index 81159b3f..9e73a40e 100644 --- a/src/fw/csm.c +++ b/src/fw/csm.c @@ -17,6 +17,7 @@ #include "boot.h" #include "smbios.h" #include "hw/pic.h" +#include "malloc.h" // csm_malloc_preinit #include "stacks.h" // wait_threads struct rsdp_descriptor csm_rsdp VARFSEG __aligned(16); @@ -250,9 +251,9 @@ handle_csm_0006(struct bregs *regs) size, align, region); if (region & 2) - chunk = pmm_malloc(&ZoneLow, PMM_DEFAULT_HANDLE, size, align); + chunk = _malloc(&ZoneLow, MALLOC_DEFAULT_HANDLE, size, align); if (!chunk && (region & 1)) - chunk = pmm_malloc(&ZoneFSeg, PMM_DEFAULT_HANDLE, size, align); + chunk = _malloc(&ZoneFSeg, MALLOC_DEFAULT_HANDLE, size, align); dprintf(3, "Legacy16GetTableAddress size %x align %x region %d yields %p\n", size, align, region, chunk); diff --git a/src/fw/mptable.c b/src/fw/mptable.c index c79f54f5..4562a463 100644 --- a/src/fw/mptable.c +++ b/src/fw/mptable.c @@ -10,6 +10,7 @@ #include "mptable.h" // MPTABLE_SIGNATURE #include "hw/pci.h" #include "hw/pci_regs.h" +#include "malloc.h" // free #include "romfile.h" // romfile_loadint #include "string.h" // memset #include "x86.h" // cpuid diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c index fd581840..ea2bbfb8 100644 --- a/src/fw/paravirt.c +++ b/src/fw/paravirt.c @@ -20,6 +20,7 @@ #include "mptable.h" // mptable_setup #include "hw/pci.h" // create_pirtable #include "xen.h" // xen_biostable_setup +#include "malloc.h" // malloc_tmp #include "romfile.h" // romfile_loadint #include "string.h" // memset #include "x86.h" // cpuid diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c index ee8d5dd0..549c9404 100644 --- a/src/fw/pciinit.c +++ b/src/fw/pciinit.c @@ -16,6 +16,7 @@ #include "dev-q35.h" // Q35_HOST_BRIDGE_PCIEXBAR_ADDR #include "list.h" // struct hlist_node #include "acpi.h" // acpi_pm1a_cnt +#include "malloc.h" // free #include "string.h" // memset #define PCI_DEVICE_MEM_MIN 0x1000 diff --git a/src/fw/shadow.c b/src/fw/shadow.c index 45cfcafd..c470592a 100644 --- a/src/fw/shadow.c +++ b/src/fw/shadow.c @@ -12,6 +12,7 @@ #include "hw/pci_regs.h" // PCI_VENDOR_ID #include "paravirt.h" // runningOnXen #include "dev-q35.h" // PCI_VENDOR_ID_INTEL +#include "malloc.h" // rom_get_last #include "string.h" // memset #include "x86.h" // wbinvd diff --git a/src/fw/smbios.c b/src/fw/smbios.c index 2f95d963..beb31439 100644 --- a/src/fw/smbios.c +++ b/src/fw/smbios.c @@ -9,6 +9,7 @@ #include "config.h" // CONFIG_* #include "paravirt.h" // RamSize #include "smbios.h" // struct smbios_entry_point +#include "malloc.h" // free #include "romfile.h" // romfile_findprefix #include "string.h" // memset #include "x86.h" // cpuid diff --git a/src/fw/xen.c b/src/fw/xen.c index f181e5ff..84123307 100644 --- a/src/fw/xen.c +++ b/src/fw/xen.c @@ -11,6 +11,7 @@ #include "types.h" // ASM32FLAT #include "util.h" // copy_acpi_rsdp #include "acpi.h" // find_acpi_features +#include "malloc.h" // memalign_high #include "string.h" // memcpy #include "x86.h" // cpuid |