mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-21 04:44:29 +02:00
Allocate fnodes in the HMA instead of in an UMB
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@826 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
9db450a9b7
commit
ba0b070222
@ -364,10 +364,8 @@ void PreConfig(void)
|
|||||||
DynAlloc("DPBp", blk_dev.dh_name[0], sizeof(struct dpb));
|
DynAlloc("DPBp", blk_dev.dh_name[0], sizeof(struct dpb));
|
||||||
|
|
||||||
/* Initialize the file table */
|
/* Initialize the file table */
|
||||||
LoL->f_nodes =
|
config_init_fnodes(Config.cfgFiles);
|
||||||
KernelAlloc(Config.cfgFiles * sizeof(struct f_node), 'F', 0);
|
|
||||||
|
|
||||||
LoL->f_nodes_cnt = Config.cfgFiles;
|
|
||||||
LoL->sfthead = MK_FP(FP_SEG(LoL), 0xcc); /* &(LoL->firstsftt) */
|
LoL->sfthead = MK_FP(FP_SEG(LoL), 0xcc); /* &(LoL->firstsftt) */
|
||||||
/* LoL->FCBp = (sfttbl FAR *)&FcbSft; */
|
/* LoL->FCBp = (sfttbl FAR *)&FcbSft; */
|
||||||
/* LoL->FCBp = (sfttbl FAR *)
|
/* LoL->FCBp = (sfttbl FAR *)
|
||||||
@ -376,7 +374,6 @@ void PreConfig(void)
|
|||||||
|
|
||||||
config_init_buffers(Config.cfgBuffers);
|
config_init_buffers(Config.cfgBuffers);
|
||||||
|
|
||||||
|
|
||||||
LoL->CDSp = KernelAlloc(sizeof(struct cds) * LoL->lastdrive, 'L', 0);
|
LoL->CDSp = KernelAlloc(sizeof(struct cds) * LoL->lastdrive, 'L', 0);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -458,6 +455,9 @@ void PostConfig(void)
|
|||||||
|
|
||||||
DebugPrintf(("starting FAR allocations at %x\n", base_seg));
|
DebugPrintf(("starting FAR allocations at %x\n", base_seg));
|
||||||
|
|
||||||
|
/* Initialize the file table */
|
||||||
|
config_init_fnodes(Config.cfgFiles);
|
||||||
|
|
||||||
/* Begin by initializing our system buffers */
|
/* Begin by initializing our system buffers */
|
||||||
/* dma_scratch = (BYTE FAR *) KernelAllocDma(BUFFERSIZE); */
|
/* dma_scratch = (BYTE FAR *) KernelAllocDma(BUFFERSIZE); */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -477,15 +477,10 @@ void PostConfig(void)
|
|||||||
sp->sftt_next = (sfttbl FAR *) - 1;
|
sp->sftt_next = (sfttbl FAR *) - 1;
|
||||||
sp->sftt_count = Config.cfgFiles - 8;
|
sp->sftt_count = Config.cfgFiles - 8;
|
||||||
|
|
||||||
/* Initialize the file table */
|
|
||||||
LoL->f_nodes = KernelAlloc(Config.cfgFiles * sizeof(struct f_node), 'F',
|
|
||||||
Config.cfgFilesHigh);
|
|
||||||
LoL->f_nodes_cnt = Config.cfgFiles; /* and the number of allocated files */
|
|
||||||
|
|
||||||
LoL->CDSp = KernelAlloc(sizeof(struct cds) * LoL->lastdrive, 'L', Config.cfgLastdriveHigh);
|
LoL->CDSp = KernelAlloc(sizeof(struct cds) * LoL->lastdrive, 'L', Config.cfgLastdriveHigh);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("Final: \n f_node 0x%x\n", LoL->f_nodes);
|
printf("Final: \n f_node 0x%p\n", LoL->f_nodes);
|
||||||
/* printf(" FCB table 0x%p\n",LoL->FCBp);*/
|
/* printf(" FCB table 0x%p\n",LoL->FCBp);*/
|
||||||
printf(" sft table 0x%p\n", LoL->sfthead->sftt_next);
|
printf(" sft table 0x%p\n", LoL->sfthead->sftt_next);
|
||||||
printf(" CDS table 0x%p\n", LoL->CDSp);
|
printf(" CDS table 0x%p\n", LoL->CDSp);
|
||||||
@ -1777,6 +1772,21 @@ VOID config_init_buffers(COUNT anzBuffers)
|
|||||||
anzBuffers, anzBuffers * sizeof(struct buffer));
|
anzBuffers, anzBuffers * sizeof(struct buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VOID config_init_fnodes(int f_nodes_cnt)
|
||||||
|
{
|
||||||
|
struct f_node FAR *p;
|
||||||
|
size_t bytes;
|
||||||
|
|
||||||
|
/* number of allocated files */
|
||||||
|
LoL->f_nodes_cnt = f_nodes_cnt;
|
||||||
|
bytes = f_nodes_cnt * sizeof(struct f_node);
|
||||||
|
|
||||||
|
p = HMAalloc(bytes);
|
||||||
|
if (p == NULL)
|
||||||
|
p = KernelAlloc(bytes, 'F', 0);
|
||||||
|
LoL->f_nodes = p;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Undocumented feature:
|
Undocumented feature:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user