include $(topdir)/MCONFIG.embedded
-include $(topdir)/version.mk
-INCLUDES = -I$(topdir)/com32/include
+INCLUDES = -I$(topdir)/com32/include -I$(topdir)/com32/libutil/include
CFLAGS += -D__MEMDISK__ -DDATE='"$(DATE)"'
LDFLAGS = $(GCCOPT) -g
NASM = nasm
OBJS16 = init.o16 init32.o
OBJS32 = start32.o setup.o msetup.o e820func.o conio.o memcpy.o memset.o \
memmove.o unzip.o dskprobe.o eltorito.o \
- ctypes.o strntoumax.o strtoull.o \
+ ctypes.o strntoumax.o strtoull.o suffix_number.o \
memdisk_chs_512.o memdisk_edd_512.o \
memdisk_iso_512.o memdisk_iso_2048.o
* ----------------------------------------------------------------------- */
#include <stdint.h>
+#include <minmax.h>
+#include <suffix_number.h>
#include "bda.h"
#include "dskprobe.h"
#include "e820.h"
* Adds a reservation to data in INT15h to prevent access to the top of RAM
* if there's any above the point specified.
*/
-void int15maxres(uint32_t restop)
+void int15maxres(unsigned long long restop_ull)
{
+ uint32_t restop;
struct e820range *ep;
const int int15restype = 2;
+ /* insertrange() works on uint32_t */
+ restop = min(restop_ull, UINT32_MAX);
+ /* printf(" int15maxres '%08x%08x' => %08x\n",
+ (unsigned int)(restop_ull>>32), (unsigned int)restop_ull, restop); */
+
for (ep = ranges; ep->type != -1U; ep++) {
if (ep->type == 1) { /* Only if available */
if (ep->start >= restop) {
}
if ((p = getcmditem("mem")) != CMD_NOTFOUND) {
- int15maxres(atou(p));
+ int15maxres(suffix_number(p));
}
/* The size is given by hptr->total_size plus the size of the E820